[Bug 64712] javax.servlet.http.authType not evaluated after JASPIC authentication success

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64712

--- Comment #7 from Robert Rodewald  ---
Created attachment 37427
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37427&action=edit
Patch for Bug 64712

- Adds evaluation of "javax.servlet.http.authType" in messageInfo.getMap()
- Removes unnecessary null-Check for map (can not be null as of spec and Tomcat
implementation)

-- 
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



[Bug 64713] Principal is cached in session if javax.servlet.http.registerSession is set to false

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64713

--- Comment #4 from Robert Rodewald  ---
Created attachment 37428
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37428&action=edit
Patch for Bug 64713

- extended evaluation of "jakarta.servlet.http.registerSession" (false value
disables caching of principal in session)
- removed unnecessary null-check for map (can not be null as per spec and
Tomcat implementation)

-- 
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



[Bug 64713] Principal is cached in session if javax.servlet.http.registerSession is set to false

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64713

Robert Rodewald  changed:

   What|Removed |Added

  Attachment #37428|0   |1
is obsolete||

--- Comment #5 from Robert Rodewald  ---
Created attachment 37429
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37429&action=edit
Combined patch for bugs 64712, 64713

combination of the patches for bug 64712 and 64713 to avoid merge conflicts
(hope that helps)

-- 
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



[Bug 64713] Principal is cached in session if javax.servlet.http.registerSession is set to false

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64713

--- Comment #6 from Mark Thomas  ---
Thanks for this.

I'd looked at bug 64712 and come up with a patch for that that also (I thought)
addressed this bug but I had missed your case 3.

Using getOrDefault is tempting but given the importance of getting this right
I'd rather keep the code in sync across versions which means sticking to Java
1.7 methods.

It shouldn't take too long to merge my changes with your patch. I should get
the fix for this committed shortly.

-- 
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



[Bug 64644] wrong state of WsSession on network outage

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64644

