Re: [VOTE] Release Apache Tomcat 9.0.89

2024-05-03 Thread Igal Sapir
On Fri, May 3, 2024 at 1:38 PM Rémy Maucherat  wrote:

> The proposed Apache Tomcat 9.0.89 release is now available for voting.
>
> The notable changes compared to 9.0.88 are:
>
> - Refactor HTTP header parsing to use common parsing code and fix
>non-blocking reads of chunked request bodies including trailer fields
>
> - Add more timescale options to AccessLogValve and
>ExtendedAccessLogValve
>
> - WebDAV locking handling fixes
>
> For full details, see the changelog:
> https://nightlies.apache.org/tomcat/tomcat-9.0.x/docs/changelog.html
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.89/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1494
>
> The tag is:
> https://github.com/apache/tomcat/tree/9.0.89
> 661a5978828212bbe4a324dd7c854894f34a561b
>
> The proposed 9.0.89 release is:
> [ ] -1, Broken - do not release
> [X] +1, Stable - go ahead and release as 9.0.89
>

+1

Unit tests passed on Ubuntu 22.04 with Java 21.0.1

Igal



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


[VOTE] Release Apache Tomcat 9.0.89

2024-05-03 Thread Rémy Maucherat
The proposed Apache Tomcat 9.0.89 release is now available for voting.

The notable changes compared to 9.0.88 are:

- Refactor HTTP header parsing to use common parsing code and fix
   non-blocking reads of chunked request bodies including trailer fields

- Add more timescale options to AccessLogValve and
   ExtendedAccessLogValve

- WebDAV locking handling fixes

For full details, see the changelog:
https://nightlies.apache.org/tomcat/tomcat-9.0.x/docs/changelog.html

It can be obtained from:
https://dist.apache.org/repos/dist/dev/tomcat/tomcat-9/v9.0.89/

The Maven staging repo is:
https://repository.apache.org/content/repositories/orgapachetomcat-1494

The tag is:
https://github.com/apache/tomcat/tree/9.0.89
661a5978828212bbe4a324dd7c854894f34a561b

The proposed 9.0.89 release is:
[ ] -1, Broken - do not release
[ ] +1, Stable - go ahead and release as 9.0.89

Rémy

-
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: Next is 9.0.90

2024-05-03 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 1f72863b63 Next is 9.0.90
1f72863b63 is described below

commit 1f72863b631ab1351b0433c333dcfff8875aa7a9
Author: remm 
AuthorDate: Fri May 3 22:32:55 2024 +0200

Next is 9.0.90
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index 8349f05d66..3e0c6e8421 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -31,7 +31,7 @@
 # - Version Control Flags -
 version.major=9
 version.minor=0
-version.build=89
+version.build=90
 version.patch=0
 version.suffix=
 version.dev=-dev
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index b18bc924c5..ad34255b6f 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=9.0.89
+maven.asf.release.deploy.version=9.0.90
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 2538276305..71030d06ff 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,7 +104,9 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
+
+
   
 
   


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



svn commit: r68938 - in /dev/tomcat/tomcat-9/v9.0.89: ./ bin/ bin/embed/ src/

2024-05-03 Thread remm
Author: remm
Date: Fri May  3 20:31:13 2024
New Revision: 68938

Log:
Upload 9.0.89 for voting

