[GitHub] [tomcat] aooohan merged pull request #665: Update tool-wrapper.bat

2023-09-11 Thread via GitHub


aooohan merged PR #665:
URL: https://github.com/apache/tomcat/pull/665


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Update tool-wrapper.bat (#665)

2023-09-11 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new a6acd986aa Update tool-wrapper.bat (#665)
a6acd986aa is described below

commit a6acd986aa7b415c6390d578318054f51efbe876
Author: ChrissW-R1 
AuthorDate: Mon Sep 11 10:33:51 2023 +0200

Update tool-wrapper.bat (#665)

Solved issue with spaces in path
---
 bin/tool-wrapper.bat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat
index 64f38a02a1..e9320d81bc 100755
--- a/bin/tool-wrapper.bat
+++ b/bin/tool-wrapper.bat
@@ -85,6 +85,6 @@ shift
 goto setArgs
 :doneSetArgs
 
-%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" 
-Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool 
%CMD_LINE_ARGS%
+"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" 
-Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool 
%CMD_LINE_ARGS%
 
 :end


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Update tool-wrapper.bat (#665)

2023-09-11 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new ea6930eae7 Update tool-wrapper.bat (#665)
ea6930eae7 is described below

commit ea6930eae76921868e634705ebb881db96fff3ef
Author: ChrissW-R1 
AuthorDate: Mon Sep 11 10:33:51 2023 +0200

Update tool-wrapper.bat (#665)

Solved issue with spaces in path

(cherry picked from commit a6acd986aa7b415c6390d578318054f51efbe876)
---
 bin/tool-wrapper.bat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat
index 64f38a02a1..e9320d81bc 100755
--- a/bin/tool-wrapper.bat
+++ b/bin/tool-wrapper.bat
@@ -85,6 +85,6 @@ shift
 goto setArgs
 :doneSetArgs
 
-%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" 
-Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool 
%CMD_LINE_ARGS%
+"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -classpath "%CLASSPATH%" 
-Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool 
%CMD_LINE_ARGS%
 
 :end


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Update tool-wrapper.bat (#665)

2023-09-11 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new f2facc3ab4 Update tool-wrapper.bat (#665)
f2facc3ab4 is described below

commit f2facc3ab45da07fa65a17012b851b648c6f5eaa
Author: lihan 
AuthorDate: Mon Sep 11 16:35:36 2023 +0800

Update tool-wrapper.bat (#665)

Solved issue with spaces in path
---
 bin/tool-wrapper.bat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat
index 94de4fe326..5d91999fa5 100755
--- a/bin/tool-wrapper.bat
+++ b/bin/tool-wrapper.bat
@@ -105,6 +105,6 @@ shift
 goto setArgs
 :doneSetArgs
 
-%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" 
-classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" 
org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
+"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" 
-classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" 
org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
 
 :end


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Update tool-wrapper.bat (#665)

2023-09-11 Thread lihan
This is an automated email from the ASF dual-hosted git repository.

lihan pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new c61037a8c3 Update tool-wrapper.bat (#665)
c61037a8c3 is described below

commit c61037a8c32ce45e4bfa160a23682d00a3cbfb0a
Author: lihan 
AuthorDate: Mon Sep 11 16:36:14 2023 +0800

Update tool-wrapper.bat (#665)

Solved issue with spaces in path
---
 bin/tool-wrapper.bat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/tool-wrapper.bat b/bin/tool-wrapper.bat
index 94de4fe326..5d91999fa5 100755
--- a/bin/tool-wrapper.bat
+++ b/bin/tool-wrapper.bat
@@ -105,6 +105,6 @@ shift
 goto setArgs
 :doneSetArgs
 
-%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" 
-classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" 
org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
+"%_RUNJAVA%" %JAVA_OPTS% %TOOL_OPTS% -D%ENDORSED_PROP%="%JAVA_ENDORSED_DIRS%" 
-classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" 
org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
 
 :end


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] aooohan commented on pull request #665: Update tool-wrapper.bat

2023-09-11 Thread via GitHub


aooohan commented on PR #665:
URL: https://github.com/apache/tomcat/pull/665#issuecomment-1713426562

   Thanks for the PR. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1912238 - in /tomcat/site/trunk: docs/migration-10.1.html xdocs/migration-10.1.xml

2023-09-11 Thread remm
Author: remm
Date: Mon Sep 11 09:04:01 2023
New Revision: 1912238

URL: http://svn.apache.org/viewvc?rev=1912238&view=rev
Log:
Add explicit note about the APR connector for Tomcat 10.1. Although it was 
deprecated so included in the deprecation removal note, it is a significant 
component so mention it explicitly

Modified:
tomcat/site/trunk/docs/migration-10.1.html
tomcat/site/trunk/xdocs/migration-10.1.xml

Modified: tomcat/site/trunk/docs/migration-10.1.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-10.1.html?rev=1912238&r1=1912237&r2=1912238&view=diff
==
--- tomcat/site/trunk/docs/migration-10.1.html (original)
+++ tomcat/site/trunk/docs/migration-10.1.html Mon Sep 11 09:04:01 2023
@@ -125,6 +125,12 @@ versions of Apache Tomcat.
 EL API under a SecurityManager outside of Apache Tomcat.
   
   
+In 10.1.0-M5 onwards the APR connector that was previously marked as
+deprecated in Tomcat 10.0 has been removed. Along with that, APIs
+that are not needed for the use of OpenSSL have been removed from the
+tomcat-native library.
+  
+  
 In 10.1.0-M3 onwards, Tomcat no longer adds an "Expires" HTTP
 response header when adding "Cache-Control: private" due to a
 CONFIDENTIAL transport-guarantee. This will likely cause a change
@@ -187,9 +193,8 @@ versions of Apache Tomcat.
 10.1.8
 10.1.9
 10.1.10
-10.1.11
-10.1.12
-10.1.13
+10.1.11
+10.1.12
 , new version:
 
 10.1.0-M1
@@ -217,8 +222,7 @@ versions of Apache Tomcat.
 10.1.9
 10.1.10
 10.1.11
-10.1.12
-10.1.13
+10.1.12
 trunk (unreleased)
 
 

Modified: tomcat/site/trunk/xdocs/migration-10.1.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration-10.1.xml?rev=1912238&r1=1912237&r2=1912238&view=diff
==
--- tomcat/site/trunk/xdocs/migration-10.1.xml (original)
+++ tomcat/site/trunk/xdocs/migration-10.1.xml Mon Sep 11 09:04:01 2023
@@ -140,6 +140,12 @@ versions of Apache Tomcat.
 EL API under a SecurityManager outside of Apache Tomcat.
   
   
+In 10.1.0-M5 onwards the APR connector that was previously marked as
+deprecated in Tomcat 10.0 has been removed. Along with that, APIs
+that are not needed for the use of OpenSSL have been removed from the
+tomcat-native library.
+  
+  
 In 10.1.0-M3 onwards, Tomcat no longer adds an "Expires" HTTP
 response header when adding "Cache-Control: private" due to a
 CONFIDENTIAL transport-guarantee. This will likely cause a change
@@ -204,9 +210,8 @@ versions of Apache Tomcat.
 10.1.8
 10.1.9
 10.1.10
-10.1.11
-10.1.12
-10.1.13
+10.1.11
+10.1.12
 , new version:
 
 10.1.0-M1
@@ -234,8 +239,7 @@ versions of Apache Tomcat.
 10.1.9
 10.1.10
 10.1.11
-10.1.12
-10.1.13
+10.1.12
 trunk (unreleased)
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1912238 - in /tomcat/site/trunk: docs/migration-10.1.html xdocs/migration-10.1.xml

2023-09-11 Thread Mark Thomas

On 11/09/2023 10:04, r...@apache.org wrote:

Author: remm
Date: Mon Sep 11 09:04:01 2023
New Revision: 1912238

URL: http://svn.apache.org/viewvc?rev=1912238&view=rev
Log:
Add explicit note about the APR connector for Tomcat 10.1. Although it was 
deprecated so included in the deprecation removal note, it is a significant 
component so mention it explicitly

Modified:
 tomcat/site/trunk/docs/migration-10.1.html
 tomcat/site/trunk/xdocs/migration-10.1.xml

Modified: tomcat/site/trunk/docs/migration-10.1.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-10.1.html?rev=1912238&r1=1912237&r2=1912238&view=diff
==
--- tomcat/site/trunk/docs/migration-10.1.html (original)
+++ tomcat/site/trunk/docs/migration-10.1.html Mon Sep 11 09:04:01 2023
@@ -125,6 +125,12 @@ versions of Apache Tomcat.
  EL API under a SecurityManager outside of Apache Tomcat.


+In 10.1.0-M5 onwards the APR connector that was previously marked as
+deprecated in Tomcat 10.0 has been removed. Along with that, APIs
+that are not needed for the use of OpenSSL have been removed from the
+tomcat-native library.
+  
+  
  In 10.1.0-M3 onwards, Tomcat no longer adds an "Expires" HTTP
  response header when adding "Cache-Control: private" due to a
  CONFIDENTIAL transport-guarantee. This will likely cause a change
@@ -187,9 +193,8 @@ versions of Apache Tomcat.
  10.1.8
  10.1.9
  10.1.10
-10.1.11
-10.1.12
-10.1.13
+10.1.11
+10.1.12


The above looks like an unintentional change as it removes 10.1.13 from 
the list of current versions,



  , new version:
  
  10.1.0-M1
@@ -217,8 +222,7 @@ versions of Apache Tomcat.
  10.1.9
  10.1.10
  10.1.11
-10.1.12
-10.1.13
+10.1.12


Same here.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1912239 - in /tomcat/site/trunk: docs/migration-10.1.html xdocs/migration-10.1.xml

2023-09-11 Thread remm
Author: remm
Date: Mon Sep 11 09:18:09 2023
New Revision: 1912239

URL: http://svn.apache.org/viewvc?rev=1912239&view=rev
Log:
Fix version numbers after unintended change.

Modified:
tomcat/site/trunk/docs/migration-10.1.html
tomcat/site/trunk/xdocs/migration-10.1.xml

Modified: tomcat/site/trunk/docs/migration-10.1.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/migration-10.1.html?rev=1912239&r1=1912238&r2=1912239&view=diff
==
--- tomcat/site/trunk/docs/migration-10.1.html (original)
+++ tomcat/site/trunk/docs/migration-10.1.html Mon Sep 11 09:18:09 2023
@@ -193,8 +193,9 @@ versions of Apache Tomcat.
 10.1.8
 10.1.9
 10.1.10
-10.1.11
-10.1.12
+10.1.11
+10.1.12
+10.1.13
 , new version:
 
 10.1.0-M1
@@ -222,7 +223,8 @@ versions of Apache Tomcat.
 10.1.9
 10.1.10
 10.1.11
-10.1.12
+10.1.12
+10.1.13
 trunk (unreleased)
 
 

Modified: tomcat/site/trunk/xdocs/migration-10.1.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/migration-10.1.xml?rev=1912239&r1=1912238&r2=1912239&view=diff
==
--- tomcat/site/trunk/xdocs/migration-10.1.xml (original)
+++ tomcat/site/trunk/xdocs/migration-10.1.xml Mon Sep 11 09:18:09 2023
@@ -210,8 +210,9 @@ versions of Apache Tomcat.
 10.1.8
 10.1.9
 10.1.10
-10.1.11
-10.1.12
+10.1.11
+10.1.12
+10.1.13
 , new version:
 
 10.1.0-M1
@@ -239,7 +240,8 @@ versions of Apache Tomcat.
 10.1.9
 10.1.10
 10.1.11
-10.1.12
+10.1.12
+10.1.13
 trunk (unreleased)
 
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new edb50bbd05 Fix possible NPE
edb50bbd05 is described below

commit edb50bbd05821b36035564f4e54d81d627c4f95f
Author: remm 
AuthorDate: Mon Sep 11 11:31:27 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/DataSourceRealm.java| 9 -
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/DataSourceRealm.java 
b/java/org/apache/catalina/realm/DataSourceRealm.java
index 14b690ceee..d97ae3b126 100644
--- a/java/org/apache/catalina/realm/DataSourceRealm.java
+++ b/java/org/apache/catalina/realm/DataSourceRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import javax.sql.DataSource;
 
 import org.apache.catalina.LifecycleException;
+import org.apache.catalina.Server;
 import org.apache.naming.ContextBindings;
 
 /**
@@ -366,7 +367,13 @@ public class DataSourceRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
-context = getServer().getGlobalNamingContext();
+Server server = getServer();
+if (server == null) {
+connectionSuccess = false;
+
containerLog.error(sm.getString("dataSourceRealm.noNamingContext"));
+return null;
+}
+context = server.getGlobalNamingContext();
 }
 DataSource dataSource = (DataSource) 
context.lookup(dataSourceName);
 Connection connection = dataSource.getConnection();
diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index bd993e00dd..0e80360222 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -32,6 +32,7 @@ dataSourceRealm.commit=Exception committing connection before 
closing
 dataSourceRealm.exception=Exception performing authentication
 dataSourceRealm.getPassword.exception=Exception retrieving password for [{0}]
 dataSourceRealm.getRoles.exception=Exception retrieving roles for [{0}]
+dataSourceRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
 
 jaasCallback.username=Returned username [{0}]
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 462b2a18e0 Fix possible NPE
462b2a18e0 is described below

commit 462b2a18e072fb29dbd8217e346135a4d6ef6ed6
Author: remm 
AuthorDate: Mon Sep 11 11:31:27 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/DataSourceRealm.java| 9 -
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/DataSourceRealm.java 
b/java/org/apache/catalina/realm/DataSourceRealm.java
index 00ca78ef1c..8b001df00c 100644
--- a/java/org/apache/catalina/realm/DataSourceRealm.java
+++ b/java/org/apache/catalina/realm/DataSourceRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import javax.sql.DataSource;
 
 import org.apache.catalina.LifecycleException;
+import org.apache.catalina.Server;
 import org.apache.naming.ContextBindings;
 
 /**
@@ -366,7 +367,13 @@ public class DataSourceRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
-context = getServer().getGlobalNamingContext();
+Server server = getServer();
+if (server == null) {
+connectionSuccess = false;
+
containerLog.error(sm.getString("dataSourceRealm.noNamingContext"));
+return null;
+}
+context = server.getGlobalNamingContext();
 }
 DataSource dataSource = (DataSource) 
context.lookup(dataSourceName);
 Connection connection = dataSource.getConnection();
diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index 261188e404..d3300b0cca 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -32,6 +32,7 @@ dataSourceRealm.commit=Exception committing connection before 
closing
 dataSourceRealm.exception=Exception performing authentication
 dataSourceRealm.getPassword.exception=Exception retrieving password for [{0}]
 dataSourceRealm.getRoles.exception=Exception retrieving roles for [{0}]
+dataSourceRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
 
 jaasCallback.username=Returned username [{0}]
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 868d28dfa8 Fix possible NPE
868d28dfa8 is described below

commit 868d28dfa8fe6508fe08f4233238559cd00a8b52
Author: remm 
AuthorDate: Mon Sep 11 11:31:27 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/DataSourceRealm.java| 9 -
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/DataSourceRealm.java 
b/java/org/apache/catalina/realm/DataSourceRealm.java
index 14b690ceee..d97ae3b126 100644
--- a/java/org/apache/catalina/realm/DataSourceRealm.java
+++ b/java/org/apache/catalina/realm/DataSourceRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import javax.sql.DataSource;
 
 import org.apache.catalina.LifecycleException;
+import org.apache.catalina.Server;
 import org.apache.naming.ContextBindings;
 
 /**
@@ -366,7 +367,13 @@ public class DataSourceRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
-context = getServer().getGlobalNamingContext();
+Server server = getServer();
+if (server == null) {
+connectionSuccess = false;
+
containerLog.error(sm.getString("dataSourceRealm.noNamingContext"));
+return null;
+}
+context = server.getGlobalNamingContext();
 }
 DataSource dataSource = (DataSource) 
context.lookup(dataSourceName);
 Connection connection = dataSource.getConnection();
diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index bd993e00dd..0e80360222 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -32,6 +32,7 @@ dataSourceRealm.commit=Exception committing connection before 
closing
 dataSourceRealm.exception=Exception performing authentication
 dataSourceRealm.getPassword.exception=Exception retrieving password for [{0}]
 dataSourceRealm.getRoles.exception=Exception retrieving roles for [{0}]
+dataSourceRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
 
 jaasCallback.username=Returned username [{0}]
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 9935798c64 Fix possible NPE
9935798c64 is described below

commit 9935798c6494da0bb87ae8b835e094362ca14671
Author: remm 
AuthorDate: Mon Sep 11 11:31:27 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/DataSourceRealm.java| 9 -
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/DataSourceRealm.java 
b/java/org/apache/catalina/realm/DataSourceRealm.java
index 1bfbbaef95..a27129a5da 100644
--- a/java/org/apache/catalina/realm/DataSourceRealm.java
+++ b/java/org/apache/catalina/realm/DataSourceRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import javax.sql.DataSource;
 
 import org.apache.catalina.LifecycleException;
+import org.apache.catalina.Server;
 import org.apache.naming.ContextBindings;
 
 /**
@@ -375,7 +376,13 @@ public class DataSourceRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
-context = getServer().getGlobalNamingContext();
+Server server = getServer();
+if (server == null) {
+connectionSuccess = false;
+
containerLog.error(sm.getString("dataSourceRealm.noNamingContext"));
+return null;
+}
+context = server.getGlobalNamingContext();
 }
 DataSource dataSource = (DataSource) 
context.lookup(dataSourceName);
 Connection connection = dataSource.getConnection();
diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index b13595272a..0fe5c0cf41 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -32,6 +32,7 @@ dataSourceRealm.commit=Exception committing connection before 
closing
 dataSourceRealm.exception=Exception performing authentication
 dataSourceRealm.getPassword.exception=Exception retrieving password for [{0}]
 dataSourceRealm.getRoles.exception=Exception retrieving roles for [{0}]
+dataSourceRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
 
 jaasCallback.username=Returned username [{0}]
 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 2310ad0025 Fix possible NPE
2310ad0025 is described below

commit 2310ad00252f7624d9daae8488bf5458377f3aed
Author: remm 
AuthorDate: Mon Sep 11 11:46:17 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JAASMemoryLoginModule.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java 
b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
index 0c2c6aa5e6..54ac7c3451 100644
--- a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
+++ b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
@@ -266,7 +266,8 @@ public class JAASMemoryLoginModule extends MemoryRealm 
implements LoginModule {
 try {
 callbackHandler.handle(callbacks);
 username = ((NameCallback) callbacks[0]).getName();
-password = new String(((PasswordCallback) 
callbacks[1]).getPassword());
+char[] passwordArray = ((PasswordCallback) 
callbacks[1]).getPassword();
+password = (passwordArray == null) ? null : new 
String(passwordArray);
 nonce = ((TextInputCallback) callbacks[2]).getText();
 nc = ((TextInputCallback) callbacks[3]).getText();
 cnonce = ((TextInputCallback) callbacks[4]).getText();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 6570e14d67 Fix possible NPE
6570e14d67 is described below

commit 6570e14d6723679c65a1f592485f17b39236a9a2
Author: remm 
AuthorDate: Mon Sep 11 11:46:17 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JAASMemoryLoginModule.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java 
b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
index 0c2c6aa5e6..54ac7c3451 100644
--- a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
+++ b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
@@ -266,7 +266,8 @@ public class JAASMemoryLoginModule extends MemoryRealm 
implements LoginModule {
 try {
 callbackHandler.handle(callbacks);
 username = ((NameCallback) callbacks[0]).getName();
-password = new String(((PasswordCallback) 
callbacks[1]).getPassword());
+char[] passwordArray = ((PasswordCallback) 
callbacks[1]).getPassword();
+password = (passwordArray == null) ? null : new 
String(passwordArray);
 nonce = ((TextInputCallback) callbacks[2]).getText();
 nc = ((TextInputCallback) callbacks[3]).getText();
 cnonce = ((TextInputCallback) callbacks[4]).getText();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d25f2a33d1 Fix possible NPE
d25f2a33d1 is described below

commit d25f2a33d18e349587f16dfb4e32629825b005ee
Author: remm 
AuthorDate: Mon Sep 11 11:46:17 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JAASMemoryLoginModule.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java 
b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
index 5ede590c04..1fd058b439 100644
--- a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
+++ b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
@@ -265,7 +265,8 @@ public class JAASMemoryLoginModule extends MemoryRealm 
implements LoginModule {
 try {
 callbackHandler.handle(callbacks);
 username = ((NameCallback) callbacks[0]).getName();
-password = new String(((PasswordCallback) 
callbacks[1]).getPassword());
+char[] passwordArray = ((PasswordCallback) 
callbacks[1]).getPassword();
+password = (passwordArray == null) ? null : new 
String(passwordArray);
 nonce = ((TextInputCallback) callbacks[2]).getText();
 nc = ((TextInputCallback) callbacks[3]).getText();
 cnonce = ((TextInputCallback) callbacks[4]).getText();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new a0eb55dcd8 Fix possible NPE
a0eb55dcd8 is described below

commit a0eb55dcd816a63dfb1ca0ba891e5f00e46e97f6
Author: remm 
AuthorDate: Mon Sep 11 11:46:17 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JAASMemoryLoginModule.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java 
b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
index 94a4078f40..b1df1fc87e 100644
--- a/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
+++ b/java/org/apache/catalina/realm/JAASMemoryLoginModule.java
@@ -265,7 +265,8 @@ public class JAASMemoryLoginModule extends MemoryRealm 
implements LoginModule {
 try {
 callbackHandler.handle(callbacks);
 username = ((NameCallback) callbacks[0]).getName();
-password = new String(((PasswordCallback) 
callbacks[1]).getPassword());
+char[] passwordArray = ((PasswordCallback) 
callbacks[1]).getPassword();
+password = (passwordArray == null) ? null : new 
String(passwordArray);
 nonce = ((TextInputCallback) callbacks[2]).getText();
 nc = ((TextInputCallback) callbacks[3]).getText();
 cnonce = ((TextInputCallback) callbacks[4]).getText();


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new b67bed283c Fix possible NPE
b67bed283c is described below

commit b67bed283c6597e23c4b34a08c4070629fc8200e
Author: remm 
AuthorDate: Mon Sep 11 12:06:51 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index 98cd3885bc..da240b2ba8 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1257,7 +1257,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, 
user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + 
roles.toString());
+containerLog.debug("Found roles: " + 
((roles == null) ? "" : roles.toString()));
 }
 return new GenericPrincipal(username, roles);
 }
@@ -1287,7 +1287,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + roles.toString());
+containerLog.debug("Found roles: " + ((roles == null) ? "" 
: roles.toString()));
 }
 
 // Create and return a suitable Principal for this user


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 7c900aad3d Fix possible NPE
7c900aad3d is described below

commit 7c900aad3da3dd628ca3da809d88cba20ddd5066
Author: remm 
AuthorDate: Mon Sep 11 12:06:51 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index 7232262346..3054a81229 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1255,7 +1255,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, 
user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + 
roles.toString());
+containerLog.debug("Found roles: " + 
((roles == null) ? "" : roles.toString()));
 }
 return new GenericPrincipal(username, roles);
 }
@@ -1285,7 +1285,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + roles.toString());
+containerLog.debug("Found roles: " + ((roles == null) ? "" 
: roles.toString()));
 }
 
 // Create and return a suitable Principal for this user


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 39f970174f Fix possible NPE
39f970174f is described below

commit 39f970174f9a3e8b77fcfd45d404f4684e0285df
Author: remm 
AuthorDate: Mon Sep 11 12:06:51 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index aa94cb07ea..016e25b75e 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1255,7 +1255,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, 
user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + 
roles.toString());
+containerLog.debug("Found roles: " + 
((roles == null) ? "" : roles.toString()));
 }
 return new GenericPrincipal(username, 
credentials, roles);
 }
@@ -1285,7 +1285,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + roles.toString());
+containerLog.debug("Found roles: " + ((roles == null) ? "" 
: roles.toString()));
 }
 
 // Create and return a suitable Principal for this user


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 3fd7af953d Fix possible NPE
3fd7af953d is described below

commit 3fd7af953d7eebc640d6ddbd442add5850530043
Author: remm 
AuthorDate: Mon Sep 11 12:06:51 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/JNDIRealm.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java 
b/java/org/apache/catalina/realm/JNDIRealm.java
index 04fceead64..a37ffc6811 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -1264,7 +1264,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, 
user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + 
roles.toString());
+containerLog.debug("Found roles: " + 
((roles == null) ? "" : roles.toString()));
 }
 return new GenericPrincipal(username, 
credentials, roles);
 }
@@ -1294,7 +1294,7 @@ public class JNDIRealm extends RealmBase {
 // Search for additional roles
 List roles = getRoles(connection, user);
 if (containerLog.isDebugEnabled()) {
-containerLog.debug("Found roles: " + roles.toString());
+containerLog.debug("Found roles: " + ((roles == null) ? "" 
: roles.toString()));
 }
 
 // Create and return a suitable Principal for this user


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new b8e6aa3f2a Fix possible NPE
b8e6aa3f2a is described below

commit b8e6aa3f2aa9c1f24f4fb4696b240a7723d0d48d
Author: remm 
AuthorDate: Mon Sep 11 12:49:31 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/RealmBase.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index 03ea46f4dd..d29ea1a0eb 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -847,6 +847,9 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 
 // For AllRolesMode.STRICT_AUTH_ONLY_MODE there must be 
zero roles
 roles = request.getContext().findSecurityRoles();
+if (roles == null) {
+roles = new String[0];
+}
 if (roles.length == 0 && allRolesMode == 
AllRolesMode.STRICT_AUTH_ONLY_MODE) {
 if (log.isDebugEnabled()) {
 log.debug("Granting access for role-name=*, strict 
auth-only");


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 3b97f7793d Fix possible NPE
3b97f7793d is described below

commit 3b97f7793da616f50bc2668b0aecec010c33dfd0
Author: remm 
AuthorDate: Mon Sep 11 12:49:31 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/RealmBase.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index d88b47abdc..548380653d 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -855,6 +855,9 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 
 // For AllRolesMode.STRICT_AUTH_ONLY_MODE there must be 
zero roles
 roles = request.getContext().findSecurityRoles();
+if (roles == null) {
+roles = new String[0];
+}
 if (roles.length == 0 && allRolesMode == 
AllRolesMode.STRICT_AUTH_ONLY_MODE) {
 if (log.isDebugEnabled()) {
 log.debug("Granting access for role-name=*, strict 
auth-only");


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 137eb9e940 Fix possible NPE
137eb9e940 is described below

commit 137eb9e9402265d654815c51326f240a54c9f7b9
Author: remm 
AuthorDate: Mon Sep 11 12:49:31 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/RealmBase.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index b6c0ec65cc..53fcf8fc03 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -855,6 +855,9 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements Realm {
 
 // For AllRolesMode.STRICT_AUTH_ONLY_MODE there must be 
zero roles
 roles = request.getContext().findSecurityRoles();
+if (roles == null) {
+roles = new String[0];
+}
 if (roles.length == 0 && allRolesMode == 
AllRolesMode.STRICT_AUTH_ONLY_MODE) {
 if (log.isDebugEnabled()) {
 log.debug("Granting access for role-name=*, strict 
auth-only");


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 2b2f0c6754 Fix possible NPE
2b2f0c6754 is described below

commit 2b2f0c675467a7faaf51b8dabd73cc49a51c1c2f
Author: remm 
AuthorDate: Mon Sep 11 12:49:31 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/RealmBase.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/java/org/apache/catalina/realm/RealmBase.java 
b/java/org/apache/catalina/realm/RealmBase.java
index 9d7e9a760b..9fccf63ed4 100644
--- a/java/org/apache/catalina/realm/RealmBase.java
+++ b/java/org/apache/catalina/realm/RealmBase.java
@@ -855,6 +855,9 @@ public abstract class RealmBase extends LifecycleMBeanBase 
implements org.apache
 
 // For AllRolesMode.STRICT_AUTH_ONLY_MODE there must be 
zero roles
 roles = request.getContext().findSecurityRoles();
+if (roles == null) {
+roles = new String[0];
+}
 if (roles.length == 0 && allRolesMode == 
AllRolesMode.STRICT_AUTH_ONLY_MODE) {
 if (log.isDebugEnabled()) {
 log.debug("Granting access for role-name=*, strict 
auth-only");


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new a232fe567c Fix possible NPE
a232fe567c is described below

commit a232fe567ca26c7d37d6cf5b227e75fd9adb5fce
Author: remm 
AuthorDate: Mon Sep 11 12:59:15 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 java/org/apache/catalina/realm/UserDatabaseRealm.java  | 6 ++
 2 files changed, 7 insertions(+)

diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index 0e80360222..569030c5db 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -112,3 +112,4 @@ realmBase.unknownAllRolesMode=Unknown mode [{0}], must be 
one of: strict, authOn
 
 userDatabaseRealm.lookup=Exception looking up UserDatabase under key [{0}]
 userDatabaseRealm.noDatabase=No UserDatabase component found under key [{0}]
+userDatabaseRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
diff --git a/java/org/apache/catalina/realm/UserDatabaseRealm.java 
b/java/org/apache/catalina/realm/UserDatabaseRealm.java
index 16a3f86108..82c6c0dec7 100644
--- a/java/org/apache/catalina/realm/UserDatabaseRealm.java
+++ b/java/org/apache/catalina/realm/UserDatabaseRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import org.apache.catalina.Group;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Role;
+import org.apache.catalina.Server;
 import org.apache.catalina.User;
 import org.apache.catalina.UserDatabase;
 import org.apache.naming.ContextBindings;
@@ -214,6 +215,11 @@ public class UserDatabaseRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
+Server server = getServer();
+if (server == null) {
+
containerLog.error(sm.getString("userDatabaseRealm.noNamingContext"));
+return null;
+}
 context = getServer().getGlobalNamingContext();
 }
 database = (UserDatabase) context.lookup(resourceName);


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 1a7991b38c Fix possible NPE
1a7991b38c is described below

commit 1a7991b38c973598f51f8c3864ae7817e74782b4
Author: remm 
AuthorDate: Mon Sep 11 12:59:15 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 java/org/apache/catalina/realm/UserDatabaseRealm.java  | 6 ++
 2 files changed, 7 insertions(+)

diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index 0e80360222..569030c5db 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -112,3 +112,4 @@ realmBase.unknownAllRolesMode=Unknown mode [{0}], must be 
one of: strict, authOn
 
 userDatabaseRealm.lookup=Exception looking up UserDatabase under key [{0}]
 userDatabaseRealm.noDatabase=No UserDatabase component found under key [{0}]
+userDatabaseRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
diff --git a/java/org/apache/catalina/realm/UserDatabaseRealm.java 
b/java/org/apache/catalina/realm/UserDatabaseRealm.java
index 16a3f86108..82c6c0dec7 100644
--- a/java/org/apache/catalina/realm/UserDatabaseRealm.java
+++ b/java/org/apache/catalina/realm/UserDatabaseRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import org.apache.catalina.Group;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Role;
+import org.apache.catalina.Server;
 import org.apache.catalina.User;
 import org.apache.catalina.UserDatabase;
 import org.apache.naming.ContextBindings;
@@ -214,6 +215,11 @@ public class UserDatabaseRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
+Server server = getServer();
+if (server == null) {
+
containerLog.error(sm.getString("userDatabaseRealm.noNamingContext"));
+return null;
+}
 context = getServer().getGlobalNamingContext();
 }
 database = (UserDatabase) context.lookup(resourceName);


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new a3764f214e Fix possible NPE
a3764f214e is described below

commit a3764f214efab450f9e83f424f349aced9d1253e
Author: remm 
AuthorDate: Mon Sep 11 12:59:15 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 java/org/apache/catalina/realm/UserDatabaseRealm.java  | 6 ++
 2 files changed, 7 insertions(+)

diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index d3300b0cca..7ac439ff9d 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -119,3 +119,4 @@ realmBase.unknownAllRolesMode=Unknown mode [{0}], must be 
one of: strict, authOn
 
 userDatabaseRealm.lookup=Exception looking up UserDatabase under key [{0}]
 userDatabaseRealm.noDatabase=No UserDatabase component found under key [{0}]
+userDatabaseRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
diff --git a/java/org/apache/catalina/realm/UserDatabaseRealm.java 
b/java/org/apache/catalina/realm/UserDatabaseRealm.java
index 9589207d48..548f86f3e1 100644
--- a/java/org/apache/catalina/realm/UserDatabaseRealm.java
+++ b/java/org/apache/catalina/realm/UserDatabaseRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import org.apache.catalina.Group;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Role;
+import org.apache.catalina.Server;
 import org.apache.catalina.User;
 import org.apache.catalina.UserDatabase;
 import org.apache.naming.ContextBindings;
@@ -214,6 +215,11 @@ public class UserDatabaseRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
+Server server = getServer();
+if (server == null) {
+
containerLog.error(sm.getString("userDatabaseRealm.noNamingContext"));
+return null;
+}
 context = getServer().getGlobalNamingContext();
 }
 database = (UserDatabase) context.lookup(resourceName);


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Fix possible NPE

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 8cb1f07ac9 Fix possible NPE
8cb1f07ac9 is described below

commit 8cb1f07ac9e935b6144ac55e3ce4b5b576697128
Author: remm 
AuthorDate: Mon Sep 11 12:59:15 2023 +0200

Fix possible NPE

Found by coverity.
---
 java/org/apache/catalina/realm/LocalStrings.properties | 1 +
 java/org/apache/catalina/realm/UserDatabaseRealm.java  | 6 ++
 2 files changed, 7 insertions(+)

diff --git a/java/org/apache/catalina/realm/LocalStrings.properties 
b/java/org/apache/catalina/realm/LocalStrings.properties
index 0fe5c0cf41..eda93dd8cf 100644
--- a/java/org/apache/catalina/realm/LocalStrings.properties
+++ b/java/org/apache/catalina/realm/LocalStrings.properties
@@ -106,3 +106,4 @@ realmBase.hasRoleSuccess=Username [{0}] has role [{1}]
 
 userDatabaseRealm.lookup=Exception looking up UserDatabase under key [{0}]
 userDatabaseRealm.noDatabase=No UserDatabase component found under key [{0}]
+userDatabaseRealm.noNamingContext=Cannot access the server to retrieve the 
naming context
diff --git a/java/org/apache/catalina/realm/UserDatabaseRealm.java 
b/java/org/apache/catalina/realm/UserDatabaseRealm.java
index 2412223240..5ff8847bef 100644
--- a/java/org/apache/catalina/realm/UserDatabaseRealm.java
+++ b/java/org/apache/catalina/realm/UserDatabaseRealm.java
@@ -28,6 +28,7 @@ import javax.naming.Context;
 import org.apache.catalina.Group;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Role;
+import org.apache.catalina.Server;
 import org.apache.catalina.User;
 import org.apache.catalina.UserDatabase;
 import org.apache.catalina.users.MemoryUserDatabase;
@@ -184,6 +185,11 @@ public class UserDatabaseRealm extends RealmBase {
 context = ContextBindings.getClassLoader();
 context = (Context) context.lookup("comp/env");
 } else {
+Server server = getServer();
+if (server == null) {
+
containerLog.error(sm.getString("userDatabaseRealm.noNamingContext"));
+return null;
+}
 context = getServer().getGlobalNamingContext();
 }
 database = (UserDatabase) context.lookup(resourceName);


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 62814] Use readable names for cluster channel/map options in documentation AND sample configurations

2023-09-11 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62814

--- Comment #3 from Christopher Schultz  ---
Yes, this was absolutely being left open for a new contributor to get involved
with some easy work.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 212734b600 Cleanup
212734b600 is described below

commit 212734b6003c8ae4cf79bc405d442299c0e1e1a6
Author: remm 
AuthorDate: Mon Sep 11 15:49:23 2023 +0200

Cleanup

Argument cannot be null, so remove check that triggered coverity.
---
 java/org/apache/catalina/servlets/CGIServlet.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index c4c967fd36..1c4a0d68ca 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -915,8 +915,7 @@ public final class CGIServlet extends HttpServlet {
 String name = null;
 String scriptname = null;
 
-if (webAppRootDir != null &&
-webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
+if (webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
 //strip the trailing "/" from the webAppRootDir
 webAppRootDir = webAppRootDir.substring(0, 
(webAppRootDir.length() - 1));
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new dc9af94dbc Cleanup
dc9af94dbc is described below

commit dc9af94dbc115e1ebd3ad3f793a965e4fafc9fdc
Author: remm 
AuthorDate: Mon Sep 11 15:49:23 2023 +0200

Cleanup

Argument cannot be null, so remove check that triggered coverity.
---
 java/org/apache/catalina/servlets/CGIServlet.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index e1cda7bb97..dd654ea782 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -910,8 +910,7 @@ public final class CGIServlet extends HttpServlet {
 String name = null;
 String scriptname = null;
 
-if (webAppRootDir != null &&
-webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
+if (webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
 //strip the trailing "/" from the webAppRootDir
 webAppRootDir = webAppRootDir.substring(0, 
(webAppRootDir.length() - 1));
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new ea9b8c44af Cleanup
ea9b8c44af is described below

commit ea9b8c44af0fc155d202d4dc79eee1822158b7cb
Author: remm 
AuthorDate: Mon Sep 11 15:49:23 2023 +0200

Cleanup

Argument cannot be null, so remove check that triggered coverity.
---
 java/org/apache/catalina/servlets/CGIServlet.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index 2c03cf7601..a527f23758 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -909,8 +909,7 @@ public final class CGIServlet extends HttpServlet {
 String name = null;
 String scriptname = null;
 
-if (webAppRootDir != null &&
-webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
+if (webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
 //strip the trailing "/" from the webAppRootDir
 webAppRootDir = webAppRootDir.substring(0, 
(webAppRootDir.length() - 1));
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 372519673f Cleanup
372519673f is described below

commit 372519673fbf2169688b9c354ca24171d220aab0
Author: remm 
AuthorDate: Mon Sep 11 15:49:23 2023 +0200

Cleanup

Argument cannot be null, so remove check that triggered coverity.
---
 java/org/apache/catalina/servlets/CGIServlet.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/servlets/CGIServlet.java 
b/java/org/apache/catalina/servlets/CGIServlet.java
index a406a4a756..fdb7e3db8f 100644
--- a/java/org/apache/catalina/servlets/CGIServlet.java
+++ b/java/org/apache/catalina/servlets/CGIServlet.java
@@ -909,8 +909,7 @@ public final class CGIServlet extends HttpServlet {
 String name = null;
 String scriptname = null;
 
-if (webAppRootDir != null &&
-webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
+if (webAppRootDir.lastIndexOf(File.separator) == 
(webAppRootDir.length() - 1)) {
 //strip the trailing "/" from the webAppRootDir
 webAppRootDir = webAppRootDir.substring(0, 
(webAppRootDir.length() - 1));
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 0f0c1b1fb0 Cleanup
0f0c1b1fb0 is described below

commit 0f0c1b1fb088621dc2668e0d63957997ab38fa87
Author: remm 
AuthorDate: Mon Sep 11 16:11:25 2023 +0200

Cleanup

Found by coverity.
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 7f4687654c..250d200780 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1280,7 +1280,10 @@ public class DefaultServlet extends HttpServlet {
 is.reset();
 if (stripBom) {
 while (skip-- > 0) {
-is.read();
+if (is.read() < 0) {
+// Ignore since included
+break;
+}
 }
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 20b07fb4e4 Cleanup
20b07fb4e4 is described below

commit 20b07fb4e41cfa593de0fe77e761483dce27d28f
Author: remm 
AuthorDate: Mon Sep 11 16:11:25 2023 +0200

Cleanup

Found by coverity.
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 3c33628b60..1ba7b3e637 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1310,7 +1310,10 @@ public class DefaultServlet extends HttpServlet {
 is.reset();
 if (stripBom) {
 while (skip-- > 0) {
-is.read();
+if (is.read() < 0) {
+// Ignore since included
+break;
+}
 }
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new e94ec495bb Cleanup
e94ec495bb is described below

commit e94ec495bbab9d1b4ce74434301ad1b550c348d2
Author: remm 
AuthorDate: Mon Sep 11 16:11:25 2023 +0200

Cleanup

Found by coverity.
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 3c069e8028..b950e33546 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1310,7 +1310,10 @@ public class DefaultServlet extends HttpServlet {
 is.reset();
 if (stripBom) {
 while (skip-- > 0) {
-is.read();
+if (is.read() < 0) {
+// Ignore since included
+break;
+}
 }
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 6dd84aa08d Cleanup
6dd84aa08d is described below

commit 6dd84aa08dff75e2251c478455244604b49ac32f
Author: remm 
AuthorDate: Mon Sep 11 16:11:25 2023 +0200

Cleanup

Found by coverity.
---
 java/org/apache/catalina/servlets/DefaultServlet.java | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/servlets/DefaultServlet.java 
b/java/org/apache/catalina/servlets/DefaultServlet.java
index 419d5c17a0..47fa7ce8be 100644
--- a/java/org/apache/catalina/servlets/DefaultServlet.java
+++ b/java/org/apache/catalina/servlets/DefaultServlet.java
@@ -1317,7 +1317,10 @@ public class DefaultServlet extends HttpServlet {
 is.reset();
 if (stripBom) {
 while (skip-- > 0) {
-is.read();
+if (is.read() < 0) {
+// Ignore since included
+break;
+}
 }
 }
 }


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 4331d9122b Cleanup
4331d9122b is described below

commit 4331d9122b9aaf8dd60ec9ec108ed56b6c5a8e62
Author: remm 
AuthorDate: Mon Sep 11 16:35:26 2023 +0200

Cleanup

Although concurrency is hard to imagine while starting, sync for
consistency.
Found by coverity.
---
 java/org/apache/catalina/session/ManagerBase.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/session/ManagerBase.java 
b/java/org/apache/catalina/session/ManagerBase.java
index 06aa148d5e..e9ee8c81ba 100644
--- a/java/org/apache/catalina/session/ManagerBase.java
+++ b/java/org/apache/catalina/session/ManagerBase.java
@@ -605,11 +605,15 @@ public abstract class ManagerBase extends 
LifecycleMBeanBase implements Manager
 
 // Ensure caches for timing stats are the right size by filling with
 // nulls.
-while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionCreationTiming.add(null);
+synchronized (sessionCreationTiming) {
+while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionCreationTiming.add(null);
+}
 }
-while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionExpirationTiming.add(null);
+synchronized (sessionExpirationTiming) {
+while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionExpirationTiming.add(null);
+}
 }
 
 /* Create sessionIdGenerator if not explicitly configured */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 10.1.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
 new c01c8d923f Cleanup
c01c8d923f is described below

commit c01c8d923fa48e830a67a41656065e9bebf2a7a4
Author: remm 
AuthorDate: Mon Sep 11 16:35:26 2023 +0200

Cleanup

Although concurrency is hard to imagine while starting, sync for
consistency.
Found by coverity.
---
 java/org/apache/catalina/session/ManagerBase.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/session/ManagerBase.java 
b/java/org/apache/catalina/session/ManagerBase.java
index de253e0933..71d978940f 100644
--- a/java/org/apache/catalina/session/ManagerBase.java
+++ b/java/org/apache/catalina/session/ManagerBase.java
@@ -620,11 +620,15 @@ public abstract class ManagerBase extends 
LifecycleMBeanBase implements Manager
 
 // Ensure caches for timing stats are the right size by filling with
 // nulls.
-while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionCreationTiming.add(null);
+synchronized (sessionCreationTiming) {
+while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionCreationTiming.add(null);
+}
 }
-while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionExpirationTiming.add(null);
+synchronized (sessionExpirationTiming) {
+while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionExpirationTiming.add(null);
+}
 }
 
 /* Create sessionIdGenerator if not explicitly configured */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 9.0.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 83c4c97415 Cleanup
83c4c97415 is described below

commit 83c4c97415dfb3b6e1e5986bfc773c93ca36282a
Author: remm 
AuthorDate: Mon Sep 11 16:35:26 2023 +0200

Cleanup

Although concurrency is hard to imagine while starting, sync for
consistency.
Found by coverity.
---
 java/org/apache/catalina/session/ManagerBase.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/session/ManagerBase.java 
b/java/org/apache/catalina/session/ManagerBase.java
index 129c4f842a..5645bf652c 100644
--- a/java/org/apache/catalina/session/ManagerBase.java
+++ b/java/org/apache/catalina/session/ManagerBase.java
@@ -628,11 +628,15 @@ public abstract class ManagerBase extends 
LifecycleMBeanBase implements Manager
 
 // Ensure caches for timing stats are the right size by filling with
 // nulls.
-while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionCreationTiming.add(null);
+synchronized (sessionCreationTiming) {
+while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionCreationTiming.add(null);
+}
 }
-while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionExpirationTiming.add(null);
+synchronized (sessionExpirationTiming) {
+while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionExpirationTiming.add(null);
+}
 }
 
 /* Create sessionIdGenerator if not explicitly configured */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch 8.5.x updated: Cleanup

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 2923246fd4 Cleanup
2923246fd4 is described below

commit 2923246fd4275252a95f6838400113c0048d778a
Author: remm 
AuthorDate: Mon Sep 11 16:35:26 2023 +0200

Cleanup

Although concurrency is hard to imagine while starting, sync for
consistency.
Found by coverity.
---
 java/org/apache/catalina/session/ManagerBase.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/session/ManagerBase.java 
b/java/org/apache/catalina/session/ManagerBase.java
index 4f09ff0a9f..514d7603e2 100644
--- a/java/org/apache/catalina/session/ManagerBase.java
+++ b/java/org/apache/catalina/session/ManagerBase.java
@@ -599,11 +599,15 @@ public abstract class ManagerBase extends 
LifecycleMBeanBase implements Manager
 
 // Ensure caches for timing stats are the right size by filling with
 // nulls.
-while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionCreationTiming.add(null);
+synchronized (sessionCreationTiming) {
+while (sessionCreationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionCreationTiming.add(null);
+}
 }
-while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
-sessionExpirationTiming.add(null);
+synchronized (sessionExpirationTiming) {
+while (sessionExpirationTiming.size() < TIMING_STATS_CACHE_SIZE) {
+sessionExpirationTiming.add(null);
+}
 }
 
 /* Create sessionIdGenerator if not explicitly configured */


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Connectors (JK) 1.2.49

2023-09-11 Thread Mark Thomas

On 06/09/2023 21:13, Mark Thomas wrote:

Tag:
https://github.com/apache/tomcat-connectors/tree/JK_1_2_49

Source:
https://github.com/apache/tomcat-connectors/tree/JK_1_2_49

Dist:
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/jk/


This is a maintenance release with a handful of bug fixes (compared to
1.2.48) and some clean-up. It also includes Windows binaries for IIS.

The significant changes are:
- Add support for request identifiers
- Remove support for iPlanet web server

The proposed JK 1.2.49 release is:
[ ] Broken - do not release
[X] Stable - go ahead and release as 1.2.49


Tested (simple smoke test)
- mod_jk on Linux
- ISAPI redirector on Windows Server 2012
- ISAPI redirector on Windows Server 2019

and all work as expected.

The smoke test fails on Windows Server 2022 but I see the same problem 
with 1.2.48 so either there is an issue with my test environment or we 
to do something extra on Windows Server 2022. I am still investigating 
but I don't view this as sufficient to vote against this release.


Mark

P.S. We need one more vote ;)

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Connectors (JK) 1.2.49

2023-09-11 Thread Igal Sapir
On Wed, Sep 6, 2023, 13:13 Mark Thomas  wrote:

> Tag:
> https://github.com/apache/tomcat-connectors/tree/JK_1_2_49
>
> Source:
> https://github.com/apache/tomcat-connectors/tree/JK_1_2_49
>
> Dist:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-connectors/jk/
>
>
> This is a maintenance release with a handful of bug fixes (compared to
> 1.2.48) and some clean-up. It also includes Windows binaries for IIS.
>
> The significant changes are:
> - Add support for request identifiers
> - Remove support for iPlanet web server
>
> The proposed JK 1.2.49 release is:
> [ ] Broken - do not release
> [X] Stable - go ahead and release as 1.2.49
>

+1

Igal


> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


[VOTE][RESULT] Release Apache Tomcat Connectors (JK) 1.2.49

2023-09-11 Thread Mark Thomas

The following votes were cast:

Binding:
+1: schultz, markt, isapir

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch main updated: Update info

2023-09-11 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
 new 3dc7f08021 Update info
3dc7f08021 is described below

commit 3dc7f08021651a3beac27d3bb1af141e180e385b
Author: remm 
AuthorDate: Mon Sep 11 22:55:50 2023 +0200

Update info
---
 modules/openssl-foreign/README.md | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/openssl-foreign/README.md 
b/modules/openssl-foreign/README.md
index 060020d6b0..86ff3cd9f9 100644
--- a/modules/openssl-foreign/README.md
+++ b/modules/openssl-foreign/README.md
@@ -2,14 +2,14 @@
 
 ## This module is experimental
 
-It uses the JEP XXX API. More details on this API are available
-at `https://openjdk.java.net/jeps/XXX`.
+It uses the JEP 454 API. More details on this API are available
+at `https://openjdk.java.net/jeps/454`.
 
-## Building Java 22 with the JEP XXX API
+## Building Java 22 with the JEP 454 API
 
 Clone `https://github.com/openjdk/panama-foreign/` in some location and
 checkout the main branch. This is a Java 22 development JVM
-with the JEP XXX API. It may fail to build. When this happens, step back
+with the JEP 454 API. It may fail to build. When this happens, step back
 one commit at a time until it does.
 
 ```
@@ -53,7 +53,7 @@ Example connector:
 Run Tomcat using the additional Java options that allow access to the API and
 native code:
 ```
-export JAVA_OPTS="--enable-preview --enable-native-access=ALL-UNNAMED"
+export JAVA_OPTS="--enable-native-access=ALL-UNNAMED"
 ```
 
 ## Generating the OpenSSL API code using jextract (optional)


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r63926 - /dev/tomcat/tomcat-connectors/jk/ /dev/tomcat/tomcat-connectors/jk/binaries/windows/ /dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/ /release/tomcat/tomcat-connectors/j

2023-09-11 Thread markt
Author: markt
Date: Mon Sep 11 21:53:24 2023
New Revision: 63926

Log:
Release Tomcat Connectors 1.2.49

Added:

release/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip

release/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip.asc
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip.asc

release/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip.sha512
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip.sha512

release/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip

release/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip.asc
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip.asc

release/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip.sha512
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip.sha512

release/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-i386-iis.zip
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-i386-iis.zip

release/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-i386-iis.zip.asc
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-i386-iis.zip.asc

release/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-i386-iis.zip.sha512
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-i386-iis.zip.sha512

release/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-x86_64-iis.zip
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-x86_64-iis.zip

release/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-x86_64-iis.zip.asc
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-x86_64-iis.zip.asc

release/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-x86_64-iis.zip.sha512
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/binaries/windows/tomcat-connectors-1.2.49-windows-x86_64-iis.zip.sha512
release/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.tar.gz
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.tar.gz
release/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.tar.gz.asc
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.tar.gz.asc

release/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.tar.gz.sha512
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.tar.gz.sha512
release/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.zip
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.zip
release/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.zip.asc
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.zip.asc
release/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.zip.sha512
  - copied unchanged from r63925, 
dev/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.49-src.zip.sha512
Removed:

dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip

dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip.asc

dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-i386-symbols.zip.sha512

dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip

dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/tomcat-connectors-1.2.49-windows-x86_64-symbols.zip.asc

dev/tomcat/tomcat-connectors/jk/binaries/windows/symbols/