--- Comment #7 from Saksham Verma  ---
(In reply to Mark Thomas from comment #6)
> Fixed in:
> - master for 10.0.0-M8 onwards
> - 9.0.x for 9.0.38 onwards
> - 8.5.x for 8.5.58 onwards
> - 7.0.x for 7.0.106 onwards
> 
> Thanks for the PR and for adapting it based on feedback.

Could you please provide a tentative Date for 9.0.38 release?

-- 
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 master updated: Fix BZ 64712 and 64713. JASPIC fixes

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 2e2f6ad  Fix BZ 64712 and 64713. JASPIC fixes
2e2f6ad is described below

commit 2e2f6ad1e22a59fe1cb0b3214f8ae55f50b1064a
Author: Mark Thomas 
AuthorDate: Mon Sep 7 10:34:55 2020 +0100

Fix BZ 64712 and 64713. JASPIC fixes

https://bz.apache.org/bugzilla/show_bug.cgi?id=64712
https://bz.apache.org/bugzilla/show_bug.cgi?id=64713
Take account of registerSession and authType
Based on a patch by Robert Rodewald
---
 .../catalina/authenticator/AuthenticatorBase.java  | 33 ++
 webapps/docs/changelog.xml | 12 
 2 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index aa75c7b..66b9038 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -924,16 +924,37 @@ public abstract class AuthenticatorBase extends ValveBase
 if (requirePrincipal) {
 return false;
 }
-} else if (cachedAuth == false ||
-
!principal.getUserPrincipal().equals(request.getUserPrincipal())) {
+} else if (cachedAuth == false || 
!principal.getUserPrincipal().equals(request.getUserPrincipal())) {
 // Skip registration if authentication credentials were
 // cached and the Principal did not change.
-@SuppressWarnings("rawtypes")// JASPIC API uses raw types
+
+// Check to see if any of the JASPIC properties were set
+Boolean register = null;
+String authType = "JASPIC";
+@SuppressWarnings("rawtypes") // JASPIC API uses raw types
 Map map = state.messageInfo.getMap();
-if (map != null && 
map.containsKey("jakarta.servlet.http.registerSession")) {
-register(request, response, principal, "JASPIC", null, 
null, true, true);
+
+String registerValue = (String) 
map.get("jakarta.servlet.http.registerSession");
+if (registerValue != null) {
+register = Boolean.valueOf(registerValue);
+}
+String authTypeValue = (String) 
map.get("jakarta.servlet.http.authType");
+if (authTypeValue != null) {
+authType = authTypeValue;
+}
+
+/*
+ * Need to handle three cases.
+ * See https://bz.apache.org/bugzilla/show_bug.cgi?id=64713
+ * 1. registerSession TRUEalways use session, always cache
+ * 2. registerSession NOT SET config for session, config for 
cache
+ * 3. registerSession FALSE   config for session, never cache
+ */
+if (register != null) {
+register(request, response, principal, authType, null, 
null,
+alwaysUseSession || register.booleanValue(), 
register.booleanValue());
 } else {
-register(request, response, principal, "JASPIC", null, 
null);
+register(request, response, principal, authType, null, 
null);
 }
 }
 request.setNote(Constants.REQ_JASPIC_SUBJECT_NOTE, client);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d6a65a2..ca23cb0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,18 @@
 Fix path used by the health check valve when it is not associated with
 a Context. (remm)
   
+  
+64712: The JASPIC authenticator now checks the
+ServerAuthModule for
+jakarta.servlet.http.authType and, if present, uses the
+value provided. Based on a patch by Robert Rodewald. (markt)
+  
+  
+64713: The JASPIC authenticator now checks the value of
+jakarta.servlet.http.registerSession set by the
+ServerAuthModule when decideing whether or nor to register
+the session. Based on a patch by Robert Rodewald. (markt)
+  
 
   
   


-
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 BZ 64712 and 64713. JASPIC fixes

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 8a14e6f  Fix BZ 64712 and 64713. JASPIC fixes
8a14e6f is described below

commit 8a14e6fd393c8b7db6106eabcca98aa8e9776099
Author: Mark Thomas 
AuthorDate: Mon Sep 7 10:34:55 2020 +0100

Fix BZ 64712 and 64713. JASPIC fixes

https://bz.apache.org/bugzilla/show_bug.cgi?id=64712
https://bz.apache.org/bugzilla/show_bug.cgi?id=64713
Take account of registerSession and authType
Based on a patch by Robert Rodewald
---
 .../catalina/authenticator/AuthenticatorBase.java  | 33 ++
 webapps/docs/changelog.xml | 12 
 2 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index 9269b9f..8653551 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -923,16 +923,37 @@ public abstract class AuthenticatorBase extends ValveBase
 if (requirePrincipal) {
 return false;
 }
-} else if (cachedAuth == false ||
-
!principal.getUserPrincipal().equals(request.getUserPrincipal())) {
+} else if (cachedAuth == false || 
!principal.getUserPrincipal().equals(request.getUserPrincipal())) {
 // Skip registration if authentication credentials were
 // cached and the Principal did not change.
-@SuppressWarnings("rawtypes")// JASPIC API uses raw types
+
+// Check to see if any of the JASPIC properties were set
+Boolean register = null;
+String authType = "JASPIC";
+@SuppressWarnings("rawtypes") // JASPIC API uses raw types
 Map map = state.messageInfo.getMap();
-if (map != null && 
map.containsKey("javax.servlet.http.registerSession")) {
-register(request, response, principal, "JASPIC", null, 
null, true, true);
+
+String registerValue = (String) 
map.get("javax.servlet.http.registerSession");
+if (registerValue != null) {
+register = Boolean.valueOf(registerValue);
+}
+String authTypeValue = (String) 
map.get("javax.servlet.http.authType");
+if (authTypeValue != null) {
+authType = authTypeValue;
+}
+
+/*
+ * Need to handle three cases.
+ * See https://bz.apache.org/bugzilla/show_bug.cgi?id=64713
+ * 1. registerSession TRUEalways use session, always cache
+ * 2. registerSession NOT SET config for session, config for 
cache
+ * 3. registerSession FALSE   config for session, never cache
+ */
+if (register != null) {
+register(request, response, principal, authType, null, 
null,
+alwaysUseSession || register.booleanValue(), 
register.booleanValue());
 } else {
-register(request, response, principal, "JASPIC", null, 
null);
+register(request, response, principal, authType, null, 
null);
 }
 }
 request.setNote(Constants.REQ_JASPIC_SUBJECT_NOTE, client);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 30040cc..9ac2dd1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,18 @@
 Fix path used by the health check valve when it is not associated with
 a Context. (remm)
   
+  
+64712: The JASPIC authenticator now checks the
+ServerAuthModule for
+jakarta.servlet.http.authType and, if present, uses the
+value provided. Based on a patch by Robert Rodewald. (markt)
+  
+  
+64713: The JASPIC authenticator now checks the value of
+jakarta.servlet.http.registerSession set by the
+ServerAuthModule when decideing whether or nor to register
+the session. Based on a patch by Robert Rodewald. (markt)
+  
 
   
   


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



[Bug 64713] Principal is cached in session if javax.servlet.http.registerSession is set to false

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64713

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #7 from Mark Thomas  ---
Fixed in:
- master for 10.0.0-M8 onwards
- 9.0.x for 9.0.38 onwards
- 8.5.x for 8.5.58 onwards

-- 
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



[Bug 64712] javax.servlet.http.authType not evaluated after JASPIC authentication success

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64712

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #8 from Mark Thomas  ---
Thanks for the patch. Additional comments on bug 64713.

Fixed in:
- master for 10.0.0-M8 onwards
- 9.0.x for 9.0.38 onwards
- 8.5.x for 8.5.58 onwards

-- 
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 8.5.x updated: Fix BZ 64712 and 64713. JASPIC fixes

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 a7a99c6  Fix BZ 64712 and 64713. JASPIC fixes
a7a99c6 is described below

commit a7a99c6e497c5f8a5185b26c9ef623d23b18b285
Author: Mark Thomas 
AuthorDate: Mon Sep 7 10:34:55 2020 +0100

Fix BZ 64712 and 64713. JASPIC fixes

https://bz.apache.org/bugzilla/show_bug.cgi?id=64712
https://bz.apache.org/bugzilla/show_bug.cgi?id=64713
Take account of registerSession and authType
Based on a patch by Robert Rodewald
---
 .../catalina/authenticator/AuthenticatorBase.java  | 33 ++
 webapps/docs/changelog.xml | 12 
 2 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index 2643f75..0951d00 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -925,16 +925,37 @@ public abstract class AuthenticatorBase extends ValveBase
 if (requirePrincipal) {
 return false;
 }
-} else if (cachedAuth == false ||
-
!principal.getUserPrincipal().equals(request.getUserPrincipal())) {
+} else if (cachedAuth == false || 
!principal.getUserPrincipal().equals(request.getUserPrincipal())) {
 // Skip registration if authentication credentials were
 // cached and the Principal did not change.
-@SuppressWarnings("rawtypes")// JASPIC API uses raw types
+
+// Check to see if any of the JASPIC properties were set
+Boolean register = null;
+String authType = "JASPIC";
+@SuppressWarnings("rawtypes") // JASPIC API uses raw types
 Map map = state.messageInfo.getMap();
-if (map != null && 
map.containsKey("javax.servlet.http.registerSession")) {
-register(request, response, principal, "JASPIC", null, 
null, true, true);
+
+String registerValue = (String) 
map.get("javax.servlet.http.registerSession");
+if (registerValue != null) {
+register = Boolean.valueOf(registerValue);
+}
+String authTypeValue = (String) 
map.get("javax.servlet.http.authType");
+if (authTypeValue != null) {
+authType = authTypeValue;
+}
+
+/*
+ * Need to handle three cases.
+ * See https://bz.apache.org/bugzilla/show_bug.cgi?id=64713
+ * 1. registerSession TRUEalways use session, always cache
+ * 2. registerSession NOT SET config for session, config for 
cache
+ * 3. registerSession FALSE   config for session, never cache
+ */
+if (register != null) {
+register(request, response, principal, authType, null, 
null,
+alwaysUseSession || register.booleanValue(), 
register.booleanValue());
 } else {
-register(request, response, principal, "JASPIC", null, 
null);
+register(request, response, principal, authType, null, 
null);
 }
 }
 request.setNote(Constants.REQ_JASPIC_SUBJECT_NOTE, client);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0301083..41b1cb1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -95,6 +95,18 @@
 Use the correct method to calculate session idle time in
 PersistentValve. (kfujino)
   
+  
+64712: The JASPIC authenticator now checks the
+ServerAuthModule for
+jakarta.servlet.http.authType and, if present, uses the
+value provided. Based on a patch by Robert Rodewald. (markt)
+  
+  
+64713: The JASPIC authenticator now checks the value of
+jakarta.servlet.http.registerSession set by the
+ServerAuthModule when decideing whether or nor to register
+the session. Based on a patch by Robert Rodewald. (markt)
+  
 
   
   


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



[tomcat-native] branch master updated: Update with actual release date for 1.2.25

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/master by this push:
 new da410aa  Update with actual release date for 1.2.25
da410aa is described below

commit da410aa23eea1871dee8fc83fea58f9122fc849d
Author: Mark Thomas 
AuthorDate: Mon Sep 7 11:54:25 2020 +0100

Update with actual release date for 1.2.25
---
 xdocs/index.xml | 2 +-
 xdocs/news/2020.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xdocs/index.xml b/xdocs/index.xml
index 3bfb3db..518973a 100644
--- a/xdocs/index.xml
+++ b/xdocs/index.xml
@@ -59,7 +59,7 @@
 
 
 
-26 Aug 2020 - TC-Native-1.2.25
+3 Sep 2020 - TC-Native-1.2.25
 released
 The Apache Tomcat team is proud to announce the immediate availability of
 Tomcat Native 1.2.25 Stable.
diff --git a/xdocs/news/2020.xml b/xdocs/news/2020.xml
index 36f6ec5..900d3ee 100644
--- a/xdocs/news/2020.xml
+++ b/xdocs/news/2020.xml
@@ -29,7 +29,7 @@
 
 
 
- 
+ 
   The Apache Tomcat team is proud to announce the immediate availability of
   Tomcat Native 1.2.25. This is a bugfix release.
   


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



svn commit: r1881528 - in /tomcat/site/trunk/docs/native-doc: index.html miscellaneous/changelog.html news/2020.html

2020-09-07 Thread markt
Author: markt
Date: Mon Sep  7 11:02:34 2020
New Revision: 1881528

URL: http://svn.apache.org/viewvc?rev=1881528&view=rev
Log:
Update docs for 1.2.25 release

Modified:
tomcat/site/trunk/docs/native-doc/index.html
tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html
tomcat/site/trunk/docs/native-doc/news/2020.html

Modified: tomcat/site/trunk/docs/native-doc/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/index.html?rev=1881528&r1=1881527&r2=1881528&view=diff
==
--- tomcat/site/trunk/docs/native-doc/index.html (original)
+++ tomcat/site/trunk/docs/native-doc/index.html Mon Sep  7 11:02:34 2020
@@ -27,10 +27,10 @@
 Headlines
 
 
-29 Apr 2020 - TC-Native-1.2.24
+3 Sep 2020 - TC-Native-1.2.25
 released
 The Apache Tomcat team is proud to announce the immediate availability of
-Tomcat Native 1.2.24 Stable.
+Tomcat Native 1.2.25 Stable.
 
 The sources and the binaries for selected platforms are available from the
 Download page.

Modified: tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html?rev=1881528&r1=1881527&r2=1881528&view=diff
==
--- tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html (original)
+++ tomcat/site/trunk/docs/native-doc/miscellaneous/changelog.html Mon Sep  7 
11:02:34 2020
@@ -3,6 +3,37 @@
   
   This is the Changelog for Tomcat Native 1.2.
   
+Changes in 1.2.25
+  
+
+  Incomplete name mangling fix for C++ compilers in tcn_api.h. (michaelo)
+
+
+  Improve OS-specific header include for native thread id. (michaelo)
+
+
+  Disable keylog callback support for LibreSSL. (michaelo)
+
+
+  Add support for SSLContext.addChainCertificateRaw() with
+  LibreSSL 2.9.1 and up. (michaelo)
+
+
+  Add support for HP-UX's _lwp_self() in our
+  ssl_thread_id(void). (michaelo)
+
+
+  Remove default option passed for rpath to linker on HP-UX. (michaelo)
+
+
+  Add an option to allow the OCSP responder check to by bypassed. Note that
+  if OCSP is enabled, a missing responder is now treated as an error.
+  (jfclere)
+
+
+  http://issues.apache.org/bugzilla/show_bug.cgi?id=64429";>64429: Fix 
compilation with LibreSSL. (markt)
+
+  
 Changes in 1.2.24
   
 
@@ -479,4 +510,4 @@
changelog.
 
 Copyright © 2008-2020, The Apache Software Foundation
-  
+  
\ No newline at end of file

Modified: tomcat/site/trunk/docs/native-doc/news/2020.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/native-doc/news/2020.html?rev=1881528&r1=1881527&r2=1881528&view=diff
==
--- tomcat/site/trunk/docs/native-doc/news/2020.html (original)
+++ tomcat/site/trunk/docs/native-doc/news/2020.html Mon Sep  7 11:02:34 2020
@@ -1,5 +1,10 @@
 
 The Apache Tomcat Native - News - 2020 News and 
Statushttp://tomcat.apache.org/";>http://www.apache.org/"; target="_blank">The Apache Tomcat Native - 
NewsLinksDocs Home
 Miscellaneous 
DocumentationChangelogNews20202019201820172016201520142013201220112010200920082020 News and Status2020 News & Status
+ 3 Sep 2020 - TC-Native-1.2.25 
released
+  The Apache Tomcat team is proud to announce the immediate availability of
+  Tomcat Native 1.2.25. This is a bugfix release.
+  
+ 
  29 Apr 2020 - TC-Native-1.2.24 
released
   The Apache Tomcat team is proud to announce the immediate availability of
   Tomcat Native 1.2.24. This is a bugfix release.



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



[tomcat-native] branch master updated: Update ignores

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/master by this push:
 new 48ea9c3  Update ignores
48ea9c3 is described below

commit 48ea9c38f065e585872629c66dcb14068cc6ae81
Author: Mark Thomas 
AuthorDate: Mon Sep 7 12:03:59 2020 +0100

Update ignores
---
 .gitignore | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.gitignore b/.gitignore
index 7acc2f5..323ada6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,9 @@
 .classpath
 .project
 
+/build
+/dist
+
 /.settings/
 /native/.libs/
 /native/.make.dirs


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



svn commit: r1881529 - in /tomcat/site/trunk: docs/download-native.html docs/index.html docs/oldnews.html xdocs/download-native.xml xdocs/index.xml xdocs/oldnews.xml

2020-09-07 Thread markt
Author: markt
Date: Mon Sep  7 11:09:19 2020
New Revision: 1881529

URL: http://svn.apache.org/viewvc?rev=1881529&view=rev
Log:
Update site for Native 1.2.25 release

Modified:
tomcat/site/trunk/docs/download-native.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/xdocs/download-native.xml
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/oldnews.xml

Modified: tomcat/site/trunk/docs/download-native.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-native.html?rev=1881529&r1=1881528&r2=1881529&view=diff
==
--- tomcat/site/trunk/docs/download-native.html (original)
+++ tomcat/site/trunk/docs/download-native.html Mon Sep  7 11:09:19 2020
@@ -49,22 +49,22 @@
   Source (please choose the 
correct format for your platform)
   
 
-  
-Native 1.2.24 Source Release tar.gz (e.g. Unix, Linux, Mac 
OS)
+  
+Native 1.2.25 Source Release tar.gz (e.g. Unix, Linux, Mac 
OS)
 
   
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/source/tomcat-native-1.2.24-src.tar.gz.asc";>PGP],
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/source/tomcat-native-1.2.24-src.tar.gz.sha512";>SHA512]
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/source/tomcat-native-1.2.25-src.tar.gz.asc";>PGP],
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/source/tomcat-native-1.2.25-src.tar.gz.sha512";>SHA512]
   
 
 
 
-  
-Native 1.2.24 Source Release zip (e.g. Windows)
+  
+Native 1.2.25 Source Release zip (e.g. Windows)
 
   
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/source/tomcat-native-1.2.24-win32-src.zip.asc";>PGP],
-[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/source/tomcat-native-1.2.24-win32-src.zip.sha512";>SHA512]
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/source/tomcat-native-1.2.25-win32-src.zip.asc";>PGP],
+[https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/source/tomcat-native-1.2.25-win32-src.zip.sha512";>SHA512]
   
 
 
@@ -73,7 +73,7 @@
 
 You can find binaries release too.
 You may download them from
-  HERE
+  HERE
 
 
   
@@ -91,22 +91,22 @@
 Binaries for Microsoft Windows built with 
OpenSSL 1.1.1c
 
   
-
-  Native 1.2.24 Windows Binaries zip (recommended)
+
+  Native 1.2.25 Windows Binaries zip (recommended)
   
 
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/binaries/tomcat-native-1.2.24-openssl-1.1.1g-win32-bin.zip.asc";>PGP],
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/binaries/tomcat-native-1.2.24-openssl-1.1.1g-win32-bin.zip.sha512";>SHA512]
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/binaries/tomcat-native-1.2.25-openssl-1.1.1g-win32-bin.zip.asc";>PGP],
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/binaries/tomcat-native-1.2.25-openssl-1.1.1g-win32-bin.zip.sha512";>SHA512]
 
   
   
   
-
-  Native 1.2.24 Windows OCSP-enabled Binaries zip
+
+  Native 1.2.25 Windows OCSP-enabled Binaries zip
   
 
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/binaries/tomcat-native-1.2.24-openssl-1.1.1g-ocsp-win32-bin.zip.asc";>PGP],
-  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.24/binaries/tomcat-native-1.2.24-openssl-1.1.1g-ocsp-win32-bin.zip.sha512";>SHA512]
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/binaries/tomcat-native-1.2.25-openssl-1.1.1g-ocsp-win32-bin.zip.asc";>PGP],
+  [https://downloads.apache.org/tomcat/tomcat-connectors/native/1.2.25/binaries/tomcat-native-1.2.25-openssl-1.1.1g-ocsp-win32-bin.zip.sha512";>SHA512]
 
   
   

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1881529&r1=1881528&r2=1881529&view=diff
==
--- tomcat/site/trunk/docs/index.html (original)

svn commit: r41338 - /release/tomcat/tomcat-connectors/native/1.2.24/

2020-09-07 Thread markt
Author: markt
Date: Mon Sep  7 11:10:09 2020
New Revision: 41338

Log:
Drop Native 1.2.24 from mirrors

Removed:
release/tomcat/tomcat-connectors/native/1.2.24/


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



[ANN] Apache Tomcat Native 1.2.25 released

2020-09-07 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat Native 1.2.25 stable.

The key features of this release are:
- Improvements to the build system
- Add an option to allow the OCSP check to be bypassed

Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/native-doc/miscellaneous/changelog.html

Downloads:
http://tomcat.apache.org/download-native.cgi

The Apache Tomcat Native Library provides portable API for features
not found in contemporary JDK's. It uses Apache Portable Runtime as
operating system abstraction layer and OpenSSL for SSL networking and
allows optimal performance in production environments.

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



[Bug 64715] New: PasswordValidationCallback not supported

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64715

Bug ID: 64715
   Summary: PasswordValidationCallback not supported
   Product: Tomcat 9
   Version: 9.0.37
  Hardware: PC
OS: All
Status: NEW
  Severity: minor
  Priority: P2
 Component: JASPIC
  Assignee: dev@tomcat.apache.org
  Reporter: robert.rodew...@kopsis.com
  Target Milestone: -

The JASPIC 1.1 specification (section 4.9.2) requires a runtime to provide a
CallbackHandler that supports the PasswordValidationCallback. This callback is
not implemented in Tomcat.

I would like to provide a patch for this, but would like to check some details
first.

The callback has to be implemented in the CallbackHandlerImpl. This is
relatively straightforward but as we need the realm associated with the current
context to be able to check the password it can't stay a singleton.

So what I propose:
- change CallbackHandlerImpl from singleton to standard class (one per context)
- add parameter to constructor to pass the current context to the handler (not
the realm because this would break changing the associated realm through JMX)
- update initialization code in AuthenticatorBase accordingly
- implement the callback by calling context.getRealm().authenticate(user, pass)

(optional)
- when dynamic initialization of a CallbackHandler is used (see
jaspicCallbackHandlerClass config parameter of AuthenticatorBase), use
introspection to search for a "setContext" and pass the context to the handler

Any comments are wellcome.

Questions:
- Should I check some annotations (e.g. @Ressource) for the injection of the
context in case of dynamic instantiation?
- How about instantiating the default CallbackHandler the same way as the
dynamic class (no duplicate instantiation code, only a default class name)?

-- 
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 master updated: Update Tomcat Native to 1.2.25

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 4ced1c0  Update Tomcat Native to 1.2.25
4ced1c0 is described below

commit 4ced1c0b246339eda067637d6b873b07d37e9e9d
Author: Mark Thomas 
AuthorDate: Mon Sep 7 12:20:44 2020 +0100

Update Tomcat Native to 1.2.25
---
 build.properties.default   | 6 +++---
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 565eb53..57ec1c6 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -145,13 +145,13 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=1.2.24
+tomcat-native.version=1.2.25
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=5dae151a60f8bd5a9a29d63eca838c77174426025ee65a826f0698943494dd3656d50bcd417e220a926b9ce111ea167043d4b806264030e951873d06767b3d6f
+tomcat-native.src.checksum.value=e121c0a18c51b5f952833df44c3a0add1f9a6e1b61e300abbafa0bc7e8f32296e64c9f81e9ad7389c1bd24abc40739e4726a56158d08e33b7ef00e5fa8a1d33d
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=c2d581f1f602dce61abc36370ce485c805b90863301555fc3d44362b655f34f950d0096fad22895374086f33d4505792c27f83fe35d4aeb87a08215bea8ae74a
+tomcat-native.win.checksum.value=0171a7ff3db708c2051e1f7a188286c5174091e208e1822c3027dd7aa415562c94be8d397a61bbe57bf9ee40ab52e1b346123fb7f2b170a43c60e8596eb65618
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index ca23cb0..ad9e1d2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -273,6 +273,10 @@
 Update the internal fork of Apache Commons DBCP to 6d232e5 (2020-08-11,
 2.8.0-SNAPSHOT). Code clean-up various bug fixes. (markt)
   
+  
+Update the packaged version of the Tomcat Native Library to 1.2.25.
+(markt)
+  
 
   
 


-
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 Tomcat Native to 1.2.25

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 8299859  Update Tomcat Native to 1.2.25
8299859 is described below

commit 829985958ba090f2e5c8832fa6fb9ec736144b6f
Author: Mark Thomas 
AuthorDate: Mon Sep 7 12:20:44 2020 +0100

Update Tomcat Native to 1.2.25
---
 build.properties.default   | 6 +++---
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 256c16c..7da0b58 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -145,13 +145,13 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=1.2.24
+tomcat-native.version=1.2.25
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=5dae151a60f8bd5a9a29d63eca838c77174426025ee65a826f0698943494dd3656d50bcd417e220a926b9ce111ea167043d4b806264030e951873d06767b3d6f
+tomcat-native.src.checksum.value=e121c0a18c51b5f952833df44c3a0add1f9a6e1b61e300abbafa0bc7e8f32296e64c9f81e9ad7389c1bd24abc40739e4726a56158d08e33b7ef00e5fa8a1d33d
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=c2d581f1f602dce61abc36370ce485c805b90863301555fc3d44362b655f34f950d0096fad22895374086f33d4505792c27f83fe35d4aeb87a08215bea8ae74a
+tomcat-native.win.checksum.value=0171a7ff3db708c2051e1f7a188286c5174091e208e1822c3027dd7aa415562c94be8d397a61bbe57bf9ee40ab52e1b346123fb7f2b170a43c60e8596eb65618
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9ac2dd1..f9bcfd5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -264,6 +264,10 @@
 Update the internal fork of Apache Commons DBCP to 6d232e5 (2020-08-11,
 2.8.0-SNAPSHOT). Code clean-up various bug fixes. (markt)
   
+  
+Update the packaged version of the Tomcat Native Library to 1.2.25.
+(markt)
+  
 
   
 


-
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 Tomcat Native to 1.2.25

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 4363c53  Update Tomcat Native to 1.2.25
4363c53 is described below

commit 4363c5317e976d3f315e8aaf74e0cb142c5172aa
Author: Mark Thomas 
AuthorDate: Mon Sep 7 12:20:44 2020 +0100

Update Tomcat Native to 1.2.25
---
 build.properties.default   | 6 +++---
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 99dcb55..2ad68c1 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -149,13 +149,13 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=1.2.24
+tomcat-native.version=1.2.25
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=5dae151a60f8bd5a9a29d63eca838c77174426025ee65a826f0698943494dd3656d50bcd417e220a926b9ce111ea167043d4b806264030e951873d06767b3d6f
+tomcat-native.src.checksum.value=e121c0a18c51b5f952833df44c3a0add1f9a6e1b61e300abbafa0bc7e8f32296e64c9f81e9ad7389c1bd24abc40739e4726a56158d08e33b7ef00e5fa8a1d33d
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=c2d581f1f602dce61abc36370ce485c805b90863301555fc3d44362b655f34f950d0096fad22895374086f33d4505792c27f83fe35d4aeb87a08215bea8ae74a
+tomcat-native.win.checksum.value=0171a7ff3db708c2051e1f7a188286c5174091e208e1822c3027dd7aa415562c94be8d397a61bbe57bf9ee40ab52e1b346123fb7f2b170a43c60e8596eb65618
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 41b1cb1..a7a7430 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -238,6 +238,10 @@
 Update the internal fork of Apache Commons DBCP to 6d232e5 (2020-08-11,
 2.8.0-SNAPSHOT). Code clean-up various bug fixes. (markt)
   
+  
+Update the packaged version of the Tomcat Native Library to 1.2.25.
+(markt)
+  
 
   
 


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



buildbot exception in on tomcat-85-trunk

2020-09-07 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/2442

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] 4363c5317e976d3f315e8aaf74e0cb142c5172aa
Blamelist: Mark Thomas 

BUILD FAILED: exception compile upload_2

Sincerely,
 -The Buildbot




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



Re: buildbot exception in on tomcat-85-trunk

2020-09-07 Thread Mark Thomas
On 07/09/2020 14:08, build...@apache.org wrote:
> The Buildbot has detected a build exception on builder tomcat-85-trunk while 
> building tomcat. Full details are available at:
> https://ci.apache.org/builders/tomcat-85-trunk/builds/2442
> 
> Buildbot URL: https://ci.apache.org/
> 
> Buildslave for this Build: asf946_ubuntu
> 
> Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
> triggered this build
> Build Source Stamp: [branch 8.5.x] 4363c5317e976d3f315e8aaf74e0cb142c5172aa
> Blamelist: Mark Thomas 
> 
> BUILD FAILED: exception compile upload_2

TLS issues trying to download the new Native. I'll work around it on the
build slave.

Mark

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



[GitHub] [tomcat] rmaucher commented on a change in pull request #354: Optimize Server startup time using multi-threading for annotation scanning

2020-09-07 Thread GitBox


rmaucher commented on a change in pull request #354:
URL: https://github.com/apache/tomcat/pull/354#discussion_r484426457



##
File path: java/org/apache/catalina/startup/ContextConfig.java
##
@@ -122,6 +126,11 @@
 
 private static final Log log = LogFactory.getLog(ContextConfig.class);
 
+private static final int DEFAULT_CLASS_CACHE_SIZE = 16384;
+
+private static final float DEFAULT_LOAD_FACTOR = .75f;
+
+private static int CONCURRENCY_LEVEL = 1;

Review comment:
   Ok for the map size, maybe (it seems very large, 16k classes ?), I don't 
quite see the point of the rest. The concurrency may be up to the utility 
executor thread count, and I don't think this is an optimization which makes 
any difference.

##
File path: java/org/apache/catalina/startup/ContextConfig.java
##
@@ -1374,7 +1383,19 @@ protected void webConfig() {
 protected void processClasses(WebXml webXml, Set orderedFragments) 
{
 // Step 4. Process /WEB-INF/classes for annotations and
 // @HandlesTypes matches
-Map javaClassCache = new HashMap<>();
+
+Map javaClassCache;
+
+if (context.getParent() instanceof Host) {
+   Host host = (Host) context.getParent();
+Container container = host.getParent();
+CONCURRENCY_LEVEL = container.getStartStopThreads();
+javaClassCache = new ConcurrentHashMap<>(DEFAULT_CLASS_CACHE_SIZE, 
DEFAULT_LOAD_FACTOR,
+CONCURRENCY_LEVEL);
+} else {
+javaClassCache = new ConcurrentHashMap<>(DEFAULT_CLASS_CACHE_SIZE, 
DEFAULT_LOAD_FACTOR,
+CONCURRENCY_LEVEL);
+}

Review comment:
   Well, if it's changed to be always a ConcurrentHashMap, it probably 
won't be a measurable performance difference.

##
File path: java/org/apache/catalina/startup/ContextConfig.java
##
@@ -2136,26 +2157,98 @@ protected InputSource getWebXmlSource(String filename, 
boolean global) {
 }
 
 protected void processAnnotations(Set fragments,
-boolean handlesTypesOnly, Map 
javaClassCache) {
-for(WebXml fragment : fragments) {
-// Only need to scan for @HandlesTypes matches if any of the
-// following are true:
-// - it has already been determined only @HandlesTypes is required
-//   (e.g. main web.xml has metadata-complete="true"
-// - this fragment is for a container JAR (Servlet 3.1 section 8.1)
-// - this fragment has metadata-complete="true"
-boolean htOnly = handlesTypesOnly || !fragment.getWebappJar() ||
-fragment.isMetadataComplete();
-
-WebXml annotations = new WebXml();
-// no impact on distributable
-annotations.setDistributable(true);
-URL url = fragment.getURL();
-processAnnotationsUrl(url, annotations, htOnly, javaClassCache);
-Set set = new HashSet<>();
-set.add(annotations);
-// Merge annotations into fragment - fragment takes priority
-fragment.merge(set);
+boolean handlesTypesOnly, Map 
javaClassCache) {
+
+if (context.getParent() instanceof Host && ((Host) 
context.getParent()).isParallelAnnotationScanning()) {
+processAnnotationsInParallel(fragments, handlesTypesOnly, 
javaClassCache);
+return;
+}
+
+for (WebXml fragment : fragments) {
+scanWebXmlFragment(handlesTypesOnly, fragment, javaClassCache);
+}
+}
+
+private void scanWebXmlFragment(boolean handlesTypesOnly, WebXml fragment, 
Map javaClassCache) {
+
+// Only need to scan for @HandlesTypes matches if any of the
+// following are true:
+// - it has already been determined only @HandlesTypes is required
+//   (e.g. main web.xml has metadata-complete="true"
+// - this fragment is for a container JAR (Servlet 3.1 section 8.1)
+// - this fragment has metadata-complete="true"
+boolean htOnly = handlesTypesOnly || !fragment.getWebappJar() ||
+fragment.isMetadataComplete();
+
+WebXml annotations = new WebXml();
+// no impact on distributable
+annotations.setDistributable(true);
+URL url = fragment.getURL();
+processAnnotationsUrl(url, annotations, htOnly, javaClassCache);
+Set set = new HashSet<>();
+set.add(annotations);
+// Merge annotations into fragment - fragment takes priority
+fragment.merge(set);
+}
+
+/**
+ * Executable task to scan a segment for annotations. Each task does the
+ * same work as the for loop inside processAnnotations();
+ *
+ * @author Engebretson, John
+ * @author Kamnani, Jatin
+ */
+private class AnnotationScanTask implements Callable {
+private final WebXml fragment;
+private final boolean handlesTypesOnly;
+   

[tomcat] branch 8.5.x updated: Correct i18n message name

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 affd92a  Correct i18n message name
affd92a is described below

commit affd92a2b8f89e17aa92e10dce33b22e2043e169
Author: Mark Thomas 
AuthorDate: Mon Sep 7 14:41:39 2020 +0100

Correct i18n message name
---
 java/org/apache/coyote/http2/Stream.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 148eae8..9d8bcbe 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -222,7 +222,7 @@ public class Stream extends AbstractStream implements 
HeaderEmitter {
 
 void receiveReset(long errorCode) {
 if (log.isDebugEnabled()) {
-log.debug(sm.getString("stream.reset.debug", getConnectionId(), 
getIdentifier(),
+log.debug(sm.getString("stream.reset.receive", getConnectionId(), 
getIdentifier(),
 Long.toString(errorCode)));
 }
 // Set the new state first since read and write both check this


-
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: Better error for empty header name

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 027071c  Better error for empty header name
027071c is described below

commit 027071c96e838d9aa9c4510ccf31361c690b84cc
Author: remm 
AuthorDate: Mon Apr 29 13:30:06 2019 +0200

Better error for empty header name
---
 java/org/apache/coyote/http2/LocalStrings.properties | 1 +
 java/org/apache/coyote/http2/Stream.java | 5 +
 2 files changed, 6 insertions(+)

diff --git a/java/org/apache/coyote/http2/LocalStrings.properties 
b/java/org/apache/coyote/http2/LocalStrings.properties
index 3707435..9c34e93 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -80,6 +80,7 @@ stream.header.connection=Connection [{0}], Stream [{1}], HTTP 
header [connection
 stream.header.contentLength=Connection [{0}], Stream [{1}], The content length 
header value [{2}] does not agree with the size of the data received [{3}]
 stream.header.debug=Connection [{0}], Stream [{1}], HTTP header [{2}], Value 
[{3}]
 stream.header.duplicate=Connection [{0}], Stream [{1}], received multiple 
[{3}] headers
+stream.header.empty=Connection [{0}], Stream [{1}], Invalid empty header name
 stream.header.invalid=Connection [{0}], Stream [{1}], The header [{2}] 
contained invalid value [{3}]
 stream.header.noPath=Connection [{0}], Stream [{1}], The [:path] pseudo header 
was empty
 stream.header.required=Connection [{0}], Stream [{1}], One or more required 
headers was missing
diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 9d8bcbe..116bbae 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -367,6 +367,11 @@ public class Stream extends AbstractStream implements 
HeaderEmitter {
 return;
 }
 
+if (name.length() == 0) {
+throw new HpackException(sm.getString("stream.header.empty",
+getConnectionId(), getIdentifier()));
+}
+
 boolean pseudoHeader = name.charAt(0) == ':';
 
 if (pseudoHeader && headerState != HEADER_STATE_PSEUDO) {


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



[tomcat] branch master updated: Fixing flow control for zero length padding introduced an edge case

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
 new 5f744ed  Fixing flow control for zero length padding introduced an 
edge case
5f744ed is described below

commit 5f744ed20c747549b05d0cce8bd99eebf094ab85
Author: Mark Thomas 
AuthorDate: Mon Sep 7 15:30:41 2020 +0100

Fixing flow control for zero length padding introduced an edge case

Again, spotted by Travis CI
---
 test/org/apache/coyote/http2/TestCancelledUpload.java | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestCancelledUpload.java 
b/test/org/apache/coyote/http2/TestCancelledUpload.java
index 6c80d9c..5c85b65 100644
--- a/test/org/apache/coyote/http2/TestCancelledUpload.java
+++ b/test/org/apache/coyote/http2/TestCancelledUpload.java
@@ -79,12 +79,16 @@ public class TestCancelledUpload extends Http2TestBase {
 return;
 }
 
-// Validate any WindowSize frames (always arrive in pairs)
+// Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+// timing, can see a reset rather than than stream update.
 while (output.getTrace().startsWith("0-WindowSize-[")) {
 String trace = output.getTrace();
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return;
+}
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
 output.clearTrace();
 parser.readFrame(true);
@@ -119,13 +123,19 @@ public class TestCancelledUpload extends Http2TestBase {
 // There must be a reset. There may be some WindowSize frames
 parser.readFrame(true);
 
-// Validate any WindowSize frames (always arrive in pairs)
+// Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+// timing, can see a reset rather than than stream update.
 while (output.getTrace().startsWith("0-WindowSize-[")) {
 String trace = output.getTrace();
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return;
+}
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
+output.clearTrace();
+parser.readFrame(true);
 }
 
 // This should be the reset


-
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: Fixing flow control for zero length padding introduced an edge case

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt 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 7edcee8  Fixing flow control for zero length padding introduced an 
edge case
7edcee8 is described below

commit 7edcee86dc34faa00cf831bb39ced3a9c59af369
Author: Mark Thomas 
AuthorDate: Mon Sep 7 15:30:41 2020 +0100

Fixing flow control for zero length padding introduced an edge case

Again, spotted by Travis CI
---
 test/org/apache/coyote/http2/TestCancelledUpload.java | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestCancelledUpload.java 
b/test/org/apache/coyote/http2/TestCancelledUpload.java
index fa798c1..2a5b762 100644
--- a/test/org/apache/coyote/http2/TestCancelledUpload.java
+++ b/test/org/apache/coyote/http2/TestCancelledUpload.java
@@ -78,12 +78,16 @@ public class TestCancelledUpload extends Http2TestBase {
 return;
 }
 
-// Validate any WindowSize frames (always arrive in pairs)
+// Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+// timing, can see a reset rather than than stream update.
 while (output.getTrace().startsWith("0-WindowSize-[")) {
 String trace = output.getTrace();
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return;
+}
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
 output.clearTrace();
 parser.readFrame(true);
@@ -118,13 +122,19 @@ public class TestCancelledUpload extends Http2TestBase {
 // There must be a reset. There may be some WindowSize frames
 parser.readFrame(true);
 
-// Validate any WindowSize frames (always arrive in pairs)
+// Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+// timing, can see a reset rather than than stream update.
 while (output.getTrace().startsWith("0-WindowSize-[")) {
 String trace = output.getTrace();
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return;
+}
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
+output.clearTrace();
+parser.readFrame(true);
 }
 
 // This should be the reset


-
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 (027071c -> 6ff5ddf)

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 027071c  Better error for empty header name
 new a6a47dc  Back-port NPE fix 8.5.x where trailer fields are handled 
differently.
 new 6ff5ddf  Fixing flow control for zero length padding introduced an 
edge case

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/coyote/http2/Stream.java  | 10 --
 test/org/apache/coyote/http2/TestCancelledUpload.java | 14 --
 2 files changed, 20 insertions(+), 4 deletions(-)


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



[tomcat] 02/02: Fixing flow control for zero length padding introduced an edge case

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 6ff5ddf508418ad76094f15279ad59fcfd0ce134
Author: Mark Thomas 
AuthorDate: Mon Sep 7 15:30:41 2020 +0100

Fixing flow control for zero length padding introduced an edge case

Again, spotted by Travis CI
---
 test/org/apache/coyote/http2/TestCancelledUpload.java | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestCancelledUpload.java 
b/test/org/apache/coyote/http2/TestCancelledUpload.java
index fa798c1..2a5b762 100644
--- a/test/org/apache/coyote/http2/TestCancelledUpload.java
+++ b/test/org/apache/coyote/http2/TestCancelledUpload.java
@@ -78,12 +78,16 @@ public class TestCancelledUpload extends Http2TestBase {
 return;
 }
 
-// Validate any WindowSize frames (always arrive in pairs)
+// Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+// timing, can see a reset rather than than stream update.
 while (output.getTrace().startsWith("0-WindowSize-[")) {
 String trace = output.getTrace();
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return;
+}
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
 output.clearTrace();
 parser.readFrame(true);
@@ -118,13 +122,19 @@ public class TestCancelledUpload extends Http2TestBase {
 // There must be a reset. There may be some WindowSize frames
 parser.readFrame(true);
 
-// Validate any WindowSize frames (always arrive in pairs)
+// Validate any WindowSize frames. Usually arrive in pairs. Depending 
on
+// timing, can see a reset rather than than stream update.
 while (output.getTrace().startsWith("0-WindowSize-[")) {
 String trace = output.getTrace();
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return;
+}
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
+output.clearTrace();
+parser.readFrame(true);
 }
 
 // This should be the reset


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



[tomcat] 01/02: Back-port NPE fix 8.5.x where trailer fields are handled differently.

2020-09-07 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit a6a47dc7caf95fd076e58ed0b34f3a463e302623
Author: Mark Thomas 
AuthorDate: Mon Sep 7 15:00:59 2020 +0100

Back-port NPE fix 8.5.x where trailer fields are handled differently.
---
 java/org/apache/coyote/http2/Stream.java | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Stream.java 
b/java/org/apache/coyote/http2/Stream.java
index 116bbae..46719da 100644
--- a/java/org/apache/coyote/http2/Stream.java
+++ b/java/org/apache/coyote/http2/Stream.java
@@ -476,8 +476,14 @@ public class Stream extends AbstractStream implements 
HeaderEmitter {
 "stream.header.unknownPseudoHeader", 
getConnectionId(), getIdentifier(),
 name), Http2Error.PROTOCOL_ERROR, getIdAsInt());
 }
-// Assume other HTTP header
-coyoteRequest.getMimeHeaders().addValue(name).setString(value);
+
+// Avoid NPE if Stream has been closed on Stream specific thread
+Request coyoteRequest = this.coyoteRequest;
+if (coyoteRequest != null) {
+// HTTP/2 headers are already always lower case
+// In 8.5.x trailer headers are added to headers collection.
+coyoteRequest.getMimeHeaders().addValue(name).setString(value);
+}
 }
 }
 }


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



buildbot success in on tomcat-85-trunk

2020-09-07 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-85-trunk while 
building tomcat. Full details are available at:
https://ci.apache.org/builders/tomcat-85-trunk/builds/2443

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' 
triggered this build
Build Source Stamp: [branch 8.5.x] 027071c96e838d9aa9c4510ccf31361c690b84cc
Blamelist: Mark Thomas ,remm 

Build succeeded!

Sincerely,
 -The Buildbot




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



[Bug 64710] NullPointerException in Http2UpgradeHandler.endRequestBodyFrame and BufferOverflowException in SocketBufferHandler

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64710

--- Comment #9 from Arshiya  ---
If there is any update Please let us  know .

-- 
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



[Bug 64710] NullPointerException in Http2UpgradeHandler.endRequestBodyFrame and BufferOverflowException in SocketBufferHandler

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64710

--- Comment #10 from Mark Thomas  ---
"latest source code" is not specific. If you are going to build from source and
then report a bug you need to provide the hash you build from.

-- 
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



[Bug 64710] NullPointerException in Http2UpgradeHandler.endRequestBodyFrame and BufferOverflowException in SocketBufferHandler

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64710

--- Comment #11 from Mark Thomas  ---
No JMeter version specified.
No mention that an additional plugin is required.
No source provided for JAR file - it is very unlikely a Tomcat developer is
going to download a random JAR from a bug report and run it.

Despite the above, I have been able to reproduce this with some changes to the
JMeter configuration to make requests against the examples web application that
ships with Tomcat.

I'm currently considering alternative ways to fix reduce the memory footprint
of closed streams that doesn't involve nulling out references.

-- 
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



[Bug 64717] New: gurilaz

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64717

Bug ID: 64717
   Summary: gurilaz
   Product: Tomcat Modules
   Version: unspecified
  Hardware: Other
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: jdbc-pool
  Assignee: dev@tomcat.apache.org
  Reporter: paktua6...@gmail.com
  Target Milestone: ---

Created attachment 37431
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37431&action=edit
gurilaz gans

-- 
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



[Bug 64717] gurilaz

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64717

gurilaz  changed:

   What|Removed |Added

 CC||paktua6...@gmail.com

-- 
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



[Bug 64717] gurilaz

2020-09-07 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64717

Julian Reschke  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|NEW |RESOLVED

-- 
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