Added:
dev/tomcat/tomcat-9/v9.0.89/
dev/tomcat/tomcat-9/v9.0.89/KEYS
dev/tomcat/tomcat-9/v9.0.89/README.html
dev/tomcat/tomcat-9/v9.0.89/RELEASE-NOTES
dev/tomcat/tomcat-9/v9.0.89/bin/
dev/tomcat/tomcat-9/v9.0.89/bin/README.html
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-deployer.tar.gz   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-deployer.tar.gz.asc   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-deployer.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-deployer.zip   (with 
props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-deployer.zip.asc   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-deployer.zip.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-fulldocs.tar.gz   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-fulldocs.tar.gz.asc   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-fulldocs.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-windows-x64.zip   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-windows-x64.zip.asc   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-windows-x64.zip.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-windows-x86.zip   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-windows-x86.zip.asc   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89-windows-x86.zip.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.exe   (with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.exe.asc   (with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.exe.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.tar.gz   (with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.tar.gz.asc   (with 
props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.zip   (with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.zip.asc   (with props)
dev/tomcat/tomcat-9/v9.0.89/bin/apache-tomcat-9.0.89.zip.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/embed/
dev/tomcat/tomcat-9/v9.0.89/bin/embed/apache-tomcat-9.0.89-embed.tar.gz   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/embed/apache-tomcat-9.0.89-embed.tar.gz.asc 
  (with props)

dev/tomcat/tomcat-9/v9.0.89/bin/embed/apache-tomcat-9.0.89-embed.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.89/bin/embed/apache-tomcat-9.0.89-embed.zip   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/embed/apache-tomcat-9.0.89-embed.zip.asc   
(with props)
dev/tomcat/tomcat-9/v9.0.89/bin/embed/apache-tomcat-9.0.89-embed.zip.sha512
dev/tomcat/tomcat-9/v9.0.89/src/
dev/tomcat/tomcat-9/v9.0.89/src/apache-tomcat-9.0.89-src.tar.gz   (with 
props)
dev/tomcat/tomcat-9/v9.0.89/src/apache-tomcat-9.0.89-src.tar.gz.asc   (with 
props)
dev/tomcat/tomcat-9/v9.0.89/src/apache-tomcat-9.0.89-src.tar.gz.sha512
dev/tomcat/tomcat-9/v9.0.89/src/apache-tomcat-9.0.89-src.zip   (with props)
dev/tomcat/tomcat-9/v9.0.89/src/apache-tomcat-9.0.89-src.zip.asc   (with 
props)
dev/tomcat/tomcat-9/v9.0.89/src/apache-tomcat-9.0.89-src.zip.sha512

Added: dev/tomcat/tomcat-9/v9.0.89/KEYS
==
--- dev/tomcat/tomcat-9/v9.0.89/KEYS (added)
+++ dev/tomcat/tomcat-9/v9.0.89/KEYS Fri May  3 20:31:13 2024
@@ -0,0 +1,237 @@
+This file contains the PGP keys of various Apache developers.
+Please don't use them for email unless you have to. Their main
+purpose is code signing.
+
+Apache users: pgp < KEYS
+Apache developers:
+(pgpk -ll  && pgpk -xa ) >> this file.
+  or
+(gpg --fingerprint --list-sigs 
+ && gpg --armor --export ) >> this file.
+
+Apache developers: please ensure that your key is also available via the
+PGP keyservers (such as pgpkeys.mit.edu).
+
+
+pub   1024D/33C60243 2004-09-12
+  Key fingerprint = DCFD 35E0 BF8C A734 4752  DE8B 6FB2 1E89 33C6 0243
+uid  Mark E D Thomas 
+uid  Mark E D Thomas 
+uid  Mark E D Thomas 
+sub   2048g/0BECE548 2004-09-12
+
+pub   4096R/2F6059E7 2009-09-18
+  Key fingerprint = A9C5 DF4D 22E9 9998 D987  5A51 10C0 1C5A 2F60 59E7
+uid  Mark E D Thomas 
+sub   4096R/5E763BEC 2009-09-18
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Version: GnuPG v1.4.9 (MingW32)
+
+mQGiBEFEjegRBADocGttfROvtLGrTOW3xRqZHmFWybmEaI6jmnRdN/1gGXmb3wQL
+rHsS3fLFIIOYLPph0Kov9q4qNq36LekShIvjMBDFoj2/wRxaUtFq81asaRZg8Mcw
+4kVeIoe8OIOuWmvYhU8SH2jJNUnVVrpTPAa6QWquTmseNi6UJMjLxuL7DwCg//9u
+k2yj0vk6e4WSO6Fe5+EkQDED/AjQsy0kj9TpNHkKSSUR2evRlWPYA0YtxBSbsgON
+tT0cYipAp5IcYt6Zq5QzHiZreyQXLAjItDS2oGCIXfNbTYJ3kxxJTCU/3wlefVdq

(tomcat) 01/01: Tag 9.0.89

2024-05-03 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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

commit 661a5978828212bbe4a324dd7c854894f34a561b
Author: remm 
AuthorDate: Fri May 3 22:27:39 2024 +0200

Tag 9.0.89
---
 build.properties.release |  54 +++
 res/install-win/Uninstall.exe.sig| Bin 0 -> 10202 bytes
 res/install-win/tomcat-installer.exe.sig | Bin 0 -> 10202 bytes
 res/maven/mvn.properties.release |  27 
 webapps/docs/changelog.xml   |   2 +-
 5 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/build.properties.release b/build.properties.release
new file mode 100644
index 00..2afdb243c3
--- /dev/null
+++ b/build.properties.release
@@ -0,0 +1,54 @@
+# -
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -
+
+# This file was auto-generated by the pre-release Ant target.
+
+# Any unwanted settings may be over-ridden in a build.properties file located
+# in the same directory as this file.
+
+# Set the version-dev to "" (empty string) as this is not a development 
release.
+version.dev=
+
+# Ensure consistent timestamps for reproducible builds.
+ant.tstamp.now.iso=2024-05-03T20:22:11Z
+
+# Enable insertion of detached signatures into the Windows installer.
+do.codesigning=true
+
+# Re-use the same GPG executable.
+gpg.exec=/usr/bin/gpg
+
+# Reproducible builds require the use of the build tools defined below. The
+# vendors (where appropriate) and versions must match exactly for a 
reproducible
+# build since this data is embedded in various files, particularly JAR file
+# manifests, as part of the build process.
+#
+# Apache Ant:  Apache Ant(TM) version 1.10.14 compiled on August 16 2023
+#
+# Java Name:   OpenJDK 64-Bit Server VM
+# Java Vendor: Eclipse Adoptium
+# Java Version:17.0.11+9
+
+# The following is provided for information only. Builds will be repeatable
+# whether or not the build environment is consistent with this information.
+#
+# OS:  amd64 Linux 6.8.7-300.fc40.x86_64
+# File encoding:   UTF-8
+#
+# Release Manager: remm
+release-java-version=17.0.11+9
+release-ant-version=1.10.14
diff --git a/res/install-win/Uninstall.exe.sig 
b/res/install-win/Uninstall.exe.sig
new file mode 100644
index 00..685a616bc7
Binary files /dev/null and b/res/install-win/Uninstall.exe.sig differ
diff --git a/res/install-win/tomcat-installer.exe.sig 
b/res/install-win/tomcat-installer.exe.sig
new file mode 100644
index 00..4906b30a1d
Binary files /dev/null and b/res/install-win/tomcat-installer.exe.sig differ
diff --git a/res/maven/mvn.properties.release b/res/maven/mvn.properties.release
new file mode 100644
index 00..e09a0f7e7b
--- /dev/null
+++ b/res/maven/mvn.properties.release
@@ -0,0 +1,27 @@
+# -
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -
+
+# This file was auto-generated by the pre-release Ant target.
+
+# Remove "-dev" from the version since this is not a development release.
+maven.asf.release.deploy.version=9.0.89
+
+# Re-use the same GPG executable.
+gpg.exec=/usr/bin/gpg
+
+# Set the user name 

(tomcat) tag 9.0.89 created (now 661a597882)

2024-05-03 Thread remm
This is an automated email from the ASF dual-hosted git repository.

remm pushed a change to tag 9.0.89
in repository https://gitbox.apache.org/repos/asf/tomcat.git


  at 661a597882 (commit)
This tag includes the following new commits:

 new 661a597882 Tag 9.0.89

The 1 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.



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



Re: [VOTE] Release Apache Tomcat 11.0.0-M20

2024-05-03 Thread Igal Sapir
On Fri, May 3, 2024 at 9:22 AM Mark Thomas  wrote:

> The proposed Apache Tomcat 11.0.0-M20 release is now available for
> voting.
>
> Apache Tomcat 11.0.0-M20 is a milestone release of the 11.0.x branch and
> has been made to provide users with early access to the new features in
> Apache Tomcat 11.0.x so that they may provide feedback. The notable
> changes compared to the previous milestone include:
>
> - Add OpenSSL FFM classes to tomcat-embed-core.jar
>
> - Refactor HTTP header parsing to use common parsing code and fix
>non-blocking reads of chunked request bodies including trailer fields
>
> - Add more timescale options to AccessLogValve and
>ExtendedAccessLogValve
>
>
> For full details, see the change log:
> https://nightlies.apache.org/tomcat/tomcat-11.0.x/docs/changelog.html
>
> Applications that run on Tomcat 9 and earlier will not run on Tomcat 11
> without changes. Java EE applications designed for Tomcat 9 and earlier
> may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat
> will automatically convert them to Jakarta EE and copy them to the
> webapps directory. Applications using deprecated APIs may require
> further changes.
>
> It can be obtained from:
> https://dist.apache.org/repos/dist/dev/tomcat/tomcat-11/v11.0.0-M20/
>
> The Maven staging repo is:
> https://repository.apache.org/content/repositories/orgapachetomcat-1493
>
> The tag is:
> https://github.com/apache/tomcat/tree/11.0.0-M20
> c400bf727cbc10198d3f52c29849d18660050b0c
>
> The proposed 11.0.0-M20 release is:
> [ ] -1 Broken - do not release
> [X] +1 Alpha  - go ahead and release as 11.0.0-M20
>

+1 Unit tests pass on Ubuntu 22.04 with Java 21.0.1

Igal



>
> -
> 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 IDE warning for deprecation

2024-05-03 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 555034d8ce Fix IDE warning for deprecation
555034d8ce is described below

commit 555034d8cefb8ff98088e6490670e06a03e9d2db
Author: Mark Thomas 
AuthorDate: Fri May 3 17:32:48 2024 +0100

Fix IDE warning for deprecation
---
 java/org/apache/tomcat/util/http/LegacyCookieProcessor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java 
b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
index 8d5a6161fc..84dec6310b 100644
--- a/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
+++ b/java/org/apache/tomcat/util/http/LegacyCookieProcessor.java
@@ -219,7 +219,7 @@ public final class LegacyCookieProcessor extends 
CookieProcessorBase {
 log.debug("Cookies: Parsing b[]: " + 
cookieValue.toString());
 }
 ByteChunk bc = cookieValue.getByteChunk();
-processCookieHeader(bc.getBytes(), bc.getOffset(), 
bc.getLength(), serverCookies);
+processCookieHeader(bc.getBytes(), bc.getStart(), 
bc.getLength(), serverCookies);
 }
 
 // search from the next position


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



(tomcat) branch main updated: Increment version for next development cycle

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 33723833ad Increment version for next development cycle
33723833ad is described below

commit 33723833ad7edf0664a7580e871ce57aad97e1ed
Author: Mark Thomas 
AuthorDate: Fri May 3 17:13:26 2024 +0100

Increment version for next development cycle
---
 build.properties.default | 2 +-
 res/maven/mvn.properties.default | 2 +-
 webapps/docs/changelog.xml   | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/build.properties.default b/build.properties.default
index c06d3849dc..cafef9bff9 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -33,7 +33,7 @@ version.major=11
 version.minor=0
 version.build=0
 version.patch=0
-version.suffix=-M20
+version.suffix=-M21
 version.dev=-dev
 
 # - Build tools -
diff --git a/res/maven/mvn.properties.default b/res/maven/mvn.properties.default
index b24d1afa20..6e8744185e 100644
--- a/res/maven/mvn.properties.default
+++ b/res/maven/mvn.properties.default
@@ -39,7 +39,7 @@ 
maven.asf.release.repo.url=https://repository.apache.org/service/local/staging/d
 maven.asf.release.repo.repositoryId=apache.releases.https
 
 # Release version info
-maven.asf.release.deploy.version=11.0.0-M20
+maven.asf.release.deploy.version=11.0.0-M21
 
 #Where do we load the libraries from
 tomcat.lib.path=../../output/build/lib
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 8c3f7d5625..399b83b2fa 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -104,7 +104,9 @@
   They eventually become mixed with the numbered issues (i.e., numbered
   issues do not "pop up" wrt. others).
 -->
-
+
+
+
   
 
   


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



svn commit: r68937 - in /dev/tomcat/tomcat-11/v11.0.0-M20: ./ bin/ bin/embed/ src/

2024-05-03 Thread markt
Author: markt
Date: Fri May  3 16:08:40 2024
New Revision: 68937

Log:
Upload 11.0.0-M20 for voting

Added:
dev/tomcat/tomcat-11/v11.0.0-M20/
dev/tomcat/tomcat-11/v11.0.0-M20/KEYS
dev/tomcat/tomcat-11/v11.0.0-M20/README.html
dev/tomcat/tomcat-11/v11.0.0-M20/RELEASE-NOTES
dev/tomcat/tomcat-11/v11.0.0-M20/bin/
dev/tomcat/tomcat-11/v11.0.0-M20/bin/README.html

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-deployer.tar.gz   
(with props)

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-deployer.tar.gz.asc

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-deployer.tar.gz.sha512
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-deployer.zip  
 (with props)

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-deployer.zip.asc

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-deployer.zip.sha512

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-fulldocs.tar.gz   
(with props)

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-fulldocs.tar.gz.asc

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-fulldocs.tar.gz.sha512

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-windows-x64.zip   
(with props)

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-windows-x64.zip.asc

dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20-windows-x64.zip.sha512
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.exe   (with 
props)
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.exe.asc
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.exe.sha512
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.tar.gz   
(with props)
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.tar.gz.asc
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.tar.gz.sha512
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.zip   (with 
props)
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.zip.asc
dev/tomcat/tomcat-11/v11.0.0-M20/bin/apache-tomcat-11.0.0-M20.zip.sha512
dev/tomcat/tomcat-11/v11.0.0-M20/bin/embed/

dev/tomcat/tomcat-11/v11.0.0-M20/bin/embed/apache-tomcat-11.0.0-M20-embed.tar.gz
   (with props)

dev/tomcat/tomcat-11/v11.0.0-M20/bin/embed/apache-tomcat-11.0.0-M20-embed.tar.gz.asc

dev/tomcat/tomcat-11/v11.0.0-M20/bin/embed/apache-tomcat-11.0.0-M20-embed.tar.gz.sha512

dev/tomcat/tomcat-11/v11.0.0-M20/bin/embed/apache-tomcat-11.0.0-M20-embed.zip   
(with props)

dev/tomcat/tomcat-11/v11.0.0-M20/bin/embed/apache-tomcat-11.0.0-M20-embed.zip.asc

dev/tomcat/tomcat-11/v11.0.0-M20/bin/embed/apache-tomcat-11.0.0-M20-embed.zip.sha512
dev/tomcat/tomcat-11/v11.0.0-M20/src/
dev/tomcat/tomcat-11/v11.0.0-M20/src/apache-tomcat-11.0.0-M20-src.tar.gz   
(with props)
dev/tomcat/tomcat-11/v11.0.0-M20/src/apache-tomcat-11.0.0-M20-src.tar.gz.asc

dev/tomcat/tomcat-11/v11.0.0-M20/src/apache-tomcat-11.0.0-M20-src.tar.gz.sha512
dev/tomcat/tomcat-11/v11.0.0-M20/src/apache-tomcat-11.0.0-M20-src.zip   
(with props)
dev/tomcat/tomcat-11/v11.0.0-M20/src/apache-tomcat-11.0.0-M20-src.zip.asc
dev/tomcat/tomcat-11/v11.0.0-M20/src/apache-tomcat-11.0.0-M20-src.zip.sha512

Added: dev/tomcat/tomcat-11/v11.0.0-M20/KEYS
==
--- dev/tomcat/tomcat-11/v11.0.0-M20/KEYS (added)
+++ dev/tomcat/tomcat-11/v11.0.0-M20/KEYS Fri May  3 16:08:40 2024
@@ -0,0 +1,514 @@
+This file contains the PGP keys of various Apache developers.
+Please don't use them for email unless you have to. Their main
+purpose is code signing.
+
+Apache users: pgp < KEYS
+Apache developers:
+(pgpk -ll  && pgpk -xa ) >> this file.
+  or
+(gpg --fingerprint --list-sigs 
+ && gpg --armor --export ) >> this file.
+
+Apache developers: please ensure that your key is also available via the
+PGP keyservers (such as pgpkeys.mit.edu).
+
+
+pub   4096R/2F6059E7 2009-09-18
+  Key fingerprint = A9C5 DF4D 22E9 9998 D987  5A51 10C0 1C5A 2F60 59E7
+uid  Mark E D Thomas 
+sub   4096R/5E763BEC 2009-09-18
+
+-BEGIN PGP PUBLIC KEY BLOCK-
+Comment: GPGTools - http://gpgtools.org
+
+mQINBEq0DukBEAD4jovHOPJDxoD+JnO1Go2kiwpgRULasGlrVKuSUdP6wzcaqWmX
+pqtOJKKwW2MQFQLmg7nQ9RjJwy3QCbKNDJQA/bwbQT1F7WzTCz2S6vxC4zxKck4t
+6RZBq2dJsYKF0CEh6ZfY4dmKvhq+3istSoFRdHYoOPGWZpuRDqfZPdGm/m335/6K
+GH59oysn1NE7a2a+kZzjBSEgv23+l4Z1Rg7+fpz1JcdHSdC2Z+ZRxML25eVatRVz
+4yvDOZItqDURP24zWOodxgboldV6Y88C3v/7KRR+1vklzkuA2FqF8Q4r/2f0su7M
+UVviQcy29y/RlLSDTTYoVlCZ1ni14qFU7Hpw43KJtgXmcUwq31T1+SlXdYjNJ1aF
+kUi8BjCHDcSgE/IReKUanjHzm4XSymKDTeqqzidi4k6PDD4jyHb8k8vxi6qT6Udn
+lcfo5NBkkUT1TauhEy8ktHhbl9k60BvvMBP9l6cURiJg1WS77egI4P/82oPbzzFi
+GFqXyJKULVgxtdQ3JikCpodp3f1fh6PlYZwkW4xCJLJucJ5MiQp07HAkMVW5w+k8

(tomcat-jakartaee-migration) branch dependabot/maven/org.apache.commons-commons-compress-1.26.0 deleted (was e73fab6)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 
dependabot/maven/org.apache.commons-commons-compress-1.26.0
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


 was e73fab6  Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


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



(tomcat-jakartaee-migration) branch main updated: Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 9f57e24  Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0
9f57e24 is described below

commit 9f57e241d6ade38e82ff868070224670acb0e673
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Wed Feb 21 00:19:59 2024 +

Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0

Bumps org.apache.commons:commons-compress from 1.25.0 to 1.26.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] 
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 15be6ce..8480bd3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,7 @@
 
   org.apache.commons
   commons-compress
-  1.25.0
+  1.26.0
 
 
   commons-io


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



Re: [PR] Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0 [tomcat-jakartaee-migration]

2024-05-03 Thread via GitHub


markt-asf merged PR #53:
URL: https://github.com/apache/tomcat-jakartaee-migration/pull/53


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

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

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


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



(tomcat) 01/01: Tag 11.0.0-M20

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to tag 11.0.0-M20
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit c400bf727cbc10198d3f52c29849d18660050b0c
Author: Mark Thomas 
AuthorDate: Fri May 3 16:52:05 2024 +0100

Tag 11.0.0-M20
---
 build.properties.release |  54 +++
 res/install-win/Uninstall.exe.sig| Bin 0 -> 10202 bytes
 res/install-win/tomcat-installer.exe.sig | Bin 0 -> 10202 bytes
 res/maven/mvn.properties.release |  27 
 webapps/docs/changelog.xml   |   2 +-
 5 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/build.properties.release b/build.properties.release
new file mode 100644
index 00..4a6b0b27bb
--- /dev/null
+++ b/build.properties.release
@@ -0,0 +1,54 @@
+# -
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -
+
+# This file was auto-generated by the pre-release Ant target.
+
+# Any unwanted settings may be over-ridden in a build.properties file located
+# in the same directory as this file.
+
+# Set the version-dev to "" (empty string) as this is not a development 
release.
+version.dev=
+
+# Ensure consistent timestamps for reproducible builds.
+ant.tstamp.now.iso=2024-05-03T15:37:41Z
+
+# Enable insertion of detached signatures into the Windows installer.
+do.codesigning=true
+
+# Re-use the same GPG executable.
+gpg.exec=C:/Program Files (x86)/GnuPG/bin/gpg.exe
+
+# Reproducible builds require the use of the build tools defined below. The
+# vendors (where appropriate) and versions must match exactly for a 
reproducible
+# build since this data is embedded in various files, particularly JAR file
+# manifests, as part of the build process.
+#
+# Apache Ant:  Apache Ant(TM) version 1.10.13 compiled on January 4 2023
+#
+# Java Name:   OpenJDK 64-Bit Server VM
+# Java Vendor: Eclipse Adoptium
+# Java Version:22.0.1+8
+
+# The following is provided for information only. Builds will be repeatable
+# whether or not the build environment is consistent with this information.
+#
+# OS:  amd64 Windows Server 2022 10.0
+# File encoding:   UTF-8
+#
+# Release Manager: markt
+release-java-version=22.0.1+8
+release-ant-version=1.10.13
diff --git a/res/install-win/Uninstall.exe.sig 
b/res/install-win/Uninstall.exe.sig
new file mode 100644
index 00..3dcf8353ba
Binary files /dev/null and b/res/install-win/Uninstall.exe.sig differ
diff --git a/res/install-win/tomcat-installer.exe.sig 
b/res/install-win/tomcat-installer.exe.sig
new file mode 100644
index 00..136150f649
Binary files /dev/null and b/res/install-win/tomcat-installer.exe.sig differ
diff --git a/res/maven/mvn.properties.release b/res/maven/mvn.properties.release
new file mode 100644
index 00..a58103285b
--- /dev/null
+++ b/res/maven/mvn.properties.release
@@ -0,0 +1,27 @@
+# -
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -
+
+# This file was auto-generated by the pre-release Ant target.
+
+# Remove "-dev" from the version since this is not a development release.
+maven.asf.release.deploy.version=11.0.0-M20
+
+# Re-use the same GPG executable.

(tomcat) tag 11.0.0-M20 created (now c400bf727c)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to tag 11.0.0-M20
in repository https://gitbox.apache.org/repos/asf/tomcat.git


  at c400bf727c (commit)
This tag includes the following new commits:

 new c400bf727c Tag 11.0.0-M20

The 1 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.



-
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 off-by-error causing first response header to be dropped.

2024-05-03 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 404b8b06de Fix off-by-error causing first response header to be 
dropped.
404b8b06de is described below

commit 404b8b06dea84dd8a0e989d7076df01b4f904562
Author: Mark Thomas 
AuthorDate: Fri May 3 15:54:15 2024 +0100

Fix off-by-error causing first response header to be dropped.

Fix based on #710 by foremans.
---
 java/org/apache/coyote/http11/Http11Processor.java| 3 ++-
 test/org/apache/coyote/http11/TestHttp11OutputBuffer.java | 1 +
 webapps/docs/changelog.xml| 7 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 8bc508cbb4..6e88c9c438 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1053,7 +1053,8 @@ public class Http11Processor extends AbstractProcessor {
 size--;
 // Header buffer is corrupted. Reset it and start again.
 outputBuffer.resetHeaderBuffer();
-i = 0;
+// -1 as it will be incremented at the start of the loop 
and header indexes start at 0.
+i = -1;
 outputBuffer.sendStatus();
 }
 }
diff --git a/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java 
b/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
index feae71c740..82752abf38 100644
--- a/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
+++ b/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
@@ -110,6 +110,7 @@ public class TestHttp11OutputBuffer extends TomcatBaseTest {
 Assert.assertEquals(HttpServletResponse.SC_OK, rc);
 List values = 
resHeaders.get(HeaderServlet.CUSTOM_HEADER_NAME);
 Assert.assertNull(values);
+Assert.assertEquals(5, resHeaders.size());
 }
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 434b72cfeb..2538276305 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -184,6 +184,11 @@
   
 Fix non-blocking reads of chunked request bodies. (markt)
   
+  
+When an invalid HTTP response header was dropped, an off-by-one error
+meant that the first header in the response was also dropped. Fix based
+on pull request 710 by foremans. (markt)
+  
 
   
   
@@ -360,7 +365,7 @@
 
   
 Minor performance improvement for building filter chains. Based on
-ideas from 702 by Luke Miao. (remm)
+ideas from pull request 702 by Luke Miao. (remm)
   
   
 Align error handling for Writer and


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



(tomcat) branch 10.1.x updated: Fix off-by-error causing first response header to be dropped.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new ced5a9506f Fix off-by-error causing first response header to be 
dropped.
ced5a9506f is described below

commit ced5a9506f1922859905f24685928467304c2d59
Author: Mark Thomas 
AuthorDate: Fri May 3 15:54:15 2024 +0100

Fix off-by-error causing first response header to be dropped.

Fix based on #710 by foremans.
---
 java/org/apache/coyote/http11/Http11Processor.java| 3 ++-
 test/org/apache/coyote/http11/TestHttp11OutputBuffer.java | 1 +
 webapps/docs/changelog.xml| 9 +++--
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index b9e65ad6bb..f1f3fb9501 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1054,7 +1054,8 @@ public class Http11Processor extends AbstractProcessor {
 size--;
 // Header buffer is corrupted. Reset it and start again.
 outputBuffer.resetHeaderBuffer();
-i = 0;
+// -1 as it will be incremented at the start of the loop 
and header indexes start at 0.
+i = -1;
 outputBuffer.sendStatus();
 }
 }
diff --git a/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java 
b/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
index 00a4664d75..4f63cb13f6 100644
--- a/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
+++ b/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
@@ -110,6 +110,7 @@ public class TestHttp11OutputBuffer extends TomcatBaseTest {
 Assert.assertEquals(HttpServletResponse.SC_OK, rc);
 List values = 
resHeaders.get(HeaderServlet.CUSTOM_HEADER_NAME);
 Assert.assertNull(values);
+Assert.assertEquals(5, resHeaders.size());
 }
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 146b88150e..96cae84eb1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -138,7 +138,7 @@
   
   
 Remove MBean metadata for attibutes that have been removed. Based on
-719 by Shawn Q. (markt)
+pull request 719 by Shawn Q. (markt)
   
 
   
@@ -179,6 +179,11 @@
   
 Fix non-blocking reads of chunked request bodies. (markt)
   
+  
+When an invalid HTTP response header was dropped, an off-by-one error
+meant that the first header in the response was also dropped. Fix based
+on pull request 710 by foremans. (markt)
+  
 
   
   
@@ -361,7 +366,7 @@
 
   
 Minor performance improvement for building filter chains. Based on
-ideas from 702 by Luke Miao. (remm)
+ideas from pull request 702 by Luke Miao. (remm)
   
   
 Align error handling for Writer and


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



(tomcat) branch 10.1.x updated: Removed attributes also need to be removed from MBeans.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new 125f6ac4b4 Removed attributes also need to be removed from MBeans.
125f6ac4b4 is described below

commit 125f6ac4b4ecd0f260b4ec7d614e54b9dd5a854c
Author: Mark Thomas 
AuthorDate: Fri May 3 15:04:27 2024 +0100

Removed attributes also need to be removed from MBeans.

Based on PR #719 provided by Shawn Q.
---
 .../apache/tomcat/util/net/mbeans-descriptors.xml  | 23 --
 webapps/docs/changelog.xml |  4 
 webapps/docs/config/ajp.xml|  8 
 3 files changed, 4 insertions(+), 31 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/mbeans-descriptors.xml 
b/java/org/apache/tomcat/util/net/mbeans-descriptors.xml
index 38713f8922..d5e52527db 100644
--- a/java/org/apache/tomcat/util/net/mbeans-descriptors.xml
+++ b/java/org/apache/tomcat/util/net/mbeans-descriptors.xml
@@ -29,17 +29,9 @@
 
 
-
-
 
 
-
-
 
 
@@ -112,9 +104,6 @@
 writeable="false"
is="true"/>
 
-
-
 
 
@@ -259,17 +248,9 @@
 
 
-
-
 
 
-
-
 
 
@@ -297,10 +278,6 @@
 
 
-
-
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index deaadfd97e..146b88150e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -136,6 +136,10 @@
   
 Extend Asn1Parser to parse UTF8Strings. 
(michaelo)
   
+  
+Remove MBean metadata for attibutes that have been removed. Based on
+719 by Shawn Q. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml
index aff9f44a6a..ee56883fc5 100644
--- a/webapps/docs/config/ajp.xml
+++ b/webapps/docs/config/ajp.xml
@@ -323,14 +323,6 @@
   value is 100.
 
 
-
-  The number of threads to be used to accept connections. Increase this
-  value on a multi CPU machine, although you would never really need more
-  than 2. Also, with a lot of non keep alive connections, you
-  might want to increase this value as well. Default value is
-  1.
-
-
 
   The priority of the acceptor threads. The threads used to accept
   new connections. The default value is 5 (the value of the


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



Re: [PR] it will drop first header if any header cause exceptio during process [tomcat]

2024-05-03 Thread via GitHub


markt-asf commented on PR #710:
URL: https://github.com/apache/tomcat/pull/710#issuecomment-2093184047

   Thanks for spotting this. I've applied this fix along with a simple test 
case.


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

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

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


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



Re: [PR] it will drop first header if any header cause exceptio during process [tomcat]

2024-05-03 Thread via GitHub


markt-asf closed pull request #710: it will drop first header if any header 
cause exceptio during process
URL: https://github.com/apache/tomcat/pull/710


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

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

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


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



(tomcat) 02/02: Fix off-by-error causing first response header to be dropped.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit cc7006946414f4dc08c704ff5bca391f7641532c
Author: Mark Thomas 
AuthorDate: Fri May 3 15:54:15 2024 +0100

Fix off-by-error causing first response header to be dropped.

Fix based on #710 by foremans.
---
 java/org/apache/coyote/http11/Http11Processor.java| 3 ++-
 test/org/apache/coyote/http11/TestHttp11OutputBuffer.java | 1 +
 webapps/docs/changelog.xml| 9 +++--
 3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index dc5d96c870..681db0e96b 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1052,7 +1052,8 @@ public class Http11Processor extends AbstractProcessor {
 size--;
 // Header buffer is corrupted. Reset it and start again.
 outputBuffer.resetHeaderBuffer();
-i = 0;
+// -1 as it will be incremented at the start of the loop 
and header indexes start at 0.
+i = -1;
 outputBuffer.sendStatus();
 }
 }
diff --git a/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java 
b/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
index 00a4664d75..4f63cb13f6 100644
--- a/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
+++ b/test/org/apache/coyote/http11/TestHttp11OutputBuffer.java
@@ -110,6 +110,7 @@ public class TestHttp11OutputBuffer extends TomcatBaseTest {
 Assert.assertEquals(HttpServletResponse.SC_OK, rc);
 List values = 
resHeaders.get(HeaderServlet.CUSTOM_HEADER_NAME);
 Assert.assertNull(values);
+Assert.assertEquals(5, resHeaders.size());
 }
 }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e764aed747..8c3f7d5625 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -155,7 +155,7 @@
   
   
 Remove MBean metadata for attibutes that have been removed. Based on
-719 by Shawn Q. (markt)
+pull request 719 by Shawn Q. (markt)
   
   
 Remove duplicate ID check from Manager.rotateSessionId().
@@ -206,6 +206,11 @@
   
 Refactor HTTP header parsing to use common parsing code. (markt)
   
+  
+When an invalid HTTP response header was dropped, an off-by-one error
+meant that the first header in the response was also dropped. Fix based
+on pull request 710 by foremans. (markt)
+  
 
   
   
@@ -424,7 +429,7 @@
 
   
 Minor performance improvement for building filter chains. Based on
-ideas from 702 by Luke Miao. (remm)
+ideas from pull request 702 by Luke Miao. (remm)
   
   
 Align error handling for Writer and


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



(tomcat) 01/02: Remove docs for removed property

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 792b49624fc284d3eabab77fe7f8723e311efd37
Author: Mark Thomas 
AuthorDate: Fri May 3 15:02:13 2024 +0100

Remove docs for removed property
---
 webapps/docs/config/ajp.xml | 8 
 1 file changed, 8 deletions(-)

diff --git a/webapps/docs/config/ajp.xml b/webapps/docs/config/ajp.xml
index bc85a734b3..e72a6a10d4 100644
--- a/webapps/docs/config/ajp.xml
+++ b/webapps/docs/config/ajp.xml
@@ -319,14 +319,6 @@
   value is 100.
 
 
-
-  The number of threads to be used to accept connections. Increase this
-  value on a multi CPU machine, although you would never really need more
-  than 2. Also, with a lot of non keep alive connections, you
-  might want to increase this value as well. Default value is
-  1.
-
-
 
   The priority of the acceptor threads. The threads used to accept
   new connections. The default value is 5 (the value of the


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



(tomcat) branch main updated (fc0aa20c16 -> cc70069464)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from fc0aa20c16 ManagerBase dropped the duplicate session ID check. Drop it 
here too.
 new 792b49624f Remove docs for removed property
 new cc70069464 Fix off-by-error causing first response header to be 
dropped.

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/http11/Http11Processor.java| 3 ++-
 test/org/apache/coyote/http11/TestHttp11OutputBuffer.java | 1 +
 webapps/docs/changelog.xml| 9 +++--
 webapps/docs/config/ajp.xml   | 8 
 4 files changed, 10 insertions(+), 11 deletions(-)


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



Buildbot failure in on tomcat-9.0.x

2024-05-03 Thread buildbot
Build status: BUILD FAILED: failed compile (failure)
Worker used: bb_worker2_ubuntu
URL: https://ci2.apache.org/#builders/37/builds/942
Blamelist: Michael Osipov , remm 
Build Text: failed compile (failure)
Status Detected: new failure
Build Source Stamp: [branch 9.0.x] 4fd9f16076d1ebcc2c0f970e4893a858bc0de025


Steps:

  worker_preparation: 0

  git: 0

  shell: 0

  shell_1: 0

  shell_2: 0

  shell_3: 0

  shell_4: 0

  shell_5: 0

  compile: 1

  shell_6: 0

  shell_7: 0

  shell_8: 0

  shell_9: 0

  Rsync docs to nightlies.apache.org: 0

  shell_10: 0

  Rsync RAT to nightlies.apache.org: 0

  compile_1: 2

  shell_11: 0

  Rsync Logs to nightlies.apache.org: 0


-- ASF Buildbot


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



Re: [PR] remove obsolete JMX bean attributes [tomcat]

2024-05-03 Thread via GitHub


markt-asf commented on PR #719:
URL: https://github.com/apache/tomcat/pull/719#issuecomment-2093075977

   Thanks for the PR. I did a broader review and found a few more attributes 
that could be removed too.


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

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

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


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



Re: [PR] remove obsolete JMX bean attributes [tomcat]

2024-05-03 Thread via GitHub


markt-asf closed pull request #719: remove obsolete JMX bean attributes
URL: https://github.com/apache/tomcat/pull/719


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

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

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


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



(tomcat) 02/02: ManagerBase dropped the duplicate session ID check. Drop it here too.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit fc0aa20c16f44ee7e944cb3352f90f71e6aa2cd2
Author: Mark Thomas 
AuthorDate: Fri May 3 14:55:32 2024 +0100

ManagerBase dropped the duplicate session ID check. Drop it here too.
---
 java/org/apache/catalina/Manager.java | 16 +---
 webapps/docs/changelog.xml|  7 ++-
 2 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/java/org/apache/catalina/Manager.java 
b/java/org/apache/catalina/Manager.java
index ed52490b33..4053efd62c 100644
--- a/java/org/apache/catalina/Manager.java
+++ b/java/org/apache/catalina/Manager.java
@@ -213,21 +213,7 @@ public interface Manager {
  * @return  The new session ID
  */
 default String rotateSessionId(Session session) {
-String newSessionId = null;
-// Assume the new Id is a duplicate until we prove it isn't. The
-// chances of a duplicate are extremely low but the current ManagerBase
-// code protects against duplicates so this default method does too.
-boolean duplicate = true;
-do {
-newSessionId = getSessionIdGenerator().generateSessionId();
-try {
-if (findSession(newSessionId) == null) {
-duplicate = false;
-}
-} catch (IOException ioe) {
-// Swallow. An IOE means the ID was known so continue looping
-}
-} while (duplicate);
+String newSessionId = getSessionIdGenerator().generateSessionId();
 changeSessionId(session, newSessionId);
 return newSessionId;
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 472c2ff1d1..e764aed747 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -150,12 +150,17 @@
 Add periodic checking for WebDAV locks expiration. (remm)
   
   
-Extend Asn1Parser to parse UTF8Strings. 
(michaelo)
+Extend Asn1Parser to parse UTF8Strings.
+(michaelo)
   
   
 Remove MBean metadata for attibutes that have been removed. Based on
 719 by Shawn Q. (markt)
   
+  
+Remove duplicate ID check from Manager.rotateSessionId().
+(markt)
+  
 
   
   


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



(tomcat) branch main updated (1bd08df1a8 -> fc0aa20c16)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 1bd08df1a8 Deprecate offset, as mentioned in the todo
 new 5891f48f1d Removed attributes also need to be removed from MBeans.
 new fc0aa20c16 ManagerBase dropped the duplicate session ID check. Drop it 
here too.

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/Manager.java  | 16 +
 .../apache/catalina/session/mbeans-descriptors.xml |  8 ---
 .../apache/tomcat/util/net/mbeans-descriptors.xml  | 27 --
 webapps/docs/changelog.xml | 11 -
 4 files changed, 11 insertions(+), 51 deletions(-)


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



(tomcat) 01/02: Removed attributes also need to be removed from MBeans.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 5891f48f1d88421ae76fa1a9bf9fbc5fbd764566
Author: Mark Thomas 
AuthorDate: Fri May 3 14:52:23 2024 +0100

Removed attributes also need to be removed from MBeans.

Based on PR #719 provided by Shawn Q.
---
 .../apache/catalina/session/mbeans-descriptors.xml |  8 ---
 .../apache/tomcat/util/net/mbeans-descriptors.xml  | 27 --
 webapps/docs/changelog.xml |  4 
 3 files changed, 4 insertions(+), 35 deletions(-)

diff --git a/java/org/apache/catalina/session/mbeans-descriptors.xml 
b/java/org/apache/catalina/session/mbeans-descriptors.xml
index f46cf0c6d1..a1161c0c28 100644
--- a/java/org/apache/catalina/session/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/session/mbeans-descriptors.xml
@@ -36,10 +36,6 @@
  type="java.lang.String"
 writeable="false"/>
 
-
-
 
@@ -224,10 +220,6 @@
  type="java.lang.String"
 writeable="false"/>
 
-
-
 
diff --git a/java/org/apache/tomcat/util/net/mbeans-descriptors.xml 
b/java/org/apache/tomcat/util/net/mbeans-descriptors.xml
index 38713f8922..c99a31d88d 100644
--- a/java/org/apache/tomcat/util/net/mbeans-descriptors.xml
+++ b/java/org/apache/tomcat/util/net/mbeans-descriptors.xml
@@ -29,17 +29,9 @@
 
 
-
-
 
 
-
-
 
 
@@ -67,10 +59,6 @@
 
 
-
-
 
 
@@ -112,9 +100,6 @@
 writeable="false"
is="true"/>
 
-
-
 
 
@@ -259,17 +244,9 @@
 
 
-
-
 
 
-
-
 
 
@@ -297,10 +274,6 @@
 
 
-
-
 
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 70bb21df9d..472c2ff1d1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -152,6 +152,10 @@
   
 Extend Asn1Parser to parse UTF8Strings. 
(michaelo)
   
+  
+Remove MBean metadata for attibutes that have been removed. Based on
+719 by Shawn Q. (markt)
+  
 
   
   


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



[Bug 68972] Prevent the web application's ClassLoader from being pinned by the JSP compiler if an application uses a custom XMLInputFactory.

2024-05-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68972

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #1 from Mark Thomas  ---


*** This bug has been marked as a duplicate of bug 68909 ***

-- 
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 68909] JSP compilation error due to classpath problems

2024-05-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68909

Mark Thomas  changed:

   What|Removed |Added

 CC||ranjit.vadak...@gmail.com

--- Comment #10 from Mark Thomas  ---
*** Bug 68972 has been marked as a duplicate of this bug. ***

-- 
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 68972] New: Prevent the web application's ClassLoader from being pinned by the JSP compiler if an application uses a custom XMLInputFactory.

2024-05-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68972

Bug ID: 68972
   Summary: Prevent the web application's ClassLoader from being
pinned by the JSP compiler if an application uses a
custom XMLInputFactory.
   Product: Tomcat 9
   Version: 9.0.88
  Hardware: PC
OS: All
Status: NEW
  Severity: regression
  Priority: P2
 Component: Jasper
  Assignee: dev@tomcat.apache.org
  Reporter: ranjit.vadak...@gmail.com
  Target Milestone: -

Please see
https://github.com/apache/tomcat/commit/3b8f277a7ffc1193ed6c6d4fff85db6dc7327e39
for the specific change, which was built on top of
https://github.com/apache/tomcat/commit/a2167e13c19115aecd220cd3be19d43d36126f3b

This change is causing us major grief.

Our application -

1. programmatically sets "com.ctc.wstx.stax.WstxInputFactory" as the value of
the system property "javax.xml.stream.XMLInputFactory" on startup
2. is packaged as a WAR file with "woodstox-core" and "stax2-api" included in
the WAR/WEB-INF/lib

Up until 9.0.87, JSPs rendered without errors. Starting with 9.0.88, we get
this -

Caused by: java.lang.ExceptionInInitializerError: Exception
javax.xml.stream.FactoryConfigurationError: Provider
com.ctc.wstx.stax.WstxInputFactory not found [in thread "http-nio-8080-exec-7"]
at java.xml/javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:184)
at java.xml/javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:135)
at java.xml/javax.xml.stream.FactoryFinder.find(FactoryFinder.java:248)
at java.xml/javax.xml.stream.FactoryFinder.find(FactoryFinder.java:210)
at
java.xml/javax.xml.stream.XMLInputFactory.newFactory(XMLInputFactory.java:185)
at
org.apache.jasper.compiler.EncodingDetector.(EncodingDetector.java:41)

