[tomcat] branch 7.0.x updated: Fix trailing space. Add id.

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

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 5331684  Fix trailing space. Add id.
5331684 is described below

commit 53316841db049d60487dd392713b1e061221443d
Author: Mark Thomas 
AuthorDate: Thu Feb 27 07:38:41 2020 +

Fix trailing space. Add id.
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 79de737..65f5261 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -74,7 +74,7 @@
   
   
 64153: Ensure that the parent for the web application class
-loader is set consistently. 
+loader is set consistently. (markt)
   
   
 64166: Ensure that the names returned by


-
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 trailing space. Add id.

2020-02-26 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 a148516  Fix trailing space. Add id.
a148516 is described below

commit a14851653b1c9b7551767eb6f19c4c7ee08946af
Author: Mark Thomas 
AuthorDate: Thu Feb 27 07:38:41 2020 +

Fix trailing space. Add id.
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 31cc098..4544a52 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -72,7 +72,7 @@
   
   
 64153: Ensure that the parent for the web application class
-loader is set consistently. 
+loader is set consistently. (markt)
   
   
 64166: Ensure that the names returned by


-
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 trailing space. Add id.

2020-02-26 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 ce96ded  Fix trailing space. Add id.
ce96ded is described below

commit ce96ded17a38717483809d0ac38b53c69f657834
Author: Mark Thomas 
AuthorDate: Thu Feb 27 07:38:41 2020 +

Fix trailing space. Add id.
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index bcb307a..ae28665 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -66,7 +66,7 @@
   
   
 64153: Ensure that the parent for the web application class
-loader is set consistently. 
+loader is set consistently. (markt)
   
   
 64166: Ensure that the names returned by


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



[tomcat] branch master updated: Fix trailing space. Add id.

2020-02-26 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 e5ad14c  Fix trailing space. Add id.
e5ad14c is described below

commit e5ad14c86fd8887fea2eff4c43de9e3b6c110499
Author: Mark Thomas 
AuthorDate: Thu Feb 27 07:38:41 2020 +

Fix trailing space. Add id.
---
 webapps/docs/changelog.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 08e27ba..62a9f8a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -61,7 +61,7 @@
   
   
 64153: Ensure that the parent for the web application class
-loader is set consistently. 
+loader is set consistently. (markt)
   
   
 64166: Ensure that the names returned by


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



[Bug 64153] ServerContainer is not available in ServletContext

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64153

--- Comment #8 from Boris Petrov  ---
Thanks for the workaround, works like a charm! And thanks for the support and
quick fix!

-- 
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 64180] secretRequred=false is ignored if secret=

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64180

--- Comment #4 from Tom  ---
The proposed enhancement still does not address the ability to parametrize the
server.xml.  

Once the keyword secret= is there, it becomes mandatory even if it's "".  

With your proposal would my server.xml below work as expected if
secretRequired=false? (no secret required) or would tomcat fail to start
because secret="" is invalid?

-- 
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 64153] ServerContainer is not available in ServletContext

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64153

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #7 from Mark Thomas  ---
Fixed in:
- master for 10.0.0-M2 onwards
- 9.0.x for 9.0.32 onwards
- 8.5.x for 8.5.52 onwards
- 7.0.x for 7.0.101 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 7.0.x updated: BZ 64153. Ensure Context.getParentClassLoader() is consistent

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

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 32c44a0  BZ 64153. Ensure Context.getParentClassLoader() is consistent
32c44a0 is described below

commit 32c44a0d4d3a55fbd1d4effa62884624b92a7829
Author: Mark Thomas 
AuthorDate: Wed Feb 26 17:43:41 2020 +

BZ 64153. Ensure Context.getParentClassLoader() is consistent

Deprecate the setting of the parent class loader via the Loader and if
it is set via the loader, keep it in sync with the Context.
Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=64153
---
 java/org/apache/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/loader/WebappLoader.java  | 11 +--
 webapps/docs/changelog.xml |  4 
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index d96deab..fce298c 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -5455,7 +5455,7 @@ public class StandardContext extends ContainerBase
 }
 
 if (getLoader() == null) {
-WebappLoader webappLoader = new 
WebappLoader(getParentClassLoader());
+WebappLoader webappLoader = new WebappLoader();
 webappLoader.setDelegate(getDelegate());
 setLoader(webappLoader);
 }
diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index 6c87beb..d2d2751 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -85,8 +85,8 @@ public class WebappLoader extends LifecycleMBeanBase
 
 
 /**
- * Construct a new WebappLoader with no defined parent class loader
- * (so that the actual parent will be the system class loader).
+ * Construct a new WebappLoader. The parent class loader will be defined by
+ * {@link Context#getParentClassLoader()}.
  */
 public WebappLoader() {
 
@@ -100,7 +100,12 @@ public class WebappLoader extends LifecycleMBeanBase
  * to be defined as the parent of the ClassLoader we ultimately create.
  *
  * @param parent The parent class loader
+ *
+ * @deprecated Use {@link Context#setParentClassLoader(ClassLoader)} to
+ * specify the required class loader. This method will be
+ * removed in Tomcat 10 onwards.
  */
+@Deprecated
 public WebappLoader(ClassLoader parent) {
 super();
 this.parentClassLoader = parent;
@@ -746,6 +751,8 @@ public class WebappLoader extends LifecycleMBeanBase
 
 if (parentClassLoader == null) {
 parentClassLoader = container.getParentClassLoader();
+} else {
+container.setParentClassLoader(parentClassLoader);
 }
 Class[] argTypes = { ClassLoader.class };
 Object[] args = { parentClassLoader };
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 66b009b..79de737 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -73,6 +73,10 @@
 and the GET response uses chunking. (markt)
   
   
+64153: Ensure that the parent for the web application class
+loader is set consistently. 
+  
+  
 64166: Ensure that the names returned by
 HttpServletResponse.getHeaderNames() are unique. (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: BZ 64153. Ensure Context.getParentClassLoader() is consistent

2020-02-26 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 c408737  BZ 64153. Ensure Context.getParentClassLoader() is consistent
c408737 is described below

commit c4087371103c164dbf67fee79607f3a758a55604
Author: Mark Thomas 
AuthorDate: Wed Feb 26 17:43:41 2020 +

BZ 64153. Ensure Context.getParentClassLoader() is consistent

Deprecate the setting of the parent class loader via the Loader and if
it is set via the loader, keep it in sync with the Context.
Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=64153
---
 java/org/apache/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/loader/WebappLoader.java  | 11 +--
 webapps/docs/changelog.xml |  4 
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index 24a5296..704cadc 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -4947,7 +4947,7 @@ public class StandardContext extends ContainerBase
 }
 
 if (getLoader() == null) {
-WebappLoader webappLoader = new 
WebappLoader(getParentClassLoader());
+WebappLoader webappLoader = new WebappLoader();
 webappLoader.setDelegate(getDelegate());
 setLoader(webappLoader);
 }
diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index d7e3b98..8ddf716 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -66,8 +66,8 @@ public class WebappLoader extends LifecycleMBeanBase
 // --- Constructors
 
 /**
- * Construct a new WebappLoader with no defined parent class loader
- * (so that the actual parent will be the system class loader).
+ * Construct a new WebappLoader. The parent class loader will be defined by
+ * {@link Context#getParentClassLoader()}.
  */
 public WebappLoader() {
 this(null);
@@ -79,7 +79,12 @@ public class WebappLoader extends LifecycleMBeanBase
  * to be defined as the parent of the ClassLoader we ultimately create.
  *
  * @param parent The parent class loader
+ *
+ * @deprecated Use {@link Context#setParentClassLoader(ClassLoader)} to
+ * specify the required class loader. This method will be
+ * removed in Tomcat 10 onwards.
  */
+@Deprecated
 public WebappLoader(ClassLoader parent) {
 super();
 this.parentClassLoader = parent;
@@ -509,6 +514,8 @@ public class WebappLoader extends LifecycleMBeanBase
 
 if (parentClassLoader == null) {
 parentClassLoader = context.getParentClassLoader();
+} else {
+context.setParentClassLoader(parentClassLoader);
 }
 Class[] argTypes = { ClassLoader.class };
 Object[] args = { parentClassLoader };
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 54dd17d..31cc098 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -71,6 +71,10 @@
 Missing store config attributes for Resources elements. (remm)
   
   
+64153: Ensure that the parent for the web application class
+loader is set consistently. 
+  
+  
 64166: Ensure that the names returned by
 HttpServletResponse.getHeaderNames() are unique. (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: BZ 64153. Ensure Context.getParentClassLoader() is consistent

2020-02-26 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 6b1827c  BZ 64153. Ensure Context.getParentClassLoader() is consistent
6b1827c is described below

commit 6b1827c3e0ec392e83babd093d10a9a1c66bd8c9
Author: Mark Thomas 
AuthorDate: Wed Feb 26 17:43:41 2020 +

BZ 64153. Ensure Context.getParentClassLoader() is consistent

Deprecate the setting of the parent class loader via the Loader and if
it is set via the loader, keep it in sync with the Context.
Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=64153
---
 java/org/apache/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/loader/WebappLoader.java  | 11 +--
 webapps/docs/changelog.xml |  4 
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index a3f03fc..1ce347e 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -4936,7 +4936,7 @@ public class StandardContext extends ContainerBase
 }
 
 if (getLoader() == null) {
-WebappLoader webappLoader = new 
WebappLoader(getParentClassLoader());
+WebappLoader webappLoader = new WebappLoader();
 webappLoader.setDelegate(getDelegate());
 setLoader(webappLoader);
 }
diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index d967e15..d59f24d 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -68,8 +68,8 @@ public class WebappLoader extends LifecycleMBeanBase
 // --- Constructors
 
 /**
- * Construct a new WebappLoader with no defined parent class loader
- * (so that the actual parent will be the system class loader).
+ * Construct a new WebappLoader. The parent class loader will be defined by
+ * {@link Context#getParentClassLoader()}.
  */
 public WebappLoader() {
 this(null);
@@ -81,7 +81,12 @@ public class WebappLoader extends LifecycleMBeanBase
  * to be defined as the parent of the ClassLoader we ultimately create.
  *
  * @param parent The parent class loader
+ *
+ * @deprecated Use {@link Context#setParentClassLoader(ClassLoader)} to
+ * specify the required class loader. This method will be
+ * removed in Tomcat 10 onwards.
  */
+@Deprecated
 public WebappLoader(ClassLoader parent) {
 super();
 this.parentClassLoader = parent;
@@ -506,6 +511,8 @@ public class WebappLoader extends LifecycleMBeanBase
 
 if (parentClassLoader == null) {
 parentClassLoader = context.getParentClassLoader();
+} else {
+context.setParentClassLoader(parentClassLoader);
 }
 Class[] argTypes = { ClassLoader.class };
 Object[] args = { parentClassLoader };
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6c9b1ad..bcb307a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -65,6 +65,10 @@
 Missing store config attributes for Resources elements. (remm)
   
   
+64153: Ensure that the parent for the web application class
+loader is set consistently. 
+  
+  
 64166: Ensure that the names returned by
 HttpServletResponse.getHeaderNames() are unique. (markt)
   


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



[tomcat] branch master updated: Update changelog

2020-02-26 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 8976a91  Update changelog
8976a91 is described below

commit 8976a91ca762fc733010ede38fe04e2ec2f48cbb
Author: Mark Thomas 
AuthorDate: Wed Feb 26 18:48:56 2020 +

Update changelog
---
 webapps/docs/changelog.xml | 4 
 1 file changed, 4 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 60c9097..08e27ba 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -60,6 +60,10 @@
 Patch provided by ThStock. (schultz)
   
   
+64153: Ensure that the parent for the web application class
+loader is set consistently. 
+  
+  
 64166: Ensure that the names returned by
 HttpServletResponse.getHeaderNames() are unique. (markt)
   


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



[tomcat] 02/02: Remove deprecated code.

2020-02-26 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

commit 51f96d1c44f90ab3e71a10168b09866d61c21315
Author: Mark Thomas 
AuthorDate: Wed Feb 26 17:45:22 2020 +

Remove deprecated code.
---
 java/org/apache/catalina/loader/WebappLoader.java | 41 ++-
 1 file changed, 2 insertions(+), 39 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index d681baa..75bb589 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -66,34 +66,6 @@ public class WebappLoader extends LifecycleMBeanBase
 
 private static final Log log = LogFactory.getLog(WebappLoader.class);
 
-// --- Constructors
-
-/**
- * Construct a new WebappLoader. The parent class loader will be defined by
- * {@link Context#getParentClassLoader()}.
- */
-public WebappLoader() {
-this(null);
-}
-
-
-/**
- * Construct a new WebappLoader with the specified class loader
- * to be defined as the parent of the ClassLoader we ultimately create.
- *
- * @param parent The parent class loader
- *
- * @deprecated Use {@link Context#setParentClassLoader(ClassLoader)} to
- * specify the required class loader. This method will be
- * removed in Tomcat 10 onwards.
- */
-@Deprecated
-public WebappLoader(ClassLoader parent) {
-super();
-this.parentClassLoader = parent;
-}
-
-
 // - Instance Variables
 
 /**
@@ -124,12 +96,6 @@ public class WebappLoader extends LifecycleMBeanBase
 
 
 /**
- * The parent class loader of the class loader we will create.
- */
-private ClassLoader parentClassLoader = null;
-
-
-/**
  * The reloadable flag for this Loader.
  */
 private boolean reloadable = false;
@@ -510,11 +476,8 @@ public class WebappLoader extends LifecycleMBeanBase
 Class clazz = Class.forName(loaderClass);
 WebappClassLoaderBase classLoader = null;
 
-if (parentClassLoader == null) {
-parentClassLoader = context.getParentClassLoader();
-} else {
-context.setParentClassLoader(parentClassLoader);
-}
+ClassLoader parentClassLoader = context.getParentClassLoader();
+
 Class[] argTypes = { ClassLoader.class };
 Object[] args = { parentClassLoader };
 Constructor constr = clazz.getConstructor(argTypes);


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



[tomcat] 01/02: BZ 64153. Ensure Context.getParentClassLoader() is consistent

2020-02-26 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

commit f6e1482d4c78f1fb459384dd87ef3dc4cad81008
Author: Mark Thomas 
AuthorDate: Wed Feb 26 17:43:41 2020 +

BZ 64153. Ensure Context.getParentClassLoader() is consistent

Deprecate the setting of the parent class loader via the Loader and if
it is set via the loader, keep it in sync with the Context.
Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=64153
---
 java/org/apache/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/loader/WebappLoader.java  | 11 +--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index 5f2e8b1..abb276c 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -4842,7 +4842,7 @@ public class StandardContext extends ContainerBase
 }
 
 if (getLoader() == null) {
-WebappLoader webappLoader = new 
WebappLoader(getParentClassLoader());
+WebappLoader webappLoader = new WebappLoader();
 webappLoader.setDelegate(getDelegate());
 setLoader(webappLoader);
 }
diff --git a/java/org/apache/catalina/loader/WebappLoader.java 
b/java/org/apache/catalina/loader/WebappLoader.java
index 455e657..d681baa 100644
--- a/java/org/apache/catalina/loader/WebappLoader.java
+++ b/java/org/apache/catalina/loader/WebappLoader.java
@@ -69,8 +69,8 @@ public class WebappLoader extends LifecycleMBeanBase
 // --- Constructors
 
 /**
- * Construct a new WebappLoader with no defined parent class loader
- * (so that the actual parent will be the system class loader).
+ * Construct a new WebappLoader. The parent class loader will be defined by
+ * {@link Context#getParentClassLoader()}.
  */
 public WebappLoader() {
 this(null);
@@ -82,7 +82,12 @@ public class WebappLoader extends LifecycleMBeanBase
  * to be defined as the parent of the ClassLoader we ultimately create.
  *
  * @param parent The parent class loader
+ *
+ * @deprecated Use {@link Context#setParentClassLoader(ClassLoader)} to
+ * specify the required class loader. This method will be
+ * removed in Tomcat 10 onwards.
  */
+@Deprecated
 public WebappLoader(ClassLoader parent) {
 super();
 this.parentClassLoader = parent;
@@ -507,6 +512,8 @@ public class WebappLoader extends LifecycleMBeanBase
 
 if (parentClassLoader == null) {
 parentClassLoader = context.getParentClassLoader();
+} else {
+context.setParentClassLoader(parentClassLoader);
 }
 Class[] argTypes = { ClassLoader.class };
 Object[] args = { parentClassLoader };


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



[tomcat] branch master updated (235666f -> 51f96d1)

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

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


from 235666f  Fix AJP Connector when requests forwarded from IIS originally 
use TLS
 new f6e1482  BZ 64153. Ensure Context.getParentClassLoader() is consistent
 new 51f96d1  Remove deprecated code.

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/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/loader/WebappLoader.java  | 34 ++
 2 files changed, 3 insertions(+), 33 deletions(-)


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



[Bug 64180] secretRequred=false is ignored if secret=

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64180

Mark Thomas  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #3 from Mark Thomas  ---
The current behaviour is as expected / intended.

I can see merit in changing the behaviour so empty string and null (not set)
are equivalent for secret. We could also clarify that secretRequired indicates
whether the secret attribute MUST be set, not whether the client must provide a
secret and that (independent of secretRequired) the client MUST provide the
correct secret if secret is non-null and non-zero length.

Moving this to a proposed enhancement request for the changes described in this
comment.

-- 
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 64180] secretRequred=false is ignored if secret=

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64180

Tom  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

--- Comment #2 from Tom  ---
Would this be a change that you would be willing to consider?  

The current behaviour is non-intuitive and makes working with parametrized
server.xml files impossible.  

As soon as secret is in there anywhere (even an invalid one, it accepts "")
then it's mandatory.   

As an admin and package maintainer I feel that the the secretRequired field
should trump any setting in secret based on the current description in the
documentation.

-- 
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 64153] ServerContainer is not available in ServletContext

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64153

--- Comment #6 from Mark Thomas  ---
As a work-around, use:

root_ctx.parentClassLoader = JRuby.runtime.jruby_class_loader

rather than

root_ctx.loader = WebappLoader.new(JRuby.runtime.jruby_class_loader)

The second approach is probably going to be deprecated.

-- 
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 64180] secretRequred=false is ignored if secret=

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64180

Remy Maucherat  changed:

   What|Removed |Added

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

--- Comment #1 from Remy Maucherat  ---
If a secret is configured, it needs to be submitted by the client.
secretRequired only forces the user (by default) to configure a secret in
server.xml.

-- 
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 64180] secretRequred=false is ignored if secret=

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64180

Tom  changed:

   What|Removed |Added

 CC||tpar...@cbnco.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 64180] New: secretRequred=false is ignored if secret=

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=64180

Bug ID: 64180
   Summary: secretRequred=false is ignored if secret=
   Product: Tomcat 9
   Version: 9.0.31
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: tpar...@cbnco.com
  Target Milestone: -

I have defined my server.xml as follows to allow the ajp.secretRequired and
ajp.secret values as command line properties so I don't have to edit the
server.xml on each server.




If ajp.secretRequired=true and ajp.secret is set to something it all works as
expected.  However, if ajp.secretRequired=false and ajp.secret="" (or is not
set at all) the AJP connector still requires the secret to be passed.  

Steps to reproduce:  

1.  Set secretRequired=false secret="" in the server.xml 
2.  Try to connect from a client that does not pass a secret

-- 
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 36086] FixCRLF by Admin-User messes up the ACL (Access Control List) on Windows for restricted-user

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=36086

Stefan Bodewig  changed:

   What|Removed |Added

Version|9.0.11  |1.7.0RC1
   Target Milestone|-   |---
 OS|Linux   |Windows Server 2003
Product|Tomcat 9|Ant
  Component|Catalina|Core tasks
   Assignee|dev@tomcat.apache.org   |notificati...@ant.apache.or
   ||g
   Hardware|Sun |Other

-- 
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 36086] FixCRLF by Admin-User messes up the ACL (Access Control List) on Windows for restricted-user

2020-02-26 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=36086

Albaro Amaral  changed:

   What|Removed |Added

Version|1.7.0RC1|9.0.11
Product|Ant |Tomcat 9
  Component|Core tasks  |Catalina
   Hardware|Other   |Sun
   Assignee|notificati...@ant.apache.or |dev@tomcat.apache.org
   |g   |
   Target Milestone|--- |-
 OS|Windows 2000|Linux

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



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

2020-02-26 Thread Mark Thomas
Ping.

We need at least one more biding vote before this release vote can pass.

Mark


On 20/02/2020 16:55, Mark Thomas wrote:
> Tag:
> https://gitbox.apache.org/repos/asf?p=tomcat-connectors.git;a=commit;h=90b294ce8260ab2585dcb4071ede5d53e51fa354
> 
> Source:
> https://gitbox.apache.org/repos/asf?p=tomcat-connectors.git;a=summary
> 
> 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.46) and some clean-up. It also includes Windows binaries for IIS.
> 
> 
> The proposed JK 1.2.48 release is:
> [ ] Broken - do not release
> [ ] Stable - go ahead and release as 1.2.48
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


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

2020-02-26 Thread Mark Thomas
On 20/02/2020 16:55, Mark Thomas wrote:
> Tag:
> https://gitbox.apache.org/repos/asf?p=tomcat-connectors.git;a=commit;h=90b294ce8260ab2585dcb4071ede5d53e51fa354
> 
> Source:
> https://gitbox.apache.org/repos/asf?p=tomcat-connectors.git;a=summary
> 
> 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.46) and some clean-up. It also includes Windows binaries for IIS.
> 
> 
> The proposed JK 1.2.48 release is:
> [ ] Broken - do not release
> [X] Stable - go ahead and release as 1.2.48

Tested locally with httpd 2.4 and Tomcat 10.

Mark

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



Download stats

2020-02-26 Thread Mark Thomas
Hi all,

I took a look a the download stats from downloads.apache.org.

I didn't look at what was being downloaded (hashes, signatures or
releases). I just compared number of requests for each version over a 24
hour period (yesterday). The results were:

Tomcat 30.01%
Tomcat 40.03%
Tomcat 50.11%
Tomcat 60.39%
Tomcat 7   26.5%
Tomcat 8   29.9%
Tomcat 9   39.0%
Tomcat 10   4.1%

I checked a couple of the IPs downloading Tomcat 10 at random. They did
appear to be downloading specific files rather than scraping everything.

Overall, there is (apparently) a higher than I expected take up of
Tomcat 10.

I'll try and redo these figures on a regular(ish) basis so we get an
idea of trends.

Mark

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



[tomcat] branch 7.0.x updated: Fix AJP Connector when requests forwarded from IIS originally use TLS

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

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 0d4255d  Fix AJP Connector when requests forwarded from IIS originally 
use TLS
0d4255d is described below

commit 0d4255dabddcc0dddf58c75dc258b8aeca38d232
Author: Mark Thomas 
AuthorDate: Wed Feb 26 12:34:11 2020 +

Fix AJP Connector when requests forwarded from IIS originally use TLS

Add the TLS request attributes used by IIS to the attributes that an AJP
Connector will always accept.
---
 java/org/apache/coyote/ajp/AbstractAjpProcessor.java | 16 
 webapps/docs/changelog.xml   |  8 
 webapps/docs/config/ajp.xml  |  9 +
 3 files changed, 33 insertions(+)

diff --git a/java/org/apache/coyote/ajp/AbstractAjpProcessor.java 
b/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
index e68b458..5be3af1 100644
--- a/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
@@ -85,6 +85,7 @@ public abstract class AbstractAjpProcessor extends 
AbstractProcessor {
 
 
 private static final Set javaxAttributes;
+private static final Set iisTlsAttributes;
 
 
 static {
@@ -135,6 +136,18 @@ public abstract class AbstractAjpProcessor extends 
AbstractProcessor {
 s.add("javax.servlet.request.ssl_session");
 s.add("javax.servlet.request.X509Certificate");
 javaxAttributes= Collections.unmodifiableSet(s);
+
+Set iis = new HashSet();
+iis.add("CERT_ISSUER");
+iis.add("CERT_SUBJECT");
+iis.add("CERT_COOKIE");
+iis.add("HTTPS_SERVER_SUBJECT");
+iis.add("CERT_FLAGS");
+iis.add("HTTPS_SECRETKEYSIZE");
+iis.add("CERT_SERIALNUMBER");
+iis.add("HTTPS_SERVER_ISSUER");
+iis.add("HTTPS_KEYSIZE");
+iisTlsAttributes = Collections.unmodifiableSet(iis);
 }
 
 
@@ -893,6 +906,9 @@ public abstract class AbstractAjpProcessor extends 
AbstractProcessor {
 request.setAttribute(n, v);
 } else if (javaxAttributes.contains(n)) {
 request.setAttribute(n, v);
+} else if (iisTlsAttributes.contains(n)) {
+// Allow IIS TLS attributes
+request.setAttribute(n, v);
 } else {
 // All 'known' attributes will be processed by the previous
 // blocks. Any remaining attribute is an 'arbitrary' one.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 10d3845..66b009b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -82,6 +82,14 @@
   
 
   
+  
+
+  
+Add the TLS request attributes used by IIS to the attributes that an 
AJP
+Connector will always accept. (markt)
+  
+
+  
 
 
   
diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml
index b3dd171..43f202d 100644
--- a/webapps/docs/config/ajp.xml
+++ b/webapps/docs/config/ajp.xml
@@ -321,6 +321,15 @@
 AJP_REMOTE_PORT
 AJP_SSL_PROTOCOL
 JK_LB_ACTIVATION
+CERT_ISSUER (IIS only)
+CERT_SUBJECT (IIS only)
+CERT_COOKIE (IIS only)
+HTTPS_SERVER_SUBJECT (IIS only)
+CERT_FLAGS (IIS only)
+HTTPS_SECRETKEYSIZE (IIS only)
+CERT_SERIALNUMBER (IIS only)
+HTTPS_SERVER_ISSUER (IIS only)
+HTTPS_KEYSIZE (IIS only)
   
   The AJP protocol supports the passing of arbitrary request attributes.
   Requests containing arbitrary request attributes will be rejected with a


-
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 AJP Connector when requests forwarded from IIS originally use TLS

2020-02-26 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 f32ead8  Fix AJP Connector when requests forwarded from IIS originally 
use TLS
f32ead8 is described below

commit f32ead886ab1f0955fe8e89c29bdcf2a689e198c
Author: Mark Thomas 
AuthorDate: Wed Feb 26 12:34:11 2020 +

Fix AJP Connector when requests forwarded from IIS originally use TLS

Add the TLS request attributes used by IIS to the attributes that an AJP
Connector will always accept.
---
 java/org/apache/coyote/ajp/AjpProcessor.java | 16 
 webapps/docs/changelog.xml   |  4 
 webapps/docs/config/ajp.xml  |  9 +
 3 files changed, 29 insertions(+)

diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index 0ed3c3e..396e51b 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -85,6 +85,7 @@ public class AjpProcessor extends AbstractProcessor {
 
 
 private static final Set javaxAttributes;
+private static final Set iisTlsAttributes;
 
 
 static {
@@ -135,6 +136,18 @@ public class AjpProcessor extends AbstractProcessor {
 s.add("javax.servlet.request.ssl_session");
 s.add("javax.servlet.request.X509Certificate");
 javaxAttributes= Collections.unmodifiableSet(s);
+
+Set iis = new HashSet<>();
+iis.add("CERT_ISSUER");
+iis.add("CERT_SUBJECT");
+iis.add("CERT_COOKIE");
+iis.add("HTTPS_SERVER_SUBJECT");
+iis.add("CERT_FLAGS");
+iis.add("HTTPS_SECRETKEYSIZE");
+iis.add("CERT_SERIALNUMBER");
+iis.add("HTTPS_SERVER_ISSUER");
+iis.add("HTTPS_KEYSIZE");
+iisTlsAttributes = Collections.unmodifiableSet(iis);
 }
 
 
@@ -841,6 +854,9 @@ public class AjpProcessor extends AbstractProcessor {
 request.setAttribute(n, v);
 } else if (javaxAttributes.contains(n)) {
 request.setAttribute(n, v);
+} else if (iisTlsAttributes.contains(n)) {
+// Allow IIS TLS attributes
+request.setAttribute(n, v);
 } else {
 // All 'known' attributes will be processed by the previous
 // blocks. Any remaining attribute is an 'arbitrary' one.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index afa42bb..54dd17d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -92,6 +92,10 @@
 Improve robustness of OpenSSLEngine shutdown. Based on code submitted
 by Manuel Dominguez Sarmiento. (remm)
   
+  
+Add the TLS request attributes used by IIS to the attributes that an 
AJP
+Connector will always accept. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml
index 9332f16..707b3eb 100644
--- a/webapps/docs/config/ajp.xml
+++ b/webapps/docs/config/ajp.xml
@@ -338,6 +338,15 @@
 AJP_REMOTE_PORT
 AJP_SSL_PROTOCOL
 JK_LB_ACTIVATION
+CERT_ISSUER (IIS only)
+CERT_SUBJECT (IIS only)
+CERT_COOKIE (IIS only)
+HTTPS_SERVER_SUBJECT (IIS only)
+CERT_FLAGS (IIS only)
+HTTPS_SECRETKEYSIZE (IIS only)
+CERT_SERIALNUMBER (IIS only)
+HTTPS_SERVER_ISSUER (IIS only)
+HTTPS_KEYSIZE (IIS only)
   
   The AJP protocol supports the passing of arbitrary request attributes.
   Requests containing arbitrary request attributes will be rejected with a


-
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 AJP Connector when requests forwarded from IIS originally use TLS

2020-02-26 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 e305e62  Fix AJP Connector when requests forwarded from IIS originally 
use TLS
e305e62 is described below

commit e305e62769ecc431f2a5cceb5e2fece4359b61a7
Author: Mark Thomas 
AuthorDate: Wed Feb 26 12:34:11 2020 +

Fix AJP Connector when requests forwarded from IIS originally use TLS

Add the TLS request attributes used by IIS to the attributes that an AJP
Connector will always accept.
---
 java/org/apache/coyote/ajp/AjpProcessor.java | 16 
 webapps/docs/changelog.xml   |  4 
 webapps/docs/config/ajp.xml  |  9 +
 3 files changed, 29 insertions(+)

diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index 04e5a69..7bbdf0a 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -84,6 +84,7 @@ public class AjpProcessor extends AbstractProcessor {
 
 
 private static final Set javaxAttributes;
+private static final Set iisTlsAttributes;
 
 
 static {
@@ -134,6 +135,18 @@ public class AjpProcessor extends AbstractProcessor {
 s.add("javax.servlet.request.ssl_session");
 s.add("javax.servlet.request.X509Certificate");
 javaxAttributes= Collections.unmodifiableSet(s);
+
+Set iis = new HashSet<>();
+iis.add("CERT_ISSUER");
+iis.add("CERT_SUBJECT");
+iis.add("CERT_COOKIE");
+iis.add("HTTPS_SERVER_SUBJECT");
+iis.add("CERT_FLAGS");
+iis.add("HTTPS_SECRETKEYSIZE");
+iis.add("CERT_SERIALNUMBER");
+iis.add("HTTPS_SERVER_ISSUER");
+iis.add("HTTPS_KEYSIZE");
+iisTlsAttributes = Collections.unmodifiableSet(iis);
 }
 
 
@@ -748,6 +761,9 @@ public class AjpProcessor extends AbstractProcessor {
 request.setAttribute(n, v);
 } else if (javaxAttributes.contains(n)) {
 request.setAttribute(n, v);
+} else if (iisTlsAttributes.contains(n)) {
+// Allow IIS TLS attributes
+request.setAttribute(n, v);
 } else {
 // All 'known' attributes will be processed by the previous
 // blocks. Any remaining attribute is an 'arbitrary' one.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1c9ad17..6c9b1ad 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -86,6 +86,10 @@
 Improve robustness of OpenSSLEngine shutdown. Based on code submitted
 by Manuel Dominguez Sarmiento. (remm)
   
+  
+Add the TLS request attributes used by IIS to the attributes that an 
AJP
+Connector will always accept. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml
index 9760e80..12b554d 100644
--- a/webapps/docs/config/ajp.xml
+++ b/webapps/docs/config/ajp.xml
@@ -330,6 +330,15 @@
 AJP_REMOTE_PORT
 AJP_SSL_PROTOCOL
 JK_LB_ACTIVATION
+CERT_ISSUER (IIS only)
+CERT_SUBJECT (IIS only)
+CERT_COOKIE (IIS only)
+HTTPS_SERVER_SUBJECT (IIS only)
+CERT_FLAGS (IIS only)
+HTTPS_SECRETKEYSIZE (IIS only)
+CERT_SERIALNUMBER (IIS only)
+HTTPS_SERVER_ISSUER (IIS only)
+HTTPS_KEYSIZE (IIS only)
   
   The AJP protocol supports the passing of arbitrary request attributes.
   Requests containing arbitrary request attributes will be rejected with a


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



[tomcat] branch master updated: Fix AJP Connector when requests forwarded from IIS originally use TLS

2020-02-26 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 235666f  Fix AJP Connector when requests forwarded from IIS originally 
use TLS
235666f is described below

commit 235666fe9db4c58e4ba06f41732d96f900544269
Author: Mark Thomas 
AuthorDate: Wed Feb 26 12:34:11 2020 +

Fix AJP Connector when requests forwarded from IIS originally use TLS

Add the TLS request attributes used by IIS to the attributes that an AJP
Connector will always accept.
---
 java/org/apache/coyote/ajp/AjpProcessor.java | 18 ++
 webapps/docs/changelog.xml   |  4 
 webapps/docs/config/ajp.xml  |  9 +
 3 files changed, 31 insertions(+)

diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index ebe1353..9db523b 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -27,7 +27,9 @@ import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
+import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -84,6 +86,7 @@ public class AjpProcessor extends AbstractProcessor {
 
 
 private static final Map jakartaAttributeMapping;
+private static final Set iisTlsAttributes;
 
 
 static {
@@ -138,6 +141,18 @@ public class AjpProcessor extends AbstractProcessor {
 m.put("javax.servlet.request.ssl_session", 
"jakarta.servlet.request.ssl_session");
 m.put("javax.servlet.request.X509Certificate", 
"jakarta.servlet.request.X509Certificate");
 jakartaAttributeMapping = Collections.unmodifiableMap(m);
+
+Set s = new HashSet<>();
+s.add("CERT_ISSUER");
+s.add("CERT_SUBJECT");
+s.add("CERT_COOKIE");
+s.add("HTTPS_SERVER_SUBJECT");
+s.add("CERT_FLAGS");
+s.add("HTTPS_SECRETKEYSIZE");
+s.add("CERT_SERIALNUMBER");
+s.add("HTTPS_SERVER_ISSUER");
+s.add("HTTPS_KEYSIZE");
+iisTlsAttributes = Collections.unmodifiableSet(s);
 }
 
 
@@ -754,6 +769,9 @@ public class AjpProcessor extends AbstractProcessor {
 // AJP uses the Java Servlet attribute names.
 // Need to convert these to Jakarta Servlet.
 request.setAttribute(jakartaAttributeMapping.get(n), v);
+} else if (iisTlsAttributes.contains(n)) {
+// Allow IIS TLS attributes
+request.setAttribute(n, v);
 } else {
 // All 'known' attributes will be processed by the previous
 // blocks. Any remaining attribute is an 'arbitrary' one.
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index dd93f38..60c9097 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -79,6 +79,10 @@
 Improve robustness of OpenSSLEngine shutdown. Based on code submitted
 by Manuel Dominguez Sarmiento. (remm)
   
+  
+Add the TLS request attributes used by IIS to the attributes that an 
AJP
+Connector will always accept. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml
index 9760e80..12b554d 100644
--- a/webapps/docs/config/ajp.xml
+++ b/webapps/docs/config/ajp.xml
@@ -330,6 +330,15 @@
 AJP_REMOTE_PORT
 AJP_SSL_PROTOCOL
 JK_LB_ACTIVATION
+CERT_ISSUER (IIS only)
+CERT_SUBJECT (IIS only)
+CERT_COOKIE (IIS only)
+HTTPS_SERVER_SUBJECT (IIS only)
+CERT_FLAGS (IIS only)
+HTTPS_SECRETKEYSIZE (IIS only)
+CERT_SERIALNUMBER (IIS only)
+HTTPS_SERVER_ISSUER (IIS only)
+HTTPS_KEYSIZE (IIS only)
   
   The AJP protocol supports the passing of arbitrary request attributes.
   Requests containing arbitrary request attributes will be rejected with a


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



[tomcat] branch 7.0.x updated: Fix path used in findResources

2020-02-26 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new c9c52ba  Fix path used in findResources
c9c52ba is described below

commit c9c52ba3ec3f07f019dbd246574088fb07891d24
Author: remm 
AuthorDate: Wed Feb 26 13:08:59 2020 +0100

Fix path used in findResources

The leading / should be stripped when looking things up in the JARs.
---
 java/org/apache/catalina/loader/WebappClassLoaderBase.java | 5 +++--
 webapps/docs/changelog.xml | 4 
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/loader/WebappClassLoaderBase.java 
b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
index ded743d..91f2a83 100644
--- a/java/org/apache/catalina/loader/WebappClassLoaderBase.java
+++ b/java/org/apache/catalina/loader/WebappClassLoaderBase.java
@@ -1571,14 +1571,15 @@ public abstract class WebappClassLoaderBase extends 
URLClassLoader
 }
 
 // Looking at the JAR files
+String jarPath = (name.startsWith("/")) ? name.substring(1) : name;
 synchronized (jarFiles) {
 if (openJARs()) {
 for (i = 0; i < jarFilesLength; i++) {
-JarEntry jarEntry = jarFiles[i].getJarEntry(name);
+JarEntry jarEntry = jarFiles[i].getJarEntry(jarPath);
 if (jarEntry != null) {
 try {
 String jarFakeUrl = 
getURI(jarRealFiles[i]).toString();
-result.add(UriUtil.buildJarUrl(jarFakeUrl, name));
+result.add(UriUtil.buildJarUrl(jarFakeUrl, 
jarPath));
 } catch (MalformedURLException e) {
 // Ignore
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9896a36..10d3845 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -76,6 +76,10 @@
 64166: Ensure that the names returned by
 HttpServletResponse.getHeaderNames() are unique. (markt)
   
+  
+Fix SCI support regression that was caused by a JAR path lookup error
+in the classloader findResources. (remm)
+  
 
   
 


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



[GitHub] [tomcat] bohmber commented on issue #244: The '$' in the class name of Digester$EnvironmentPropertySource is no…

2020-02-26 Thread GitBox
bohmber commented on issue #244: The '$' in the class name of 
Digester$EnvironmentPropertySource is no…
URL: https://github.com/apache/tomcat/pull/244#issuecomment-591324659
 
 
   Ping


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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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