The problem is on line 40 (of
https://github.com/apache/tomcat/commit/3b8f277a7ffc1193ed6c6d4fff85db6dc7327e39)
where the context class loader is set to that of Tomcat. 

According to
https://docs.oracle.com/en/java/javase/17/docs/api/java.xml/module-summary.html#LookupMechanism,
line 41 will now look for com.ctc.wstx.stax.WstxInputFactory in Tomcat's
context (because of the system property being set) and won't find it. Because
we (like most others) lazy load JSPs, by the time the EncodingDetector is
clinit-ed, it's too late because the system property has already been set.

A possible solution is to initialize the EncodingDetector class before any
applications are deployed so that it will find the default input factory
"com.sun.xml.internal.stream.XMLInputFactoryImpl"

The workaround is simple, but extremely inconvenient - we need to place the 2
jars - "woodstox-core" and "stax2-api" - in Tomcat/lib.

-- 
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 68742] SingleSignOn session invalidation logic fallacy results in 408 request timed out.

2024-05-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68742

--- Comment #2 from Mark Thomas  ---
If sufficient information is not provided to enable this issue to be recreated
the bug report will get resolved as INVALID or WORKSFORME.

-- 
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 68884] Delayed HTTP Traffic Processing After Mass Websocket Disconnect/Reconnect

2024-05-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=68884

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #7 from Mark Thomas  ---
Fixed by reducing the timeout for non-standard WebSocket closes.

Fixed in:
- 11.0.x for 11.0.0-M20 onwards
- 10.1.x for 10.1.24 onwards
-  9.0.x for  9.0.89 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 9.0.x updated: Deprecate offset, as mentioned in the todo

2024-05-03 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 4fd9f16076 Deprecate offset, as mentioned in the todo
4fd9f16076 is described below

commit 4fd9f16076d1ebcc2c0f970e4893a858bc0de025
Author: remm 
AuthorDate: Fri May 3 14:31:38 2024 +0200

Deprecate offset, as mentioned in the todo

Javadoc improvements.
---
 .../catalina/authenticator/BasicAuthenticator.java |  4 +-
 .../authenticator/SpnegoAuthenticator.java |  2 +-
 java/org/apache/catalina/mapper/Mapper.java| 42 ++---
 java/org/apache/coyote/ajp/AjpMessage.java |  2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 .../apache/coyote/http11/Http11OutputBuffer.java   |  2 +-
 .../http11/filters/SavedRequestInputFilter.java|  4 +-
 java/org/apache/coyote/http2/Stream.java   |  2 +-
 java/org/apache/tomcat/util/buf/AbstractChunk.java | 71 +++---
 java/org/apache/tomcat/util/buf/B2CConverter.java  |  4 +-
 java/org/apache/tomcat/util/buf/C2BConverter.java  |  4 +-
 java/org/apache/tomcat/util/buf/CharChunk.java |  6 +-
 java/org/apache/tomcat/util/buf/MessageBytes.java  |  2 +-
 java/org/apache/tomcat/util/buf/UDecoder.java  |  2 +-
 java/org/apache/tomcat/util/http/Parameters.java   |  2 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |  2 +-
 java/org/apache/tomcat/util/http/parser/Host.java  |  2 +-
 .../authenticator/TestBasicAuthParser.java |  4 +-
 18 files changed, 105 insertions(+), 54 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/BasicAuthenticator.java 
b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
index c293af288c..784698a58a 100644
--- a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
@@ -197,7 +197,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
 public BasicCredentials(ByteChunk input, Charset charset, boolean 
trimCredentials)
 throws IllegalArgumentException {
 authorization = input;
-initialOffset = input.getOffset();
+initialOffset = input.getStart();
 this.charset = charset;
 this.trimCredentials = trimCredentials;
 
@@ -249,7 +249,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
 System.arraycopy(authorization.getBuffer(), base64blobOffset, 
encoded, 0, base64blobLength);
 byte[] decoded = Base64.getDecoder().decode(encoded);
 // restore original offset
-authorization.setOffset(initialOffset);
+authorization.setStart(initialOffset);
 if (decoded == null) {
 throw new 
IllegalArgumentException(sm.getString("basicAuthenticator.notBase64"));
 }
diff --git a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java 
b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
index 6dc6d5d499..4678cf1326 100644
--- a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
@@ -163,7 +163,7 @@ public class SpnegoAuthenticator extends AuthenticatorBase {
 return false;
 }
 
-authorizationBC.setOffset(authorizationBC.getOffset() + 10);
+authorizationBC.setStart(authorizationBC.getStart() + 10);
 
 byte[] encoded = new byte[authorizationBC.getLength()];
 System.arraycopy(authorizationBC.getBuffer(), 0, encoded, 0, 
authorizationBC.getLength());
diff --git a/java/org/apache/catalina/mapper/Mapper.java 
b/java/org/apache/catalina/mapper/Mapper.java
index b46efbe382..e5f66b1077 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -713,13 +713,13 @@ public final class Mapper {
 // wildcard host. This is to allow this shortcut.
 int firstDot = host.indexOf('.');
 if (firstDot > -1) {
-int offset = host.getOffset();
+int start = host.getStart();
 try {
-host.setOffset(firstDot + offset);
+host.setStart(firstDot + start);
 mappedHost = exactFindIgnoreCase(hosts, host);
 } finally {
 // Make absolutely sure this gets reset
-host.setOffset(offset);
+host.setStart(start);
 }
 }
 if (mappedHost == null) {
@@ -823,16 +823,16 @@ public final class Mapper {
 private void internalMapWrapper(ContextVersion contextVersion, CharChunk 
path, MappingData mappingData)
 throws IOException {
 
-int pathOffset = path.getOffset();
+int pathStart = 

(tomcat) branch 10.1.x updated: Deprecate offset, as mentioned in the todo

2024-05-03 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new d42d63eeac Deprecate offset, as mentioned in the todo
d42d63eeac is described below

commit d42d63eeaccda8fc512ebf1b0a78214074782e85
Author: remm 
AuthorDate: Fri May 3 14:31:38 2024 +0200

Deprecate offset, as mentioned in the todo

Javadoc improvements.
---
 .../catalina/authenticator/BasicAuthenticator.java |  4 +-
 .../authenticator/SpnegoAuthenticator.java |  2 +-
 java/org/apache/catalina/mapper/Mapper.java| 42 ++---
 java/org/apache/coyote/ajp/AjpMessage.java |  2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 .../apache/coyote/http11/Http11OutputBuffer.java   |  2 +-
 .../http11/filters/SavedRequestInputFilter.java|  4 +-
 java/org/apache/coyote/http2/Stream.java   |  2 +-
 java/org/apache/tomcat/util/buf/AbstractChunk.java | 71 +++---
 java/org/apache/tomcat/util/buf/B2CConverter.java  |  4 +-
 java/org/apache/tomcat/util/buf/C2BConverter.java  |  4 +-
 java/org/apache/tomcat/util/buf/CharChunk.java |  6 +-
 java/org/apache/tomcat/util/buf/MessageBytes.java  |  2 +-
 java/org/apache/tomcat/util/buf/UDecoder.java  |  2 +-
 java/org/apache/tomcat/util/http/Parameters.java   |  2 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |  2 +-
 java/org/apache/tomcat/util/http/parser/Host.java  |  2 +-
 .../authenticator/TestBasicAuthParser.java |  4 +-
 18 files changed, 105 insertions(+), 54 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/BasicAuthenticator.java 
b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
index 1bfd552cf1..2e5edb10e5 100644
--- a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
@@ -197,7 +197,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
 public BasicCredentials(ByteChunk input, Charset charset, boolean 
trimCredentials)
 throws IllegalArgumentException {
 authorization = input;
-initialOffset = input.getOffset();
+initialOffset = input.getStart();
 this.charset = charset;
 this.trimCredentials = trimCredentials;
 
@@ -249,7 +249,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
 System.arraycopy(authorization.getBuffer(), base64blobOffset, 
encoded, 0, base64blobLength);
 byte[] decoded = Base64.getDecoder().decode(encoded);
 // restore original offset
-authorization.setOffset(initialOffset);
+authorization.setStart(initialOffset);
 if (decoded == null) {
 throw new 
IllegalArgumentException(sm.getString("basicAuthenticator.notBase64"));
 }
diff --git a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java 
b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
index e838c9759c..874ef310d0 100644
--- a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
@@ -164,7 +164,7 @@ public class SpnegoAuthenticator extends AuthenticatorBase {
 return false;
 }
 
-authorizationBC.setOffset(authorizationBC.getOffset() + 10);
+authorizationBC.setStart(authorizationBC.getStart() + 10);
 
 byte[] encoded = new byte[authorizationBC.getLength()];
 System.arraycopy(authorizationBC.getBuffer(), 0, encoded, 0, 
authorizationBC.getLength());
diff --git a/java/org/apache/catalina/mapper/Mapper.java 
b/java/org/apache/catalina/mapper/Mapper.java
index 3edecb151c..9cd341b9c4 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -712,13 +712,13 @@ public final class Mapper {
 // wildcard host. This is to allow this shortcut.
 int firstDot = host.indexOf('.');
 if (firstDot > -1) {
-int offset = host.getOffset();
+int start = host.getStart();
 try {
-host.setOffset(firstDot + offset);
+host.setStart(firstDot + start);
 mappedHost = exactFindIgnoreCase(hosts, host);
 } finally {
 // Make absolutely sure this gets reset
-host.setOffset(offset);
+host.setStart(start);
 }
 }
 if (mappedHost == null) {
@@ -820,16 +820,16 @@ public final class Mapper {
 private void internalMapWrapper(ContextVersion contextVersion, CharChunk 
path, MappingData mappingData)
 throws IOException {
 
-int pathOffset = path.getOffset();
+int pathStart = 

(tomcat) branch main updated: Deprecate offset, as mentioned in the todo

2024-05-03 Thread remm
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new 1bd08df1a8 Deprecate offset, as mentioned in the todo
1bd08df1a8 is described below

commit 1bd08df1a81000af3ae826343c464a8ef3bddce5
Author: remm 
AuthorDate: Fri May 3 14:31:38 2024 +0200

Deprecate offset, as mentioned in the todo

Javadoc improvements.
---
 .../catalina/authenticator/BasicAuthenticator.java |  4 +-
 .../authenticator/SpnegoAuthenticator.java |  2 +-
 java/org/apache/catalina/mapper/Mapper.java| 42 ++---
 java/org/apache/coyote/ajp/AjpMessage.java |  2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java   |  2 +-
 .../apache/coyote/http11/Http11OutputBuffer.java   |  2 +-
 .../http11/filters/SavedRequestInputFilter.java|  4 +-
 java/org/apache/coyote/http2/Stream.java   |  2 +-
 java/org/apache/tomcat/util/buf/AbstractChunk.java | 71 +++---
 java/org/apache/tomcat/util/buf/B2CConverter.java  |  4 +-
 java/org/apache/tomcat/util/buf/C2BConverter.java  |  4 +-
 java/org/apache/tomcat/util/buf/CharChunk.java |  6 +-
 java/org/apache/tomcat/util/buf/MessageBytes.java  |  2 +-
 java/org/apache/tomcat/util/buf/UDecoder.java  |  2 +-
 java/org/apache/tomcat/util/http/Parameters.java   |  2 +-
 .../tomcat/util/http/Rfc6265CookieProcessor.java   |  2 +-
 java/org/apache/tomcat/util/http/parser/Host.java  |  2 +-
 .../authenticator/TestBasicAuthParser.java |  4 +-
 18 files changed, 105 insertions(+), 54 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/BasicAuthenticator.java 
b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
index 17c4a85857..9d8151850e 100644
--- a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
@@ -152,7 +152,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
  */
 public BasicCredentials(ByteChunk input, Charset charset) throws 
IllegalArgumentException {
 authorization = input;
-initialOffset = input.getOffset();
+initialOffset = input.getStart();
 this.charset = charset;
 
 parseMethod();
@@ -203,7 +203,7 @@ public class BasicAuthenticator extends AuthenticatorBase {
 System.arraycopy(authorization.getBuffer(), base64blobOffset, 
encoded, 0, base64blobLength);
 byte[] decoded = Base64.getDecoder().decode(encoded);
 // restore original offset
-authorization.setOffset(initialOffset);
+authorization.setStart(initialOffset);
 if (decoded == null) {
 throw new 
IllegalArgumentException(sm.getString("basicAuthenticator.notBase64"));
 }
diff --git a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java 
b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
index 9e4537ce0c..1ea2f4c734 100644
--- a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
@@ -165,7 +165,7 @@ public class SpnegoAuthenticator extends AuthenticatorBase {
 return false;
 }
 
-authorizationBC.setOffset(authorizationBC.getOffset() + 10);
+authorizationBC.setStart(authorizationBC.getStart() + 10);
 
 byte[] encoded = new byte[authorizationBC.getLength()];
 System.arraycopy(authorizationBC.getBuffer(), 0, encoded, 0, 
authorizationBC.getLength());
diff --git a/java/org/apache/catalina/mapper/Mapper.java 
b/java/org/apache/catalina/mapper/Mapper.java
index c07c6c12ff..af14edaeda 100644
--- a/java/org/apache/catalina/mapper/Mapper.java
+++ b/java/org/apache/catalina/mapper/Mapper.java
@@ -724,13 +724,13 @@ public final class Mapper {
 // wildcard host. This is to allow this shortcut.
 int firstDot = host.indexOf('.');
 if (firstDot > -1) {
-int offset = host.getOffset();
+int start = host.getStart();
 try {
-host.setOffset(firstDot + offset);
+host.setStart(firstDot + start);
 mappedHost = exactFindIgnoreCase(hosts, host);
 } finally {
 // Make absolutely sure this gets reset
-host.setOffset(offset);
+host.setStart(start);
 }
 }
 if (mappedHost == null) {
@@ -832,16 +832,16 @@ public final class Mapper {
 private void internalMapWrapper(ContextVersion contextVersion, CharChunk 
path, MappingData mappingData)
 throws IOException {
 
-int pathOffset = path.getOffset();
+int pathStart = path.getStart();
 int pathEnd = path.getEnd();
 

Re: [PR] Extend Asn1Parser to parse UTF8Strings [tomcat]

2024-05-03 Thread via GitHub


michael-o commented on PR #725:
URL: https://github.com/apache/tomcat/pull/725#issuecomment-2092917929

   @markt-asf, thank for merging. I will come up with my addtional X.509 
username retriever idea shortly.


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

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

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


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



(tomcat) branch 9.0.x updated: Extend Asn1Parser to parse UTF8Strings

2024-05-03 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 310dfe6103 Extend Asn1Parser to parse UTF8Strings
310dfe6103 is described below

commit 310dfe61039161cf8b8021770589ee56ce052745
Author: Michael Osipov 
AuthorDate: Fri May 3 12:39:23 2024 +0200

Extend Asn1Parser to parse UTF8Strings
---
 java/org/apache/tomcat/util/buf/Asn1Parser.java | 8 
 webapps/docs/changelog.xml  | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/tomcat/util/buf/Asn1Parser.java 
b/java/org/apache/tomcat/util/buf/Asn1Parser.java
index 1d88b113d4..1282dfc70b 100644
--- a/java/org/apache/tomcat/util/buf/Asn1Parser.java
+++ b/java/org/apache/tomcat/util/buf/Asn1Parser.java
@@ -17,6 +17,7 @@
 package org.apache.tomcat.util.buf;
 
 import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayDeque;
 import java.util.Deque;
 
@@ -36,6 +37,7 @@ public class Asn1Parser {
 public static final int TAG_OCTET_STRING = 0x04;
 public static final int TAG_NULL = 0x05;
 public static final int TAG_OID = 0x06;
+public static final int TAG_UTF8STRING = 0x0C;
 public static final int TAG_SEQUENCE = 0x30;
 public static final int TAG_ATTRIBUTE_BASE = 0xA0;
 
@@ -149,6 +151,12 @@ public class Asn1Parser {
 }
 
 
+public String parseUTF8String() {
+byte[] val = parseBytes(TAG_UTF8STRING);
+return new String(val, StandardCharsets.UTF_8);
+}
+
+
 public byte[] parseAttributeAsBytes(int index) {
 return parseBytes(TAG_ATTRIBUTE_BASE + index);
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 4c3feb27dc..434b72cfeb 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -142,6 +142,9 @@
   
 Add periodic checking for WebDAV locks expiration. (remm)
   
+  
+Extend Asn1Parser to parse UTF8Strings. 
(michaelo)
+  
 
   
   


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



(tomcat) branch 10.1.x updated: Extend Asn1Parser to parse UTF8Strings

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/10.1.x by this push:
 new ab8f6ff00f Extend Asn1Parser to parse UTF8Strings
ab8f6ff00f is described below

commit ab8f6ff00fce803add3b4b599b26760c5da3ab85
Author: Michael Osipov 
AuthorDate: Fri May 3 12:39:23 2024 +0200

Extend Asn1Parser to parse UTF8Strings
---
 java/org/apache/tomcat/util/buf/Asn1Parser.java | 8 
 webapps/docs/changelog.xml  | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/tomcat/util/buf/Asn1Parser.java 
b/java/org/apache/tomcat/util/buf/Asn1Parser.java
index 1d88b113d4..1282dfc70b 100644
--- a/java/org/apache/tomcat/util/buf/Asn1Parser.java
+++ b/java/org/apache/tomcat/util/buf/Asn1Parser.java
@@ -17,6 +17,7 @@
 package org.apache.tomcat.util.buf;
 
 import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayDeque;
 import java.util.Deque;
 
@@ -36,6 +37,7 @@ public class Asn1Parser {
 public static final int TAG_OCTET_STRING = 0x04;
 public static final int TAG_NULL = 0x05;
 public static final int TAG_OID = 0x06;
+public static final int TAG_UTF8STRING = 0x0C;
 public static final int TAG_SEQUENCE = 0x30;
 public static final int TAG_ATTRIBUTE_BASE = 0xA0;
 
@@ -149,6 +151,12 @@ public class Asn1Parser {
 }
 
 
+public String parseUTF8String() {
+byte[] val = parseBytes(TAG_UTF8STRING);
+return new String(val, StandardCharsets.UTF_8);
+}
+
+
 public byte[] parseAttributeAsBytes(int index) {
 return parseBytes(TAG_ATTRIBUTE_BASE + index);
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e22972b5d1..deaadfd97e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -133,6 +133,9 @@
   
 Add periodic checking for WebDAV locks expiration. (remm)
   
+  
+Extend Asn1Parser to parse UTF8Strings. 
(michaelo)
+  
 
   
   


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



(tomcat) branch main updated: Extend Asn1Parser to parse UTF8Strings

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
 new af92d6e3dd Extend Asn1Parser to parse UTF8Strings
af92d6e3dd is described below

commit af92d6e3dda61b633a70741c4b004cb0de5753b8
Author: Michael Osipov 
AuthorDate: Fri May 3 12:39:23 2024 +0200

Extend Asn1Parser to parse UTF8Strings
---
 java/org/apache/tomcat/util/buf/Asn1Parser.java | 8 
 webapps/docs/changelog.xml  | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/java/org/apache/tomcat/util/buf/Asn1Parser.java 
b/java/org/apache/tomcat/util/buf/Asn1Parser.java
index 1d88b113d4..1282dfc70b 100644
--- a/java/org/apache/tomcat/util/buf/Asn1Parser.java
+++ b/java/org/apache/tomcat/util/buf/Asn1Parser.java
@@ -17,6 +17,7 @@
 package org.apache.tomcat.util.buf;
 
 import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayDeque;
 import java.util.Deque;
 
@@ -36,6 +37,7 @@ public class Asn1Parser {
 public static final int TAG_OCTET_STRING = 0x04;
 public static final int TAG_NULL = 0x05;
 public static final int TAG_OID = 0x06;
+public static final int TAG_UTF8STRING = 0x0C;
 public static final int TAG_SEQUENCE = 0x30;
 public static final int TAG_ATTRIBUTE_BASE = 0xA0;
 
@@ -149,6 +151,12 @@ public class Asn1Parser {
 }
 
 
+public String parseUTF8String() {
+byte[] val = parseBytes(TAG_UTF8STRING);
+return new String(val, StandardCharsets.UTF_8);
+}
+
+
 public byte[] parseAttributeAsBytes(int index) {
 return parseBytes(TAG_ATTRIBUTE_BASE + index);
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 76fa899f24..70bb21df9d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -149,6 +149,9 @@
   
 Add periodic checking for WebDAV locks expiration. (remm)
   
+  
+Extend Asn1Parser to parse UTF8Strings. 
(michaelo)
+  
 
   
   


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



Re: [PR] Extend Asn1Parser to parse UTF8Strings [tomcat]

2024-05-03 Thread via GitHub


markt-asf merged PR #725:
URL: https://github.com/apache/tomcat/pull/725


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

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

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


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



Re: Our ASN.1 parser

2024-05-03 Thread Mark Thomas

On 03/05/2024 11:01, Michael Osipov wrote:

On 2024/05/03 08:59:17 Mark Thomas wrote:





There have been discussions about a new tomcat-shaded JAR that would
provide all the shaded dependencies we use both internally and with the
migration tool. My general concern with that is the volume of code. The
migration tool is already a 1MB JAR - most of it shaded code that is
never going to be used. There are tradeoffs to make there that need a
longer discussion. It is likely to be one of the topics at the Tomcat
Security day in Bratislava.


What is the benefit of a single JAR here for the public?


Removes the duplication of BCEL. We have a cut down version for JAR 
scanning and a full version in the migration tool although we'd need to 
check performance as that was one of the reasons for the trimmed down 
version.


Simpler maintenance for us (just update versions in POM). May mean users 
get updated dependencies faster. That said, if there was a real need for 
an update we'd do it now anyway so...


Overall, probably more direct benefits for us than users. Users get the 
indirect benefits of us spending less time managing these dependencies.


Mark

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



[PR] Extend Asn1Parser to parse UTF8Strings [tomcat]

2024-05-03 Thread via GitHub


michael-o opened a new pull request, #725:
URL: https://github.com/apache/tomcat/pull/725

   (no comment)


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

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

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


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



Re: Our ASN.1 parser

2024-05-03 Thread Michael Osipov
On 2024/05/03 08:59:17 Mark Thomas wrote:
> 
> 
> On 03/05/2024 08:17, Michael Osipov wrote:
> > Hi folks,
> > 
> > currenly we have a minimalistic ASN.1 parser in the code tree w/o any 
> > testing
> 
> The ASN.1 parsing is covered by the test suite.

My bad, I didn't make myself clear: there is not negative testing explicitly 
for bad input data.
 
> > since it assumes that the passed byte array is properly encoded.
> 
> Correct. For the Tomcat use case it is sufficient that parsing fails if 
> the input is invalid. It doesn't need to be particularly elegant at that 
> point.
> 
> > Now, I do have some X.509 related improvements which I'd like to bring 
> > upstream from my OSS project which I think will benefit everyone using 
> > X.509 (processing SAN from a client cert) in the enterprise world,
> 
> I'm not seeing much/any demand for this. Can you expand on the use case?

Yes, look at SAN:otherName. this custom field in CHOICE [0] is used in Active 
Directory environments to embed the user principal name into the certificate. 
With that UPN you can authenticate with certs from smartcard and find the 
subject in AD via LDAP.
The actual code: [1] with the change to Tomcat's parser [2].
That contribution is a separate mail and PR, of course.

> > but 
> > this requires extending the parser. In fact, I have written a 
> > minimalistic parser for my use case with error handling and swapped for 
> > the Tomcat's one and most tests fail with ArrayIndexOutOfBoundsException 
> > because our code does not check anything.
> 
> How minimal is minimal? Lines of code / JAR size?

My minimal, for the use case at least few hundred lines.

> > I do not want to write yet another full-blown parser, but do not also 
> > want to reinvent the wheel.
> > So several questions come to my mind:
> > 1. Since I do also have other OSS components for Tomcat which do require 
> > an ASN.1 parser would our position be use our parser at your own risk or 
> > solve the problem yourself? I need only SEQUENCEs, tagged types. Nothing 
> > fancy.
> 
> What do you need that the current Tomcat implementation doesn't provide?

UTF8String, typed tagged values. Basically they are trivial. Simple types, not 
constructed.

> I think our position is use Tomcat's if it works for you. We'll consider 
> PRs for enhancements if it doesn't. You are, of course, free to write 
> you own or use another implementation.

I'll do the PRs for our parser.

> > 2. Should we consider ditching it for something public and shade it like 
> > we do with other components? Apache Kerby ASN.1 is quite small and very 
> > decent.
> 
> Tomcat - 180 lines. Kerby - 100 kB JAR.
> 
> Kerby looks like a good choice if we want to go this route.
> 
> There have been discussions about a new tomcat-shaded JAR that would 
> provide all the shaded dependencies we use both internally and with the 
> migration tool. My general concern with that is the volume of code. The 
> migration tool is already a 1MB JAR - most of it shaded code that is 
> never going to be used. There are tradeoffs to make there that need a 
> longer discussion. It is likely to be one of the topics at the Tomcat 
> Security day in Bratislava.

What is the benefit of a single JAR here for the public?

[1] 
https://github.com/michael-o/tomcatspnegoad/blob/ca5096b4f0ae7b90ef479a31c066e3808aa70ef2/tomcat90/src/main/java/net/sf/michaelo/tomcat/realm/ActiveDirectoryRealm.java#L372-L408
[2] 
https://github.com/michael-o/tomcatspnegoad/commit/7d7616a834aadfc80d3533f7eea93458bb2bf53f

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



(tomcat) 03/03: Code clean-up - formatting. No functional change.

2024-05-03 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

commit f1792406b4780184fe9bbbdd9a6072b26ef981c9
Author: Mark Thomas 
AuthorDate: Fri May 3 10:19:33 2024 +0100

Code clean-up - formatting. No functional change.
---
 .../catalina/storeconfig/CatalinaClusterSF.java|  14 +-
 .../storeconfig/CertificateStoreAppender.java  |   5 +-
 .../org/apache/catalina/storeconfig/ChannelSF.java |   9 +-
 .../apache/catalina/storeconfig/ConnectorSF.java   |  17 +--
 .../storeconfig/ConnectorStoreAppender.java|  87 +--
 .../catalina/storeconfig/CredentialHandlerSF.java  |  22 ++-
 .../storeconfig/GlobalNamingResourcesSF.java   |  17 +--
 .../apache/catalina/storeconfig/IStoreConfig.java  |  51 +++
 .../apache/catalina/storeconfig/IStoreFactory.java |  11 +-
 .../apache/catalina/storeconfig/InterceptorSF.java |  24 ++-
 .../apache/catalina/storeconfig/JarScannerSF.java  |  10 +-
 java/org/apache/catalina/storeconfig/LoaderSF.java |  24 ++-
 .../org/apache/catalina/storeconfig/ManagerSF.java |  26 ++--
 .../catalina/storeconfig/NamingResourcesSF.java|  11 +-
 .../apache/catalina/storeconfig/OpenSSLConfSF.java |   5 +-
 .../catalina/storeconfig/PersistentManagerSF.java  |   7 +-
 java/org/apache/catalina/storeconfig/RealmSF.java  |  26 ++--
 .../catalina/storeconfig/SSLHostConfigSF.java  |   8 +-
 java/org/apache/catalina/storeconfig/SenderSF.java |   9 +-
 .../catalina/storeconfig/StandardContextSF.java| 117 +++
 .../catalina/storeconfig/StandardEngineSF.java |  13 +-
 .../catalina/storeconfig/StandardHostSF.java   |  17 +--
 .../catalina/storeconfig/StandardServerSF.java |  22 ++-
 .../catalina/storeconfig/StandardServiceSF.java|   7 +-
 .../apache/catalina/storeconfig/StoreAppender.java | 164 ++---
 .../apache/catalina/storeconfig/StoreConfig.java   |  76 --
 .../storeconfig/StoreConfigLifecycleListener.java  |  29 ++--
 .../catalina/storeconfig/StoreContextAppender.java |  78 +-
 .../catalina/storeconfig/StoreDescription.java |  46 ++
 .../catalina/storeconfig/StoreFactoryBase.java |  72 -
 .../catalina/storeconfig/StoreFactoryRule.java |  46 +++---
 .../catalina/storeconfig/StoreFileMover.java   |  26 ++--
 .../apache/catalina/storeconfig/StoreLoader.java   |  62 +++-
 .../apache/catalina/storeconfig/StoreRegistry.java |  31 ++--
 .../catalina/storeconfig/WatchedResourceSF.java|  13 +-
 .../catalina/storeconfig/WebResourceRootSF.java|  31 ++--
 .../catalina/storeconfig/WrapperLifecycleSF.java   |  13 +-
 .../catalina/storeconfig/WrapperListenerSF.java|  16 +-
 38 files changed, 556 insertions(+), 706 deletions(-)

diff --git a/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java 
b/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
index ce1ef29eff..0fed2ffde3 100644
--- a/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
+++ b/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
@@ -30,18 +30,18 @@ import org.apache.catalina.ha.tcp.SimpleTcpCluster;
 import org.apache.catalina.tribes.Channel;
 
 /**
- * Generate Cluster Element with Membership,Sender,Receiver,Deployer and
- * ReplicationValve
+ * Generate Cluster Element with Membership,Sender,Receiver,Deployer and 
ReplicationValve
  */
 public class CatalinaClusterSF extends StoreFactoryBase {
 
 /**
  * Store the specified Cluster children.
+ * 
  * {@inheritDoc}
  */
 @Override
-public void storeChildren(PrintWriter aWriter, int indent, Object aCluster,
-StoreDescription parentDesc) throws Exception {
+public void storeChildren(PrintWriter aWriter, int indent, Object 
aCluster, StoreDescription parentDesc)
+throws Exception {
 if (aCluster instanceof CatalinaCluster) {
 CatalinaCluster cluster = (CatalinaCluster) aCluster;
 if (cluster instanceof SimpleTcpCluster) {
@@ -69,10 +69,10 @@ public class CatalinaClusterSF extends StoreFactoryBase {
 
 if (aCluster instanceof SimpleTcpCluster) {
 // Store nested  elements
-LifecycleListener listeners[] = 
((SimpleTcpCluster)cluster).findLifecycleListeners();
+LifecycleListener listeners[] = ((SimpleTcpCluster) 
cluster).findLifecycleListeners();
 storeElementArray(aWriter, indent, listeners);
 // Store nested  elements
-ClusterListener mlisteners[] = 
((SimpleTcpCluster)cluster).findClusterListeners();
+ClusterListener mlisteners[] = ((SimpleTcpCluster) 
cluster).findClusterListeners();
 List clusterListeners = new ArrayList<>();
 for (ClusterListener clusterListener : mlisteners) {
 if (clusterListener != deployer) {
@@ -83,4 +83,4 @@ public class CatalinaClusterSF 

(tomcat) 02/03: Code clean-up - reformatting. No functional change.

2024-05-03 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

commit 6d6fe9365accacaca9d1906e5bec671356d13faa
Author: Mark Thomas 
AuthorDate: Fri May 3 10:16:36 2024 +0100

Code clean-up - reformatting. No functional change.

Re-applying formatting to previously formatted code.
---
 java/javax/security/auth/message/ServerAuth.java   |   3 +-
 java/javax/servlet/http/HttpServletRequest.java|   3 +-
 java/javax/servlet/http/HttpServletResponse.java   |   3 +-
 .../catalina/authenticator/AuthenticatorBase.java  |   6 +-
 .../catalina/authenticator/FormAuthenticator.java  |   6 +-
 .../authenticator/SpnegoAuthenticator.java |   3 +-
 .../org/apache/catalina/connector/InputBuffer.java |   4 +-
 java/org/apache/catalina/connector/Request.java|   6 +-
 .../catalina/core/ApplicationFilterChain.java  |   3 +-
 .../core/PropertiesRoleMappingListener.java|   9 +-
 java/org/apache/catalina/core/StandardContext.java |   7 +-
 .../apache/catalina/core/StandardHostValve.java|   6 +-
 java/org/apache/catalina/core/StandardServer.java  |  11 +--
 .../catalina/filters/CsrfPreventionFilter.java | 107 -
 java/org/apache/catalina/ha/CatalinaCluster.java   |   1 +
 java/org/apache/catalina/ha/ClusterManager.java|   7 +-
 java/org/apache/catalina/ha/ClusterMessage.java|   2 +
 .../apache/catalina/ha/deploy/FarmWarDeployer.java |   1 +
 .../ha/session/ClusterSessionListener.java |   1 +
 .../apache/catalina/ha/session/DeltaSession.java   |   2 +
 .../catalina/ha/session/SessionMessageImpl.java|   1 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  10 +-
 .../apache/catalina/manager/StatusTransformer.java |  70 +-
 java/org/apache/catalina/realm/CombinedRealm.java  |   3 +-
 java/org/apache/catalina/realm/RealmBase.java  |  19 ++--
 .../apache/catalina/security/SecurityListener.java |  19 ++--
 java/org/apache/catalina/session/ManagerBase.java  |   5 +
 .../startup/CatalinaBaseConfigurationSource.java   |   3 +-
 28 files changed, 168 insertions(+), 153 deletions(-)

diff --git a/java/javax/security/auth/message/ServerAuth.java 
b/java/javax/security/auth/message/ServerAuth.java
index 392bc5094b..f13e5bd7e9 100644
--- a/java/javax/security/auth/message/ServerAuth.java
+++ b/java/javax/security/auth/message/ServerAuth.java
@@ -31,7 +31,8 @@ public interface ServerAuth {
  *
  * @throws AuthException If the a failure occurred in a manner that 
prevented the failure from being communicated
  *   via messageInfo
- */AuthStatus validateRequest(MessageInfo messageInfo, Subject 
clientSubject, Subject serviceSubject)
+ */
+AuthStatus validateRequest(MessageInfo messageInfo, Subject clientSubject, 
Subject serviceSubject)
 throws AuthException;
 
 /**
diff --git a/java/javax/servlet/http/HttpServletRequest.java 
b/java/javax/servlet/http/HttpServletRequest.java
index 557979f6f6..b1dfdc2e07 100644
--- a/java/javax/servlet/http/HttpServletRequest.java
+++ b/java/javax/servlet/http/HttpServletRequest.java
@@ -512,8 +512,7 @@ public interface HttpServletRequest extends ServletRequest {
  *
  * @since Servlet 3.1
  */
- T upgrade(Class httpUpgradeHandlerClass)
-throws IOException, ServletException;
+ T upgrade(Class httpUpgradeHandlerClass) 
throws IOException, ServletException;
 
 /**
  * Obtain a Map of the trailer fields that is not backed by the request 
object.
diff --git a/java/javax/servlet/http/HttpServletResponse.java 
b/java/javax/servlet/http/HttpServletResponse.java
index dfba4b682e..44c6b20499 100644
--- a/java/javax/servlet/http/HttpServletResponse.java
+++ b/java/javax/servlet/http/HttpServletResponse.java
@@ -140,7 +140,8 @@ public interface HttpServletResponse extends 
ServletResponse {
  * This method has no effect if called from an include.
  * 
  * This method accepts both relative and absolute URLs. Absolute URLs 
passed to this method are used as provided as
- * the redirect location URL. Relative URLs are converted to absolute 
URLs. If converting a relative URL to an absolute URL then:
+ * the redirect location URL. Relative URLs are converted to absolute 
URLs. If converting a relative URL to an
+ * absolute URL then:
  * 
  * If the location is relative without a leading '/' the container 
interprets it as relative to the current
  * request URI.
diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index 025c3b59ff..c92548c229 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -974,7 +974,8 @@ public abstract class AuthenticatorBase extends ValveBase 
implements Authenticat
 

(tomcat) 01/03: Code clean-up - formatting. No functional change.

2024-05-03 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

commit f7ebc3345518dfcdf3da3c06c09a6df6218c4d1a
Author: Mark Thomas 
AuthorDate: Fri May 3 10:06:02 2024 +0100

Code clean-up - formatting. No functional change.
---
 .../apache/catalina/ant/AbstractCatalinaTask.java  |  58 +++
 .../catalina/ant/BaseRedirectorHelperTask.java |  89 ---
 java/org/apache/catalina/ant/DeployTask.java   |  12 +-
 java/org/apache/catalina/ant/FindLeaksTask.java|  12 +-
 .../apache/catalina/ant/JKStatusUpdateTask.java|  96 
 java/org/apache/catalina/ant/JMXGetTask.java   |  25 +--
 java/org/apache/catalina/ant/JMXQueryTask.java |  19 ++-
 java/org/apache/catalina/ant/JMXSetTask.java   |  35 +++--
 java/org/apache/catalina/ant/ListTask.java |   4 +-
 java/org/apache/catalina/ant/ReloadTask.java   |   5 +-
 java/org/apache/catalina/ant/ResourcesTask.java|  10 +-
 java/org/apache/catalina/ant/ServerinfoTask.java   |   3 +-
 java/org/apache/catalina/ant/SessionsTask.java |   3 +-
 .../catalina/ant/SslConnectorCiphersTask.java  |   4 +-
 java/org/apache/catalina/ant/StartTask.java|   4 +-
 java/org/apache/catalina/ant/StopTask.java |   4 +-
 java/org/apache/catalina/ant/ThreaddumpTask.java   |   4 +-
 java/org/apache/catalina/ant/UndeployTask.java |   4 +-
 java/org/apache/catalina/ant/ValidatorTask.java|  12 +-
 java/org/apache/catalina/ant/VminfoTask.java   |   4 +-
 java/org/apache/catalina/ant/jmx/Arg.java  |   8 +-
 .../catalina/ant/jmx/JMXAccessorCondition.java |  40 +++--
 .../catalina/ant/jmx/JMXAccessorConditionBase.java |  36 +++--
 .../catalina/ant/jmx/JMXAccessorCreateTask.java|  49 +++---
 .../ant/jmx/JMXAccessorEqualsCondition.java|   9 +-
 .../catalina/ant/jmx/JMXAccessorGetTask.java   |  26 ++--
 .../catalina/ant/jmx/JMXAccessorInvokeTask.java|  67 
 .../catalina/ant/jmx/JMXAccessorQueryTask.java |  27 ++--
 .../catalina/ant/jmx/JMXAccessorSetTask.java   |  44 +++---
 .../apache/catalina/ant/jmx/JMXAccessorTask.java   | 173 +
 .../ant/jmx/JMXAccessorUnregisterTask.java |  28 ++--
 31 files changed, 420 insertions(+), 494 deletions(-)

diff --git a/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
index 61ac76e5e5..810929a4d9 100644
--- a/java/org/apache/catalina/ant/AbstractCatalinaTask.java
+++ b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
@@ -32,11 +32,11 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 
 /**
- * Abstract base class for Ant tasks that interact with the Manager 
web
- * application for dynamically deploying and undeploying applications. These
- * tasks require Ant 1.4 or later.
+ * Abstract base class for Ant tasks that interact with the Manager 
web application for dynamically deploying
+ * and undeploying applications. These tasks require Ant 1.4 or later.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public abstract class AbstractCatalinaTask extends BaseRedirectorHelperTask {
@@ -107,16 +107,14 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 }
 
 /**
- * If set to true - ignore the constraint of the first line of the response
- * message that must be "OK -".
+ * If set to true - ignore the constraint of the first line of the 
response message that must be "OK -".
  * 
- * When this attribute is set to {@code false} (the default), the first 
line
- * of server response is expected to start with "OK -". If it does not then
- * the task is considered as failed and the first line is treated as an
- * error message.
+ * When this attribute is set to {@code false} (the default), the first 
line of server response is expected to start
+ * with "OK -". If it does not then the task is considered as failed and 
the first line is treated as an error
+ * message.
  * 
- * When this attribute is set to {@code true}, the first line of the
- * response is treated like any other, regardless of its text.
+ * When this attribute is set to {@code true}, the first line of the 
response is treated like any other, regardless
+ * of its text.
  */
 protected boolean ignoreResponseConstraint = false;
 
@@ -132,9 +130,8 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 // - Public Methods
 
 /**
- * Execute the specified command. This logic only performs the common
- * attribute validation required by all subclasses; it does not perform any
- * functional logic directly.
+ * Execute the specified command. This logic only performs the common 
attribute validation required by all

(tomcat) branch 9.0.x updated (258cf33de7 -> f1792406b4)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 258cf33de7 Improvements to Japanese translations by tak7iji.
 new f7ebc33455 Code clean-up - formatting. No functional change.
 new 6d6fe9365a Code clean-up - reformatting. No functional change.
 new f1792406b4 Code clean-up - formatting. No functional change.

The 3 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/javax/security/auth/message/ServerAuth.java   |   3 +-
 java/javax/servlet/http/HttpServletRequest.java|   3 +-
 java/javax/servlet/http/HttpServletResponse.java   |   3 +-
 .../apache/catalina/ant/AbstractCatalinaTask.java  |  58 +++
 .../catalina/ant/BaseRedirectorHelperTask.java |  89 ---
 java/org/apache/catalina/ant/DeployTask.java   |  12 +-
 java/org/apache/catalina/ant/FindLeaksTask.java|  12 +-
 .../apache/catalina/ant/JKStatusUpdateTask.java|  96 
 java/org/apache/catalina/ant/JMXGetTask.java   |  25 +--
 java/org/apache/catalina/ant/JMXQueryTask.java |  19 ++-
 java/org/apache/catalina/ant/JMXSetTask.java   |  35 +++--
 java/org/apache/catalina/ant/ListTask.java |   4 +-
 java/org/apache/catalina/ant/ReloadTask.java   |   5 +-
 java/org/apache/catalina/ant/ResourcesTask.java|  10 +-
 java/org/apache/catalina/ant/ServerinfoTask.java   |   3 +-
 java/org/apache/catalina/ant/SessionsTask.java |   3 +-
 .../catalina/ant/SslConnectorCiphersTask.java  |   4 +-
 java/org/apache/catalina/ant/StartTask.java|   4 +-
 java/org/apache/catalina/ant/StopTask.java |   4 +-
 java/org/apache/catalina/ant/ThreaddumpTask.java   |   4 +-
 java/org/apache/catalina/ant/UndeployTask.java |   4 +-
 java/org/apache/catalina/ant/ValidatorTask.java|  12 +-
 java/org/apache/catalina/ant/VminfoTask.java   |   4 +-
 java/org/apache/catalina/ant/jmx/Arg.java  |   8 +-
 .../catalina/ant/jmx/JMXAccessorCondition.java |  40 +++--
 .../catalina/ant/jmx/JMXAccessorConditionBase.java |  36 +++--
 .../catalina/ant/jmx/JMXAccessorCreateTask.java|  49 +++---
 .../ant/jmx/JMXAccessorEqualsCondition.java|   9 +-
 .../catalina/ant/jmx/JMXAccessorGetTask.java   |  26 ++--
 .../catalina/ant/jmx/JMXAccessorInvokeTask.java|  67 
 .../catalina/ant/jmx/JMXAccessorQueryTask.java |  27 ++--
 .../catalina/ant/jmx/JMXAccessorSetTask.java   |  44 +++---
 .../apache/catalina/ant/jmx/JMXAccessorTask.java   | 173 +
 .../ant/jmx/JMXAccessorUnregisterTask.java |  28 ++--
 .../catalina/authenticator/AuthenticatorBase.java  |   6 +-
 .../catalina/authenticator/FormAuthenticator.java  |   6 +-
 .../authenticator/SpnegoAuthenticator.java |   3 +-
 .../org/apache/catalina/connector/InputBuffer.java |   4 +-
 java/org/apache/catalina/connector/Request.java|   6 +-
 .../catalina/core/ApplicationFilterChain.java  |   3 +-
 .../core/PropertiesRoleMappingListener.java|   9 +-
 java/org/apache/catalina/core/StandardContext.java |   7 +-
 .../apache/catalina/core/StandardHostValve.java|   6 +-
 java/org/apache/catalina/core/StandardServer.java  |  11 +-
 .../catalina/filters/CsrfPreventionFilter.java | 107 +
 java/org/apache/catalina/ha/CatalinaCluster.java   |   1 +
 java/org/apache/catalina/ha/ClusterManager.java|   7 +-
 java/org/apache/catalina/ha/ClusterMessage.java|   2 +
 .../apache/catalina/ha/deploy/FarmWarDeployer.java |   1 +
 .../ha/session/ClusterSessionListener.java |   1 +
 .../apache/catalina/ha/session/DeltaSession.java   |   2 +
 .../catalina/ha/session/SessionMessageImpl.java|   1 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  10 +-
 .../apache/catalina/manager/StatusTransformer.java |  70 ++---
 java/org/apache/catalina/realm/CombinedRealm.java  |   3 +-
 java/org/apache/catalina/realm/RealmBase.java  |  19 ++-
 .../apache/catalina/security/SecurityListener.java |  19 +--
 java/org/apache/catalina/session/ManagerBase.java  |   5 +
 .../startup/CatalinaBaseConfigurationSource.java   |   3 +-
 .../catalina/storeconfig/CatalinaClusterSF.java|  14 +-
 .../storeconfig/CertificateStoreAppender.java  |   5 +-
 .../org/apache/catalina/storeconfig/ChannelSF.java |   9 +-
 .../apache/catalina/storeconfig/ConnectorSF.java   |  17 +-
 .../storeconfig/ConnectorStoreAppender.java|  87 +--
 .../catalina/storeconfig/CredentialHandlerSF.java  |  22 ++-
 .../storeconfig/GlobalNamingResourcesSF.java   |  17 +-
 .../apache/catalina/storeconfig/IStoreConfig.java  |  51 +++---
 .../apache/catalina/storeconfig/IStoreFactory.java |  11 +-
 

Re: Our ASN.1 parser

2024-05-03 Thread Mark Thomas




On 03/05/2024 08:17, Michael Osipov wrote:

Hi folks,

currenly we have a minimalistic ASN.1 parser in the code tree w/o any 
testing


The ASN.1 parsing is covered by the test suite.


since it assumes that the passed byte array is properly encoded.


Correct. For the Tomcat use case it is sufficient that parsing fails if 
the input is invalid. It doesn't need to be particularly elegant at that 
point.


Now, I do have some X.509 related improvements which I'd like to bring 
upstream from my OSS project which I think will benefit everyone using 
X.509 (processing SAN from a client cert) in the enterprise world,


I'm not seeing much/any demand for this. Can you expand on the use case?

but 
this requires extending the parser. In fact, I have written a 
minimalistic parser for my use case with error handling and swapped for 
the Tomcat's one and most tests fail with ArrayIndexOutOfBoundsException 
because our code does not check anything.


How minimal is minimal? Lines of code / JAR size?

I do not want to write yet another full-blown parser, but do not also 
want to reinvent the wheel.

So several questions come to my mind:
1. Since I do also have other OSS components for Tomcat which do require 
an ASN.1 parser would our position be use our parser at your own risk or 
solve the problem yourself? I need only SEQUENCEs, tagged types. Nothing 
fancy.


What do you need that the current Tomcat implementation doesn't provide?

I think our position is use Tomcat's if it works for you. We'll consider 
PRs for enhancements if it doesn't. You are, of course, free to write 
you own or use another implementation.


2. Should we consider ditching it for something public and shade it like 
we do with other components? Apache Kerby ASN.1 is quite small and very 
decent.


Tomcat - 180 lines. Kerby - 100 kB JAR.

Kerby looks like a good choice if we want to go this route.

There have been discussions about a new tomcat-shaded JAR that would 
provide all the shaded dependencies we use both internally and with the 
migration tool. My general concern with that is the volume of code. The 
migration tool is already a 1MB JAR - most of it shaded code that is 
never going to be used. There are tradeoffs to make there that need a 
longer discussion. It is likely to be one of the topics at the Tomcat 
Security day in Bratislava.


Mark

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



(tomcat) 01/05: Fix format

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 8d90c1d517592e292712bb41fc9de5c03d3f9476
Author: Mark Thomas 
AuthorDate: Fri May 3 09:25:28 2024 +0100

Fix format
---
 java/jakarta/el/LocalStrings.properties | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/jakarta/el/LocalStrings.properties 
b/java/jakarta/el/LocalStrings.properties
index e0bc40d9f8..c337c071e5 100644
--- a/java/jakarta/el/LocalStrings.properties
+++ b/java/jakarta/el/LocalStrings.properties
@@ -43,6 +43,7 @@ propertyNotReadable=Property [{1}] not readable on type [{0}]
 propertyNotWritable=Property [{1}] not writable on type [{0}]
 propertyReadError=Error reading [{1}] on type [{0}]
 propertyWriteError=Error writing [{1}] on type [{0}]
+
 resolverNotWritable=ELResolver not writable for type [{0}]
 
 staticFieldELResolver.methodNotFound=No matching public static method named 
[{0}] found on class [{1}]


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



(tomcat) 05/05: Align with 10.1.x.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 9e4319821298edc17803c3b6023bd53567c4c66c
Author: Mark Thomas 
AuthorDate: Fri May 3 09:35:19 2024 +0100

Align with 10.1.x.
---
 java/org/apache/catalina/ssi/SSIExec.java | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/ssi/SSIExec.java 
b/java/org/apache/catalina/ssi/SSIExec.java
index 2def731ea2..07a2499623 100644
--- a/java/org/apache/catalina/ssi/SSIExec.java
+++ b/java/org/apache/catalina/ssi/SSIExec.java
@@ -20,6 +20,7 @@ import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
+import java.util.StringTokenizer;
 
 import org.apache.catalina.util.IOTools;
 import org.apache.tomcat.util.res.StringManager;
@@ -54,7 +55,12 @@ public class SSIExec implements SSICommand {
 boolean foundProgram = false;
 try {
 Runtime rt = Runtime.getRuntime();
-Process proc = rt.exec(substitutedValue);
+StringTokenizer st = new StringTokenizer(substitutedValue);
+String[] cmdArray = new String[st.countTokens()];
+for (int i = 0; i < cmdArray.length; i++) {
+cmdArray[i] = st.nextToken();
+}
+Process proc = rt.exec(cmdArray);
 foundProgram = true;
 char[] buf = new char[BUFFER_SIZE];
 try (BufferedReader stdOutReader = new BufferedReader(new 
InputStreamReader(proc.getInputStream()));


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



(tomcat) 02/05: Code clean-up - formatting. No functional change.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit d90340b31a21a45d9235ca343a2875a671ee9784
Author: Mark Thomas 
AuthorDate: Fri May 3 09:25:52 2024 +0100

Code clean-up - formatting. No functional change.
---
 .../catalina/storeconfig/CatalinaClusterSF.java|  14 +-
 .../storeconfig/CertificateStoreAppender.java  |   5 +-
 .../org/apache/catalina/storeconfig/ChannelSF.java |   9 +-
 .../apache/catalina/storeconfig/ConnectorSF.java   |  17 +--
 .../storeconfig/ConnectorStoreAppender.java|  84 +--
 .../catalina/storeconfig/CredentialHandlerSF.java  |  22 ++-
 .../storeconfig/GlobalNamingResourcesSF.java   |  17 +--
 .../apache/catalina/storeconfig/IStoreConfig.java  |  51 +++
 .../apache/catalina/storeconfig/IStoreFactory.java |  11 +-
 .../apache/catalina/storeconfig/InterceptorSF.java |  24 ++-
 .../apache/catalina/storeconfig/JarScannerSF.java  |  10 +-
 java/org/apache/catalina/storeconfig/LoaderSF.java |  24 ++-
 .../org/apache/catalina/storeconfig/ManagerSF.java |  26 ++--
 .../catalina/storeconfig/NamingResourcesSF.java|  11 +-
 .../apache/catalina/storeconfig/OpenSSLConfSF.java |   5 +-
 .../catalina/storeconfig/PersistentManagerSF.java  |   7 +-
 java/org/apache/catalina/storeconfig/RealmSF.java  |  26 ++--
 .../catalina/storeconfig/SSLHostConfigSF.java  |   8 +-
 java/org/apache/catalina/storeconfig/SenderSF.java |   9 +-
 .../catalina/storeconfig/StandardContextSF.java| 117 +++
 .../catalina/storeconfig/StandardEngineSF.java |  13 +-
 .../catalina/storeconfig/StandardHostSF.java   |  17 +--
 .../catalina/storeconfig/StandardServerSF.java |  22 ++-
 .../catalina/storeconfig/StandardServiceSF.java|   7 +-
 .../apache/catalina/storeconfig/StoreAppender.java | 164 ++---
 .../apache/catalina/storeconfig/StoreConfig.java   |  76 --
 .../storeconfig/StoreConfigLifecycleListener.java  |  29 ++--
 .../catalina/storeconfig/StoreContextAppender.java |  78 +-
 .../catalina/storeconfig/StoreDescription.java |  46 ++
 .../catalina/storeconfig/StoreFactoryBase.java |  72 -
 .../catalina/storeconfig/StoreFactoryRule.java |  46 +++---
 .../catalina/storeconfig/StoreFileMover.java   |  26 ++--
 .../apache/catalina/storeconfig/StoreLoader.java   |  62 +++-
 .../apache/catalina/storeconfig/StoreRegistry.java |  31 ++--
 .../catalina/storeconfig/WatchedResourceSF.java|  13 +-
 .../catalina/storeconfig/WebResourceRootSF.java|  31 ++--
 .../catalina/storeconfig/WrapperLifecycleSF.java   |  13 +-
 .../catalina/storeconfig/WrapperListenerSF.java|  16 +-
 38 files changed, 555 insertions(+), 704 deletions(-)

diff --git a/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java 
b/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
index ce1ef29eff..0fed2ffde3 100644
--- a/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
+++ b/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
@@ -30,18 +30,18 @@ import org.apache.catalina.ha.tcp.SimpleTcpCluster;
 import org.apache.catalina.tribes.Channel;
 
 /**
- * Generate Cluster Element with Membership,Sender,Receiver,Deployer and
- * ReplicationValve
+ * Generate Cluster Element with Membership,Sender,Receiver,Deployer and 
ReplicationValve
  */
 public class CatalinaClusterSF extends StoreFactoryBase {
 
 /**
  * Store the specified Cluster children.
+ * 
  * {@inheritDoc}
  */
 @Override
-public void storeChildren(PrintWriter aWriter, int indent, Object aCluster,
-StoreDescription parentDesc) throws Exception {
+public void storeChildren(PrintWriter aWriter, int indent, Object 
aCluster, StoreDescription parentDesc)
+throws Exception {
 if (aCluster instanceof CatalinaCluster) {
 CatalinaCluster cluster = (CatalinaCluster) aCluster;
 if (cluster instanceof SimpleTcpCluster) {
@@ -69,10 +69,10 @@ public class CatalinaClusterSF extends StoreFactoryBase {
 
 if (aCluster instanceof SimpleTcpCluster) {
 // Store nested  elements
-LifecycleListener listeners[] = 
((SimpleTcpCluster)cluster).findLifecycleListeners();
+LifecycleListener listeners[] = ((SimpleTcpCluster) 
cluster).findLifecycleListeners();
 storeElementArray(aWriter, indent, listeners);
 // Store nested  elements
-ClusterListener mlisteners[] = 
((SimpleTcpCluster)cluster).findClusterListeners();
+ClusterListener mlisteners[] = ((SimpleTcpCluster) 
cluster).findClusterListeners();
 List clusterListeners = new ArrayList<>();
 for (ClusterListener clusterListener : mlisteners) {
 if (clusterListener != deployer) {
@@ -83,4 +83,4 @@ public class 

(tomcat) 04/05: Code clean-up - reformatting. No functional change.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit a84d9a771795a8b8f065577df46ac7cc93265b19
Author: Mark Thomas 
AuthorDate: Fri May 3 09:34:06 2024 +0100

Code clean-up - reformatting. No functional change.

Re-applying formatting to previously formatted code.
---
 java/jakarta/servlet/http/HttpServletRequest.java  |   3 +-
 java/jakarta/servlet/http/HttpServletResponse.java |   3 +-
 .../catalina/authenticator/AuthenticatorBase.java  |   3 +-
 .../catalina/authenticator/FormAuthenticator.java  |   6 +-
 .../authenticator/SpnegoAuthenticator.java |   3 +-
 .../org/apache/catalina/connector/InputBuffer.java |   4 +-
 java/org/apache/catalina/connector/Request.java|   9 +-
 .../catalina/core/ApplicationDispatcher.java   |   3 +-
 .../catalina/core/ApplicationFilterChain.java  |   3 +-
 .../core/ApplicationSessionCookieConfig.java   |   3 +-
 .../catalina/core/OpenSSLLifecycleListener.java|  41 
 .../core/PropertiesRoleMappingListener.java|   9 +-
 java/org/apache/catalina/core/StandardContext.java |   7 +-
 .../apache/catalina/core/StandardHostValve.java|   6 +-
 java/org/apache/catalina/core/StandardServer.java  |  11 +--
 .../catalina/filters/CsrfPreventionFilter.java | 107 -
 java/org/apache/catalina/ha/CatalinaCluster.java   |   1 +
 java/org/apache/catalina/ha/ClusterManager.java|   7 +-
 java/org/apache/catalina/ha/ClusterMessage.java|   2 +
 .../apache/catalina/ha/deploy/FarmWarDeployer.java |   1 +
 .../ha/session/ClusterSessionListener.java |   1 +
 .../apache/catalina/ha/session/DeltaSession.java   |   2 +
 .../catalina/ha/session/SessionMessageImpl.java|   1 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  10 +-
 .../apache/catalina/manager/StatusTransformer.java |  70 +-
 java/org/apache/catalina/realm/CombinedRealm.java  |   3 +-
 java/org/apache/catalina/realm/RealmBase.java  |  19 ++--
 .../apache/catalina/security/SecurityListener.java |  19 ++--
 .../apache/catalina/session/DataSourceStore.java   |   6 +-
 java/org/apache/catalina/session/ManagerBase.java  |   5 +
 .../startup/CatalinaBaseConfigurationSource.java   |   3 +-
 java/org/apache/catalina/startup/Tomcat.java   |   9 +-
 32 files changed, 199 insertions(+), 181 deletions(-)

diff --git a/java/jakarta/servlet/http/HttpServletRequest.java 
b/java/jakarta/servlet/http/HttpServletRequest.java
index 7bb78cb999..d7ecdddc4a 100644
--- a/java/jakarta/servlet/http/HttpServletRequest.java
+++ b/java/jakarta/servlet/http/HttpServletRequest.java
@@ -508,8 +508,7 @@ public interface HttpServletRequest extends ServletRequest {
  *
  * @since Servlet 3.1
  */
- T upgrade(Class httpUpgradeHandlerClass)
-throws IOException, ServletException;
+ T upgrade(Class httpUpgradeHandlerClass) 
throws IOException, ServletException;
 
 /**
  * Obtain a Map of the trailer fields that is not backed by the request 
object.
diff --git a/java/jakarta/servlet/http/HttpServletResponse.java 
b/java/jakarta/servlet/http/HttpServletResponse.java
index 26405e08b5..eabef54f66 100644
--- a/java/jakarta/servlet/http/HttpServletResponse.java
+++ b/java/jakarta/servlet/http/HttpServletResponse.java
@@ -119,7 +119,8 @@ public interface HttpServletResponse extends 
ServletResponse {
  * This method has no effect if called from an include.
  * 
  * This method accepts both relative and absolute URLs. Absolute URLs 
passed to this method are used as provided as
- * the redirect location URL. Relative URLs are converted to absolute 
URLs. If converting a relative URL to an absolute URL then:
+ * the redirect location URL. Relative URLs are converted to absolute 
URLs. If converting a relative URL to an
+ * absolute URL then:
  * 
  * If the location is relative without a leading '/' the container 
interprets it as relative to the current
  * request URI.
diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index e52fa2f109..fc8b13cd7a 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -975,7 +975,8 @@ public abstract class AuthenticatorBase extends ValveBase 
implements Authenticat
 associate(ssoId, request.getSessionInternal(true));
 
 if (log.isDebugEnabled()) {
-log.debug(sm.getString("authenticator.reauthentication", 
request.getUserPrincipal().getName(), request.getAuthType()));
+log.debug(sm.getString("authenticator.reauthentication", 
request.getUserPrincipal().getName(),
+request.getAuthType()));
 }
 }
 
diff --git 

(tomcat) 03/05: Code clean-up - formatting. No functional change.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 70f4e5b84bcb9a7228ad320176f3821a41aaabf8
Author: Mark Thomas 
AuthorDate: Fri May 3 09:26:36 2024 +0100

Code clean-up - formatting. No functional change.
---
 .../apache/catalina/ant/AbstractCatalinaTask.java  |  58 +++
 .../catalina/ant/BaseRedirectorHelperTask.java |  89 ---
 java/org/apache/catalina/ant/DeployTask.java   |  12 +-
 java/org/apache/catalina/ant/FindLeaksTask.java|  12 +-
 .../apache/catalina/ant/JKStatusUpdateTask.java|  96 
 java/org/apache/catalina/ant/JMXGetTask.java   |  25 +--
 java/org/apache/catalina/ant/JMXQueryTask.java |  19 ++-
 java/org/apache/catalina/ant/JMXSetTask.java   |  35 +++--
 java/org/apache/catalina/ant/ListTask.java |   4 +-
 java/org/apache/catalina/ant/ReloadTask.java   |   5 +-
 java/org/apache/catalina/ant/ResourcesTask.java|  10 +-
 java/org/apache/catalina/ant/ServerinfoTask.java   |   3 +-
 java/org/apache/catalina/ant/SessionsTask.java |   3 +-
 .../catalina/ant/SslConnectorCiphersTask.java  |   4 +-
 java/org/apache/catalina/ant/StartTask.java|   4 +-
 java/org/apache/catalina/ant/StopTask.java |   4 +-
 java/org/apache/catalina/ant/ThreaddumpTask.java   |   4 +-
 java/org/apache/catalina/ant/UndeployTask.java |   4 +-
 java/org/apache/catalina/ant/ValidatorTask.java|  12 +-
 java/org/apache/catalina/ant/VminfoTask.java   |   4 +-
 java/org/apache/catalina/ant/jmx/Arg.java  |   8 +-
 .../catalina/ant/jmx/JMXAccessorCondition.java |  40 +++--
 .../catalina/ant/jmx/JMXAccessorConditionBase.java |  36 +++--
 .../catalina/ant/jmx/JMXAccessorCreateTask.java|  49 +++---
 .../ant/jmx/JMXAccessorEqualsCondition.java|   9 +-
 .../catalina/ant/jmx/JMXAccessorGetTask.java   |  26 ++--
 .../catalina/ant/jmx/JMXAccessorInvokeTask.java|  67 
 .../catalina/ant/jmx/JMXAccessorQueryTask.java |  27 ++--
 .../catalina/ant/jmx/JMXAccessorSetTask.java   |  44 +++---
 .../apache/catalina/ant/jmx/JMXAccessorTask.java   | 173 +
 .../ant/jmx/JMXAccessorUnregisterTask.java |  28 ++--
 31 files changed, 420 insertions(+), 494 deletions(-)

diff --git a/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
index 61ac76e5e5..810929a4d9 100644
--- a/java/org/apache/catalina/ant/AbstractCatalinaTask.java
+++ b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
@@ -32,11 +32,11 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 
 /**
- * Abstract base class for Ant tasks that interact with the Manager 
web
- * application for dynamically deploying and undeploying applications. These
- * tasks require Ant 1.4 or later.
+ * Abstract base class for Ant tasks that interact with the Manager 
web application for dynamically deploying
+ * and undeploying applications. These tasks require Ant 1.4 or later.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public abstract class AbstractCatalinaTask extends BaseRedirectorHelperTask {
@@ -107,16 +107,14 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 }
 
 /**
- * If set to true - ignore the constraint of the first line of the response
- * message that must be "OK -".
+ * If set to true - ignore the constraint of the first line of the 
response message that must be "OK -".
  * 
- * When this attribute is set to {@code false} (the default), the first 
line
- * of server response is expected to start with "OK -". If it does not then
- * the task is considered as failed and the first line is treated as an
- * error message.
+ * When this attribute is set to {@code false} (the default), the first 
line of server response is expected to start
+ * with "OK -". If it does not then the task is considered as failed and 
the first line is treated as an error
+ * message.
  * 
- * When this attribute is set to {@code true}, the first line of the
- * response is treated like any other, regardless of its text.
+ * When this attribute is set to {@code true}, the first line of the 
response is treated like any other, regardless
+ * of its text.
  */
 protected boolean ignoreResponseConstraint = false;
 
@@ -132,9 +130,8 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 // - Public Methods
 
 /**
- * Execute the specified command. This logic only performs the common
- * attribute validation required by all subclasses; it does not perform any
- * functional logic directly.
+ * Execute the specified command. This logic only performs the common 
attribute validation required by 

(tomcat) branch 10.1.x updated (fea6de2b7f -> 9e43198212)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from fea6de2b7f Improvements to Japanese translations by tak7iji. (markt)
 new 8d90c1d517 Fix format
 new d90340b31a Code clean-up - formatting. No functional change.
 new 70f4e5b84b Code clean-up - formatting. No functional change.
 new a84d9a7717 Code clean-up - reformatting. No functional change.
 new 9e43198212 Align with 10.1.x.

The 5 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/jakarta/el/LocalStrings.properties|   1 +
 java/jakarta/servlet/http/HttpServletRequest.java  |   3 +-
 java/jakarta/servlet/http/HttpServletResponse.java |   3 +-
 .../apache/catalina/ant/AbstractCatalinaTask.java  |  58 +++
 .../catalina/ant/BaseRedirectorHelperTask.java |  89 ---
 java/org/apache/catalina/ant/DeployTask.java   |  12 +-
 java/org/apache/catalina/ant/FindLeaksTask.java|  12 +-
 .../apache/catalina/ant/JKStatusUpdateTask.java|  96 
 java/org/apache/catalina/ant/JMXGetTask.java   |  25 +--
 java/org/apache/catalina/ant/JMXQueryTask.java |  19 ++-
 java/org/apache/catalina/ant/JMXSetTask.java   |  35 +++--
 java/org/apache/catalina/ant/ListTask.java |   4 +-
 java/org/apache/catalina/ant/ReloadTask.java   |   5 +-
 java/org/apache/catalina/ant/ResourcesTask.java|  10 +-
 java/org/apache/catalina/ant/ServerinfoTask.java   |   3 +-
 java/org/apache/catalina/ant/SessionsTask.java |   3 +-
 .../catalina/ant/SslConnectorCiphersTask.java  |   4 +-
 java/org/apache/catalina/ant/StartTask.java|   4 +-
 java/org/apache/catalina/ant/StopTask.java |   4 +-
 java/org/apache/catalina/ant/ThreaddumpTask.java   |   4 +-
 java/org/apache/catalina/ant/UndeployTask.java |   4 +-
 java/org/apache/catalina/ant/ValidatorTask.java|  12 +-
 java/org/apache/catalina/ant/VminfoTask.java   |   4 +-
 java/org/apache/catalina/ant/jmx/Arg.java  |   8 +-
 .../catalina/ant/jmx/JMXAccessorCondition.java |  40 +++--
 .../catalina/ant/jmx/JMXAccessorConditionBase.java |  36 +++--
 .../catalina/ant/jmx/JMXAccessorCreateTask.java|  49 +++---
 .../ant/jmx/JMXAccessorEqualsCondition.java|   9 +-
 .../catalina/ant/jmx/JMXAccessorGetTask.java   |  26 ++--
 .../catalina/ant/jmx/JMXAccessorInvokeTask.java|  67 
 .../catalina/ant/jmx/JMXAccessorQueryTask.java |  27 ++--
 .../catalina/ant/jmx/JMXAccessorSetTask.java   |  44 +++---
 .../apache/catalina/ant/jmx/JMXAccessorTask.java   | 173 +
 .../ant/jmx/JMXAccessorUnregisterTask.java |  28 ++--
 .../catalina/authenticator/AuthenticatorBase.java  |   3 +-
 .../catalina/authenticator/FormAuthenticator.java  |   6 +-
 .../authenticator/SpnegoAuthenticator.java |   3 +-
 .../org/apache/catalina/connector/InputBuffer.java |   4 +-
 java/org/apache/catalina/connector/Request.java|   9 +-
 .../catalina/core/ApplicationDispatcher.java   |   3 +-
 .../catalina/core/ApplicationFilterChain.java  |   3 +-
 .../core/ApplicationSessionCookieConfig.java   |   3 +-
 .../catalina/core/OpenSSLLifecycleListener.java|  41 +++--
 .../core/PropertiesRoleMappingListener.java|   9 +-
 java/org/apache/catalina/core/StandardContext.java |   7 +-
 .../apache/catalina/core/StandardHostValve.java|   6 +-
 java/org/apache/catalina/core/StandardServer.java  |  11 +-
 .../catalina/filters/CsrfPreventionFilter.java | 107 +
 java/org/apache/catalina/ha/CatalinaCluster.java   |   1 +
 java/org/apache/catalina/ha/ClusterManager.java|   7 +-
 java/org/apache/catalina/ha/ClusterMessage.java|   2 +
 .../apache/catalina/ha/deploy/FarmWarDeployer.java |   1 +
 .../ha/session/ClusterSessionListener.java |   1 +
 .../apache/catalina/ha/session/DeltaSession.java   |   2 +
 .../catalina/ha/session/SessionMessageImpl.java|   1 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  10 +-
 .../apache/catalina/manager/StatusTransformer.java |  70 ++---
 java/org/apache/catalina/realm/CombinedRealm.java  |   3 +-
 java/org/apache/catalina/realm/RealmBase.java  |  19 ++-
 .../apache/catalina/security/SecurityListener.java |  19 +--
 .../apache/catalina/session/DataSourceStore.java   |   6 +-
 java/org/apache/catalina/session/ManagerBase.java  |   5 +
 java/org/apache/catalina/ssi/SSIExec.java  |   8 +-
 .../startup/CatalinaBaseConfigurationSource.java   |   3 +-
 java/org/apache/catalina/startup/Tomcat.java   |   9 +-
 .../catalina/storeconfig/CatalinaClusterSF.java|  14 +-
 .../storeconfig/CertificateStoreAppender.java  |   5 +-
 

(tomcat) branch main updated (942e0148dd -> 21e4ac2618)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from 942e0148dd Code clean-up - formatting - no functional change
 new ef0b4b1884 Fix copy/paste of comment from POST to PATCH
 new 32e316f472 Align with 10.1.x
 new 21e4ac2618 Fix ordering

The 3 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/jakarta/servlet/http/HttpServlet.java | 6 +++---
 java/org/apache/catalina/ant/AbstractCatalinaTask.java | 2 +-
 java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java | 5 +
 java/org/apache/catalina/authenticator/LocalStrings.properties | 2 +-
 java/org/apache/catalina/core/ApplicationRequest.java  | 1 +
 java/org/apache/catalina/security/LocalStrings.properties  | 8 
 java/org/apache/catalina/session/LocalStrings.properties   | 2 --
 7 files changed, 11 insertions(+), 15 deletions(-)


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



(tomcat) 02/03: Align with 10.1.x

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 32e316f4725f46ad98475dff983ba313112467a2
Author: Mark Thomas 
AuthorDate: Fri May 3 09:23:22 2024 +0100

Align with 10.1.x
---
 java/org/apache/catalina/ant/AbstractCatalinaTask.java | 2 +-
 java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java | 5 +
 java/org/apache/catalina/core/ApplicationRequest.java  | 1 +
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
index 02a0d2bdc2..810929a4d9 100644
--- a/java/org/apache/catalina/ant/AbstractCatalinaTask.java
+++ b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
@@ -289,7 +289,7 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
  * Authenticator.setDefault() for authentication as the JRE then provides 
the DIGEST client implementation. However,
  * the above two are not compatible. When the request is made, the 
resulting 401 triggers an exception because, when
  * using streams, the InputStream is no longer available to send with the 
repeated request that now includes the
- * appropriate Authorization header. The hack is to make a simple OPTIONS 
request- i.e. without a request body.This
+ * appropriate Authorization header. The hack is to make a simple OPTIONS 
request- i.e. without a request body. This
  * triggers authentication and the requirement to authenticate for this 
host is cached and used to provide an
  * appropriate Authorization when the next request is made (that includes 
a request body).
  */
diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java
index 8358e9f924..0098f6acb7 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java
@@ -155,10 +155,7 @@ public class JMXAccessorQueryTask extends JMXAccessorTask {
 }
 continue;
 }
-if (value == null) {
-continue;
-}
-if ("modelerType".equals(attName)) {
+if (value == null || "modelerType".equals(attName)) {
 continue;
 }
 createProperty(pname + attName, value);
diff --git a/java/org/apache/catalina/core/ApplicationRequest.java 
b/java/org/apache/catalina/core/ApplicationRequest.java
index add391aa67..80d9a8b19c 100644
--- a/java/org/apache/catalina/core/ApplicationRequest.java
+++ b/java/org/apache/catalina/core/ApplicationRequest.java
@@ -136,6 +136,7 @@ class ApplicationRequest extends ServletRequestWrapper {
 return specialsSet.contains(name);
 }
 
+
 // -- ServletRequestWrapper Methods
 
 /**


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



(tomcat) 03/03: Fix ordering

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 21e4ac26184d22fc02a92d09f43c136544a93521
Author: Mark Thomas 
AuthorDate: Fri May 3 09:23:27 2024 +0100

Fix ordering
---
 java/org/apache/catalina/authenticator/LocalStrings.properties | 2 +-
 java/org/apache/catalina/security/LocalStrings.properties  | 8 
 java/org/apache/catalina/session/LocalStrings.properties   | 2 --
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/LocalStrings.properties 
b/java/org/apache/catalina/authenticator/LocalStrings.properties
index 4909ee1967..62825a2578 100644
--- a/java/org/apache/catalina/authenticator/LocalStrings.properties
+++ b/java/org/apache/catalina/authenticator/LocalStrings.properties
@@ -88,7 +88,7 @@ spnegoAuthenticator.authHeaderNotNego=The authorization 
header sent by the clien
 spnegoAuthenticator.serviceLoginFail=Unable to login as the service principal
 spnegoAuthenticator.ticketValidateFail=Failed to validate client supplied 
ticket
 
+sslAuthenticatorValve.authFailed=Authentication with the provided certificates 
failed
 sslAuthenticatorValve.http2=The context [{0}] in virtual host [{1}] is 
configured to use CLIENT-CERT authentication and [{2}] is configured to support 
HTTP/2. Use of CLIENT-CERT authentication is not compatible with the use of 
HTTP/2.
 sslAuthenticatorValve.noCertificates=No certificates are included with this 
request
-sslAuthenticatorValve.authFailed=Authentication with the provided certificates 
failed
 sslAuthenticatorValve.tls13=The context [{0}] in virtual host [{1}] is 
configured to use CLIENT-CERT authentication and [{2}] is configured to support 
TLS 1.3 using JSSE. Use of CLIENT-CERT authentication is not compatible with 
the use of TLS 1.3 and JSSE.
diff --git a/java/org/apache/catalina/security/LocalStrings.properties 
b/java/org/apache/catalina/security/LocalStrings.properties
index 03906637c3..0be358ffc4 100644
--- a/java/org/apache/catalina/security/LocalStrings.properties
+++ b/java/org/apache/catalina/security/LocalStrings.properties
@@ -13,17 +13,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+SecurityListener.buildDateAgeUnreadable=Unable to read configured 
buildDateWarningAgeDays [{0}], using default of [{1}] days.
+SecurityListener.buildDateIsOld=This version of Tomcat was built more than {0} 
days ago. You should consider upgrading to the current version.
+SecurityListener.buildDateUnreadable=Server build date [{0}] is unreadable as 
an ISO-8601 date.
 SecurityListener.checkUmaskFail=Start attempted with umask setting of [{0}]. 
Running Tomcat without a umask at least as restrictive as [{1}] has been 
blocked by the Lifecycle listener org.apache.catalina.security.SecurityListener 
(usually configured in CATALINA_BASE/conf/server.xml)
 SecurityListener.checkUmaskNone=No umask setting was found in system property 
[{0}]. However, it appears Tomcat is running on a platform that supports umask. 
The system property is typically set in CATALINA_HOME/bin/catalina.sh. The 
Lifecycle listener org.apache.catalina.security.SecurityListener (usually 
configured in CATALINA_BASE/conf/server.xml) expects a umask at least as 
restrictive as [{1}]
 SecurityListener.checkUmaskParseFail=Failed to parse value [{0}] as a valid 
umask.
 SecurityListener.checkUmaskSkip=Unable to determine umask. It appears Tomcat 
is running on Windows so skip the umask check.
 SecurityListener.checkUserWarning=Start attempted while running as user [{0}]. 
Running Tomcat as this user has been blocked by the Lifecycle listener 
org.apache.catalina.security.SecurityListener (usually configured in 
CATALINA_BASE/conf/server.xml)
-SecurityListener.buildDateAgeUnreadable=Unable to read configured 
buildDateWarningAgeDays [{0}], using default of [{1}] days.
-SecurityListener.buildDateUnreadable=Server build date [{0}] is unreadable as 
an ISO-8601 date.
-SecurityListener.buildDateIsOld=This version of Tomcat was built more than {0} 
days ago. You should consider upgrading to the current version.
 
 listener.notServer=This listener must only be nested within Server elements, 
but is in [{0}].
 
 tlsCertRenewalListener.notRenewed=[{0}], TLS virtual host [{1}] with name 
[{2}] that expires on [{3}] is overdue for renewal
 tlsCertRenewalListener.reloadFailed=[{0}], TLS virtual host [{1}] reload of 
TLS configuration failed
-tlsCertRenewalListener.reloadSuccess=[{0}], TLS virtual host [{1}] reloaded 
TLS configuration
\ No newline at end of file
+tlsCertRenewalListener.reloadSuccess=[{0}], TLS virtual host [{1}] reloaded 
TLS configuration
diff --git a/java/org/apache/catalina/session/LocalStrings.properties 
b/java/org/apache/catalina/session/LocalStrings.properties
index 20c73e6d32..3b963c9ea0 100644
--- 

(tomcat) 01/03: Fix copy/paste of comment from POST to PATCH

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit ef0b4b18846d3ee4c9f6a9b4d8819c28645795c2
Author: Mark Thomas 
AuthorDate: Fri May 3 08:30:03 2024 +0100

Fix copy/paste of comment from POST to PATCH
---
 java/jakarta/servlet/http/HttpServlet.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/jakarta/servlet/http/HttpServlet.java 
b/java/jakarta/servlet/http/HttpServlet.java
index 0bcdbcbbf7..354d51fd97 100644
--- a/java/jakarta/servlet/http/HttpServlet.java
+++ b/java/jakarta/servlet/http/HttpServlet.java
@@ -242,10 +242,10 @@ public abstract class HttpServlet extends GenericServlet {
  * When using HTTP 1.1 chunked encoding (which means that the response has 
a Transfer-Encoding header), do not set
  * the Content-Length header.
  * 
- * This method does not need to be either safe or idempotent. Operations 
requested through POST can have side
- * effects for which the user can be held accountable, for example, 
updating stored data or buying items online.
+ * This method is neither safe nor idempotent. Operations requested 
through PATCH have side effects for which the
+ * user can be held accountable.
  * 
- * If the HTTP POST request is incorrectly formatted, doPost 
returns an HTTP "Bad Request" message.
+ * If the HTTP PATCH request is incorrectly formatted, doPost 
returns an HTTP "Bad Request" message.
  *
  * @param req  an {@link HttpServletRequest} object that contains the 
request the client has made of the servlet
  * @param resp an {@link HttpServletResponse} object that contains the 
response the servlet sends to the client


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



(tomcat) 02/04: Code clean-up - formatting. No functional change.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 7151eaa7ec1c2e43a9fd88de006765c911b0ea0e
Author: Mark Thomas 
AuthorDate: Fri May 3 08:06:47 2024 +0100

Code clean-up - formatting. No functional change.
---
 java/jakarta/servlet/http/HttpServletRequest.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/java/jakarta/servlet/http/HttpServletRequest.java 
b/java/jakarta/servlet/http/HttpServletRequest.java
index 8e36a97ccd..277bc32fbc 100644
--- a/java/jakarta/servlet/http/HttpServletRequest.java
+++ b/java/jakarta/servlet/http/HttpServletRequest.java
@@ -511,8 +511,7 @@ public interface HttpServletRequest extends ServletRequest {
  *
  * @since Servlet 3.1
  */
- T upgrade(Class httpUpgradeHandlerClass)
-throws IOException, ServletException;
+ T upgrade(Class httpUpgradeHandlerClass) 
throws IOException, ServletException;
 
 /**
  * Obtain a Map of the trailer fields that is not backed by the request 
object.


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



(tomcat) 03/04: Code clean-up - formatting. No functional change.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 513da9085a12b8c51764033f80249b99d736ed9a
Author: Mark Thomas 
AuthorDate: Fri May 3 08:11:25 2024 +0100

Code clean-up - formatting. No functional change.
---
 .../apache/catalina/ant/AbstractCatalinaTask.java  | 58 ++---
 .../catalina/ant/BaseRedirectorHelperTask.java | 89 
 java/org/apache/catalina/ant/DeployTask.java   | 12 ++-
 java/org/apache/catalina/ant/FindLeaksTask.java| 12 +--
 .../apache/catalina/ant/JKStatusUpdateTask.java| 96 --
 java/org/apache/catalina/ant/JMXGetTask.java   | 25 +++---
 java/org/apache/catalina/ant/JMXQueryTask.java | 19 +++--
 java/org/apache/catalina/ant/JMXSetTask.java   | 35 
 java/org/apache/catalina/ant/ListTask.java |  4 +-
 java/org/apache/catalina/ant/ReloadTask.java   |  5 +-
 java/org/apache/catalina/ant/ResourcesTask.java| 10 +--
 java/org/apache/catalina/ant/ServerinfoTask.java   |  3 +-
 java/org/apache/catalina/ant/SessionsTask.java |  3 +-
 .../catalina/ant/SslConnectorCiphersTask.java  |  4 +-
 java/org/apache/catalina/ant/StartTask.java|  4 +-
 java/org/apache/catalina/ant/StopTask.java |  4 +-
 java/org/apache/catalina/ant/ThreaddumpTask.java   |  4 +-
 java/org/apache/catalina/ant/UndeployTask.java |  4 +-
 java/org/apache/catalina/ant/ValidatorTask.java|  9 +-
 java/org/apache/catalina/ant/VminfoTask.java   |  4 +-
 20 files changed, 167 insertions(+), 237 deletions(-)

diff --git a/java/org/apache/catalina/ant/AbstractCatalinaTask.java 
b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
index 61ac76e5e5..02a0d2bdc2 100644
--- a/java/org/apache/catalina/ant/AbstractCatalinaTask.java
+++ b/java/org/apache/catalina/ant/AbstractCatalinaTask.java
@@ -32,11 +32,11 @@ import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 
 /**
- * Abstract base class for Ant tasks that interact with the Manager 
web
- * application for dynamically deploying and undeploying applications. These
- * tasks require Ant 1.4 or later.
+ * Abstract base class for Ant tasks that interact with the Manager 
web application for dynamically deploying
+ * and undeploying applications. These tasks require Ant 1.4 or later.
  *
  * @author Craig R. McClanahan
+ *
  * @since 4.1
  */
 public abstract class AbstractCatalinaTask extends BaseRedirectorHelperTask {
@@ -107,16 +107,14 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 }
 
 /**
- * If set to true - ignore the constraint of the first line of the response
- * message that must be "OK -".
+ * If set to true - ignore the constraint of the first line of the 
response message that must be "OK -".
  * 
- * When this attribute is set to {@code false} (the default), the first 
line
- * of server response is expected to start with "OK -". If it does not then
- * the task is considered as failed and the first line is treated as an
- * error message.
+ * When this attribute is set to {@code false} (the default), the first 
line of server response is expected to start
+ * with "OK -". If it does not then the task is considered as failed and 
the first line is treated as an error
+ * message.
  * 
- * When this attribute is set to {@code true}, the first line of the
- * response is treated like any other, regardless of its text.
+ * When this attribute is set to {@code true}, the first line of the 
response is treated like any other, regardless
+ * of its text.
  */
 protected boolean ignoreResponseConstraint = false;
 
@@ -132,9 +130,8 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 // - Public Methods
 
 /**
- * Execute the specified command. This logic only performs the common
- * attribute validation required by all subclasses; it does not perform any
- * functional logic directly.
+ * Execute the specified command. This logic only performs the common 
attribute validation required by all
+ * subclasses; it does not perform any functional logic directly.
  *
  * @exception BuildException if a validation error occurs
  */
@@ -159,19 +156,18 @@ public abstract class AbstractCatalinaTask extends 
BaseRedirectorHelperTask {
 
 
 /**
- * Execute the specified command, based on the configured properties. The
- * input stream will be closed upon completion of this task, whether it was
- * executed successfully or not.
+ * Execute the specified command, based on the configured properties. The 
input stream will be closed upon
+ * completion of this task, whether it was executed successfully or not.
  *
- * @param command Command to be 

(tomcat) 04/04: Code clean-up - formatting - no functional change

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 942e0148ddbcb6735e17ec5037fdac2781d55ce9
Author: Mark Thomas 
AuthorDate: Fri May 3 08:18:29 2024 +0100

Code clean-up - formatting - no functional change

Re-applying formatting to previously formatted code
---
 .../catalina/authenticator/AuthenticatorBase.java  |   3 +-
 .../catalina/authenticator/BasicAuthenticator.java |   4 +-
 .../authenticator/SpnegoAuthenticator.java |   3 +-
 java/org/apache/catalina/connector/Connector.java  |   8 +-
 .../org/apache/catalina/connector/InputBuffer.java |   4 +-
 java/org/apache/catalina/connector/Request.java|   6 +-
 java/org/apache/catalina/connector/Response.java   |   1 -
 .../catalina/core/ApplicationDispatcher.java   |   3 +-
 .../catalina/core/ApplicationFilterChain.java  |   3 +-
 .../catalina/core/ApplicationHttpRequest.java  |   1 -
 .../core/ApplicationSessionCookieConfig.java   |   3 +-
 .../catalina/core/OpenSSLLifecycleListener.java|  41 
 .../core/PropertiesRoleMappingListener.java|   9 +-
 java/org/apache/catalina/core/StandardContext.java |   7 +-
 .../apache/catalina/core/StandardHostValve.java|   6 +-
 java/org/apache/catalina/core/StandardServer.java  |  11 +--
 .../catalina/filters/CsrfPreventionFilter.java | 107 -
 java/org/apache/catalina/ha/CatalinaCluster.java   |   1 +
 java/org/apache/catalina/ha/ClusterManager.java|   7 +-
 java/org/apache/catalina/ha/ClusterMessage.java|   2 +
 .../apache/catalina/ha/deploy/FarmWarDeployer.java |   4 +-
 .../ha/session/ClusterSessionListener.java |   1 +
 .../apache/catalina/ha/session/DeltaSession.java   |   2 +
 .../catalina/ha/session/SessionMessageImpl.java|   1 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  10 +-
 .../apache/catalina/manager/StatusTransformer.java |  70 +-
 java/org/apache/catalina/mbeans/MBeanUtils.java|   5 +-
 java/org/apache/catalina/realm/CombinedRealm.java  |   3 +-
 java/org/apache/catalina/realm/RealmBase.java  |  19 ++--
 .../apache/catalina/security/SecurityListener.java |  19 ++--
 .../apache/catalina/session/DataSourceStore.java   |   6 +-
 .../startup/CatalinaBaseConfigurationSource.java   |   3 +-
 java/org/apache/catalina/startup/Tomcat.java   |   9 +-
 33 files changed, 196 insertions(+), 186 deletions(-)

diff --git a/java/org/apache/catalina/authenticator/AuthenticatorBase.java 
b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
index e52fa2f109..fc8b13cd7a 100644
--- a/java/org/apache/catalina/authenticator/AuthenticatorBase.java
+++ b/java/org/apache/catalina/authenticator/AuthenticatorBase.java
@@ -975,7 +975,8 @@ public abstract class AuthenticatorBase extends ValveBase 
implements Authenticat
 associate(ssoId, request.getSessionInternal(true));
 
 if (log.isDebugEnabled()) {
-log.debug(sm.getString("authenticator.reauthentication", 
request.getUserPrincipal().getName(), request.getAuthType()));
+log.debug(sm.getString("authenticator.reauthentication", 
request.getUserPrincipal().getName(),
+request.getAuthType()));
 }
 }
 
diff --git a/java/org/apache/catalina/authenticator/BasicAuthenticator.java 
b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
index 8421dc54b1..17c4a85857 100644
--- a/java/org/apache/catalina/authenticator/BasicAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/BasicAuthenticator.java
@@ -145,8 +145,8 @@ public class BasicAuthenticator extends AuthenticatorBase {
 /**
  * Parse the HTTP Authorization header for BASIC authentication as per 
RFC 7617.
  *
- * @param input   The header value to parse in-place
- * @param charset The character set to use to convert the 
bytes to a string
+ * @param input   The header value to parse in-place
+ * @param charset The character set to use to convert the bytes to a 
string
  *
  * @throws IllegalArgumentException If the header does not conform to 
RFC 7617
  */
diff --git a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java 
b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
index dab5cdfed3..9e4537ce0c 100644
--- a/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
+++ b/java/org/apache/catalina/authenticator/SpnegoAuthenticator.java
@@ -266,7 +266,8 @@ public class SpnegoAuthenticator extends AuthenticatorBase {
 }
 
 // Send response token on success and failure
-response.setHeader(AUTH_HEADER_NAME, AUTH_HEADER_VALUE_NEGOTIATE + " " 
+ Base64.getEncoder().encodeToString(outToken));
+response.setHeader(AUTH_HEADER_NAME,
+AUTH_HEADER_VALUE_NEGOTIATE + " " + 

(tomcat) 01/04: Code clean-up - formatting. No functional change.

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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

commit 16f3011acbeb32c7a1ec33384fe89b8580f1edce
Author: Mark Thomas 
AuthorDate: Fri May 3 08:02:22 2024 +0100

Code clean-up - formatting. No functional change.
---
 .../catalina/storeconfig/CatalinaClusterSF.java|  12 +-
 .../storeconfig/CertificateStoreAppender.java  |   5 +-
 .../org/apache/catalina/storeconfig/ChannelSF.java |   7 +-
 .../apache/catalina/storeconfig/ConnectorSF.java   |  17 +--
 .../storeconfig/ConnectorStoreAppender.java|  84 +--
 .../catalina/storeconfig/CredentialHandlerSF.java  |  20 +--
 .../storeconfig/GlobalNamingResourcesSF.java   |  17 +--
 .../apache/catalina/storeconfig/IStoreConfig.java  |  51 +++
 .../apache/catalina/storeconfig/IStoreFactory.java |  11 +-
 .../apache/catalina/storeconfig/InterceptorSF.java |  22 ++-
 .../apache/catalina/storeconfig/JarScannerSF.java  |   8 +-
 java/org/apache/catalina/storeconfig/LoaderSF.java |  24 ++-
 .../org/apache/catalina/storeconfig/ManagerSF.java |  26 ++--
 .../catalina/storeconfig/NamingResourcesSF.java|  11 +-
 .../apache/catalina/storeconfig/OpenSSLConfSF.java |   5 +-
 .../catalina/storeconfig/PersistentManagerSF.java  |   5 +-
 java/org/apache/catalina/storeconfig/RealmSF.java  |  26 ++--
 .../catalina/storeconfig/SSLHostConfigSF.java  |   8 +-
 java/org/apache/catalina/storeconfig/SenderSF.java |   7 +-
 .../catalina/storeconfig/StandardContextSF.java| 117 +++
 .../catalina/storeconfig/StandardEngineSF.java |  11 +-
 .../catalina/storeconfig/StandardHostSF.java   |  15 +-
 .../catalina/storeconfig/StandardServerSF.java |  22 ++-
 .../catalina/storeconfig/StandardServiceSF.java|   5 +-
 .../apache/catalina/storeconfig/StoreAppender.java | 164 ++---
 .../apache/catalina/storeconfig/StoreConfig.java   |  76 --
 .../storeconfig/StoreConfigLifecycleListener.java  |  29 ++--
 .../catalina/storeconfig/StoreContextAppender.java |  78 +-
 .../catalina/storeconfig/StoreDescription.java |  46 ++
 .../catalina/storeconfig/StoreFactoryBase.java |  72 -
 .../catalina/storeconfig/StoreFactoryRule.java |  46 +++---
 .../catalina/storeconfig/StoreFileMover.java   |  26 ++--
 .../apache/catalina/storeconfig/StoreLoader.java   |  62 +++-
 .../apache/catalina/storeconfig/StoreRegistry.java |  31 ++--
 .../catalina/storeconfig/WatchedResourceSF.java|  13 +-
 .../catalina/storeconfig/WebResourceRootSF.java|  29 ++--
 .../catalina/storeconfig/WrapperLifecycleSF.java   |  13 +-
 .../catalina/storeconfig/WrapperListenerSF.java|  16 +-
 38 files changed, 544 insertions(+), 693 deletions(-)

diff --git a/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java 
b/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
index ce1ef29eff..498eba23c3 100644
--- a/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
+++ b/java/org/apache/catalina/storeconfig/CatalinaClusterSF.java
@@ -30,18 +30,18 @@ import org.apache.catalina.ha.tcp.SimpleTcpCluster;
 import org.apache.catalina.tribes.Channel;
 
 /**
- * Generate Cluster Element with Membership,Sender,Receiver,Deployer and
- * ReplicationValve
+ * Generate Cluster Element with Membership,Sender,Receiver,Deployer and 
ReplicationValve
  */
 public class CatalinaClusterSF extends StoreFactoryBase {
 
 /**
  * Store the specified Cluster children.
+ * 
  * {@inheritDoc}
  */
 @Override
-public void storeChildren(PrintWriter aWriter, int indent, Object aCluster,
-StoreDescription parentDesc) throws Exception {
+public void storeChildren(PrintWriter aWriter, int indent, Object 
aCluster, StoreDescription parentDesc)
+throws Exception {
 if (aCluster instanceof CatalinaCluster) {
 CatalinaCluster cluster = (CatalinaCluster) aCluster;
 if (cluster instanceof SimpleTcpCluster) {
@@ -69,10 +69,10 @@ public class CatalinaClusterSF extends StoreFactoryBase {
 
 if (aCluster instanceof SimpleTcpCluster) {
 // Store nested  elements
-LifecycleListener listeners[] = 
((SimpleTcpCluster)cluster).findLifecycleListeners();
+LifecycleListener listeners[] = ((SimpleTcpCluster) 
cluster).findLifecycleListeners();
 storeElementArray(aWriter, indent, listeners);
 // Store nested  elements
-ClusterListener mlisteners[] = 
((SimpleTcpCluster)cluster).findClusterListeners();
+ClusterListener mlisteners[] = ((SimpleTcpCluster) 
cluster).findClusterListeners();
 List clusterListeners = new ArrayList<>();
 for (ClusterListener clusterListener : mlisteners) {
 if (clusterListener != deployer) {
diff --git 

(tomcat) branch main updated (a7f39b0233 -> 942e0148dd)

2024-05-03 Thread markt
This is an automated email from the ASF dual-hosted git repository.

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


from a7f39b0233 Improvements to Japanese translations by tak7iji
 new 16f3011acb Code clean-up - formatting. No functional change.
 new 7151eaa7ec Code clean-up - formatting. No functional change.
 new 513da9085a Code clean-up - formatting. No functional change.
 new 942e0148dd Code clean-up - formatting - no functional change

The 4 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/jakarta/servlet/http/HttpServletRequest.java  |   3 +-
 .../apache/catalina/ant/AbstractCatalinaTask.java  |  58 +++-
 .../catalina/ant/BaseRedirectorHelperTask.java |  89 ---
 java/org/apache/catalina/ant/DeployTask.java   |  12 +-
 java/org/apache/catalina/ant/FindLeaksTask.java|  12 +-
 .../apache/catalina/ant/JKStatusUpdateTask.java|  96 +---
 java/org/apache/catalina/ant/JMXGetTask.java   |  25 ++--
 java/org/apache/catalina/ant/JMXQueryTask.java |  19 ++-
 java/org/apache/catalina/ant/JMXSetTask.java   |  35 +++--
 java/org/apache/catalina/ant/ListTask.java |   4 +-
 java/org/apache/catalina/ant/ReloadTask.java   |   5 +-
 java/org/apache/catalina/ant/ResourcesTask.java|  10 +-
 java/org/apache/catalina/ant/ServerinfoTask.java   |   3 +-
 java/org/apache/catalina/ant/SessionsTask.java |   3 +-
 .../catalina/ant/SslConnectorCiphersTask.java  |   4 +-
 java/org/apache/catalina/ant/StartTask.java|   4 +-
 java/org/apache/catalina/ant/StopTask.java |   4 +-
 java/org/apache/catalina/ant/ThreaddumpTask.java   |   4 +-
 java/org/apache/catalina/ant/UndeployTask.java |   4 +-
 java/org/apache/catalina/ant/ValidatorTask.java|   9 +-
 java/org/apache/catalina/ant/VminfoTask.java   |   4 +-
 .../catalina/authenticator/AuthenticatorBase.java  |   3 +-
 .../catalina/authenticator/BasicAuthenticator.java |   4 +-
 .../authenticator/SpnegoAuthenticator.java |   3 +-
 java/org/apache/catalina/connector/Connector.java  |   8 +-
 .../org/apache/catalina/connector/InputBuffer.java |   4 +-
 java/org/apache/catalina/connector/Request.java|   6 +-
 java/org/apache/catalina/connector/Response.java   |   1 -
 .../catalina/core/ApplicationDispatcher.java   |   3 +-
 .../catalina/core/ApplicationFilterChain.java  |   3 +-
 .../catalina/core/ApplicationHttpRequest.java  |   1 -
 .../core/ApplicationSessionCookieConfig.java   |   3 +-
 .../catalina/core/OpenSSLLifecycleListener.java|  41 +++---
 .../core/PropertiesRoleMappingListener.java|   9 +-
 java/org/apache/catalina/core/StandardContext.java |   7 +-
 .../apache/catalina/core/StandardHostValve.java|   6 +-
 java/org/apache/catalina/core/StandardServer.java  |  11 +-
 .../catalina/filters/CsrfPreventionFilter.java | 107 ++
 java/org/apache/catalina/ha/CatalinaCluster.java   |   1 +
 java/org/apache/catalina/ha/ClusterManager.java|   7 +-
 java/org/apache/catalina/ha/ClusterMessage.java|   2 +
 .../apache/catalina/ha/deploy/FarmWarDeployer.java |   4 +-
 .../ha/session/ClusterSessionListener.java |   1 +
 .../apache/catalina/ha/session/DeltaSession.java   |   2 +
 .../catalina/ha/session/SessionMessageImpl.java|   1 +
 .../apache/catalina/ha/tcp/ReplicationValve.java   |  10 +-
 .../apache/catalina/manager/StatusTransformer.java |  70 +
 java/org/apache/catalina/mbeans/MBeanUtils.java|   5 +-
 java/org/apache/catalina/realm/CombinedRealm.java  |   3 +-
 java/org/apache/catalina/realm/RealmBase.java  |  19 ++-
 .../apache/catalina/security/SecurityListener.java |  19 +--
 .../apache/catalina/session/DataSourceStore.java   |   6 +-
 .../startup/CatalinaBaseConfigurationSource.java   |   3 +-
 java/org/apache/catalina/startup/Tomcat.java   |   9 +-
 .../catalina/storeconfig/CatalinaClusterSF.java|  12 +-
 .../storeconfig/CertificateStoreAppender.java  |   5 +-
 .../org/apache/catalina/storeconfig/ChannelSF.java |   7 +-
 .../apache/catalina/storeconfig/ConnectorSF.java   |  17 +--
 .../storeconfig/ConnectorStoreAppender.java|  84 +--
 .../catalina/storeconfig/CredentialHandlerSF.java  |  20 +--
 .../storeconfig/GlobalNamingResourcesSF.java   |  17 +--
 .../apache/catalina/storeconfig/IStoreConfig.java  |  51 +++
 .../apache/catalina/storeconfig/IStoreFactory.java |  11 +-
 .../apache/catalina/storeconfig/InterceptorSF.java |  22 ++-
 .../apache/catalina/storeconfig/JarScannerSF.java  |   8 +-
 java/org/apache/catalina/storeconfig/LoaderSF.java |  24 ++-
 .../org/apache/catalina/storeconfig/ManagerSF.java |  26 ++--
 .../catalina/storeconfig/NamingResourcesSF.java|  11 +-
 

Our ASN.1 parser

2024-05-03 Thread Michael Osipov

Hi folks,

currenly we have a minimalistic ASN.1 parser in the code tree w/o any 
testing since it assumes that the passed byte array is properly encoded. 
Now, I do have some X.509 related improvements which I'd like to bring 
upstream from my OSS project which I think will benefit everyone using 
X.509 (processing SAN from a client cert) in the enterprise world, but 
this requires extending the parser. In fact, I have written a 
minimalistic parser for my use case with error handling and swapped for 
the Tomcat's one and most tests fail with ArrayIndexOutOfBoundsException 
because our code does not check anything.
I do not want to write yet another full-blown parser, but do not also 
want to reinvent the wheel.

So several questions come to my mind:
1. Since I do also have other OSS components for Tomcat which do require 
an ASN.1 parser would our position be use our parser at your own risk or 
solve the problem yourself? I need only SEQUENCEs, tagged types. Nothing 
fancy.
2. Should we consider ditching it for something public and shade it like 
we do with other components? Apache Kerby ASN.1 is quite small and very 
decent.


Let me know what you think!

M

(Maybe this discussion applies to the ASN.1 writer as well)

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



Re: Tagging May releases

2024-05-03 Thread Rémy Maucherat
On Thu, May 2, 2024 at 7:26 PM Mark Thomas  wrote:
>
> Hi all,
>
> Things are looking good for the May releases. I have a few things to
> back-port to 10.1.x and 9.0.x and then I'll start running my pre-release
> tests. Providing everything passes (and CI runs suggest they will) I'll
> tag 11.0.x - probably some time tomorrow.

+1

Rémy

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