Re: Release Announcement: General Availability of Java 15 / JDK 15

2020-09-15 Thread Martin Grigorov
Hi Rory,

I've just run the build and tests of Tomcat 9.0.x with JDK 15+36-1562
and 16-ea+15-631 on x86_64 and aarch64. No regressions found!

Regards,
Martin

On Tue, Sep 15, 2020 at 5:52 PM Rory O'Donnell 
wrote:

> Hi Mark,
>
> **Release Announcement: General Availability of Java 15 / JDK 15 [1]
> **
>
>   * JDK 15, the reference implementation of Java 15, is now Generally
> Available.
>   * GPL-licensed OpenJDK builds from Oracle are available here:
> http://jdk.java.net/15/
>   * JDK 15 Release notes
> <
> https://www.oracle.com/java/technologies/javase/15-relnote-issues.html>
>
> JDK 15 includes fourteen features [2]:
>
>   * JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)
> 
>   * JEP 360: Sealed Classes (Preview) 
>   * JEP 371: Hidden Classes 
>   * JEP 372: Remove the Nashorn JavaScript Engine
> 
>   * JEP 373: Reimplement the Legacy DatagramSocket API
> 
>   * JEP 374: Disable and Deprecate Biased Locking
> 
>   * JEP 375: Pattern Matching for instanceof (Second Preview)
> 
>   * JEP 377: ZGC: A Scalable Low-Latency Garbage Collector
> 
>   * JEP 378: Text Blocks 
>   * JEP 379: Shenandoah: A Low-Pause-Time Garbage Collector
> 
>   * JEP 381: Remove the Solaris and SPARC Ports
> 
>   * JEP 383: Foreign-Memory Access API (Second Incubator)
> 
>   * JEP 384: Records (Second Preview) 
>   * JEP 385: Deprecate RMI Activation for Removal
> 
>
> Thanks to everyone who contributed to JDK 15, whether by creating
> features or enhancements, logging  bugs, or downloading and testing the
> early-access builds.
>
> OpenJDK 16 Early Access build 15**is now available at
> http://jdk.java.net/16
>
>   * JEPs integrated to JDK 16:
>   o JEP 347: Enable C++14 Language Features
> 
>   o JEP 357: Migrate from Mercurial to Git
> 
>   o JEP 369: Migrate to GitHub 
>
>   * Release Notes are available at http://jdk.java.net/16/release-notes
>
> **
>
>   * Significant changes since the last availability email:
>   o Build 15
>   + JDK-8244090: public lookup should find public members of
> public exported types (Reported by Eclipse Jetty)
>   + JDK-8250968: Symlinks attributes not preserved when using
> jarsigner on zip files
>   o Build 14
>   + JDK-8189744: Deprecate the JDK-specific API for setting
> socket options, jdk.net.Sockets
>   + JDK-8241003: Deprecate "denigrated" java.security.cert APIs
> that represent DNs as Principal or String objects
>   + JDK-8245462: The default HttpClient implementation returns
> cancelable futures
>
>
> *__*
> Rgds,Rory
>
> [1]
> https://mail.openjdk.java.net/pipermail/jdk-dev/2020-September/004733.html
> [2] https://openjdk.java.net/projects/jdk/15/
> --
>
> Rgds, Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA, Dublin, Ireland
>
>


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

2020-09-15 Thread GitBox


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



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

Review comment:
   Thanks for the suggestion @martin-g . 
   Pushed the changes as per the latest feedback. Can you have a look on this 
PR again ? 





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

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



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



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

2020-09-15 Thread GitBox


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



##
File path: java/org/apache/catalina/startup/LocalStrings_fr.properties
##
@@ -69,6 +69,7 @@ contextConfig.missingRealm=Aucun royaume (realm) n'a été 
configuré pour réal
 contextConfig.processAnnotationsDir.debug=Balayage du répertoire pour trouver 
des fichiers de classe avec annotations [{0}]
 contextConfig.processAnnotationsJar.debug=Analyse du fichier jars pour des 
classes annotées avec [{0}]
 contextConfig.processAnnotationsWebDir.debug=Balayage du répertoire 
d''applications web, pour fichiers de classe avec annotations [{0}]
+contextConfig.processAnnotationsInParallelFailure=exécution parallèle a échoué

Review comment:
   Thanks for the suggestion. 
   Resolved with the latest commit. 





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

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



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



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

2020-09-15 Thread GitBox


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



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

Review comment:
   Thanks for the suggestion. 
   Resolved with the latest commit. 





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

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



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



Re: [tomcat] branch master updated: Fix possible concurrency issue

2020-09-15 Thread Mark Thomas
On 15/09/2020 17:42, Mark Thomas wrote:
> On 15/09/2020 17:35, ma...@apache.org wrote:
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> markt pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>>
>>
>> The following commit(s) were added to refs/heads/master by this push:
>>  new 6c21ee5  Fix possible concurrency issue
>> 6c21ee5 is described below
>>
>> commit 6c21ee5a57e6a6fa9c780d4a8f857d5c3a0b9a35
>> Author: Mark Thomas 
>> AuthorDate: Tue Sep 15 17:34:50 2020 +0100
>>
>> Fix possible concurrency issue
> 
> Hi,
> 
> This fix is a little on the speculative side.
> 
> I've been watching the intermittent CI failures for the last month or so
> and there is evidence (mainly in failed WebSocket tests) of something
> going wrong in HTTP request parsing.
> 
> Today, I saw a failure of once of the TestCoyoteAdapterRequestFuzzing
> tests with the following stack trace:
> 
> 15-Sep-2020 15:15:13.301 INFO [http-nio-127.0.0.1-auto-8-exec-1]
> org.apache.coyote.http11.Http11Processor.service Error parsing HTTP
> request header
>  Note: further occurrences of HTTP request parsing errors will be logged
> at DEBUG level.
>   java.lang.IllegalArgumentException: Request header is too large
>   at
> org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:777)



> Given the request, that should not be possible. The only explanation I
> can come up with is that the recycling of the InputBuffer was not fully
> visible to the http-nio-127.0.0.1-auto-8-exec-1 thread.
> 
> This seems a little far-fetched to me but I can't come up with a better
> theory. With this theory in mind a looked at the Http11InputBuffer and
> if my understanding is correct:
> - there is a theoretical concurrency issue
> - the patch below fixes it
> 
> I do intend to back-port this as my understanding is that the issue is
> (theoretically) correct. I'll continue to keep an eye on the CI results
> to see if there is any noticeable impact. That said, as I can't
> reproduce this and impact is going to have be inferred.

Well, that didn't take long. The WebSocket error occurred again after
this fix so this isn't the (only?) root cause of that issue. The search
for the root cause of the intermittent WebSocket failures continues...

Mark

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



[tomcat] branch 8.5.x updated: Make test more robust

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 0ee5590  Make test more robust
0ee5590 is described below

commit 0ee5590535fbec7d8eece702978ceb3020994d72
Author: Mark Thomas 
AuthorDate: Tue Sep 15 19:09:05 2020 +0100

Make test more robust
---
 .../apache/coyote/http2/TestCancelledUpload.java   | 28 ++
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestCancelledUpload.java 
b/test/org/apache/coyote/http2/TestCancelledUpload.java
index 2a5b762..9964aa4 100644
--- a/test/org/apache/coyote/http2/TestCancelledUpload.java
+++ b/test/org/apache/coyote/http2/TestCancelledUpload.java
@@ -74,7 +74,7 @@ public class TestCancelledUpload extends Http2TestBase {
 parser.readFrame(true);
 
 // If reset is first frame received end test here
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -85,7 +85,7 @@ public class TestCancelledUpload extends Http2TestBase {
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
@@ -94,7 +94,7 @@ public class TestCancelledUpload extends Http2TestBase {
 }
 
 // Check for reset and exit if found
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -109,7 +109,7 @@ public class TestCancelledUpload extends Http2TestBase {
 
 parser.readFrame(true);
 // Check for reset and exit if found
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -129,7 +129,7 @@ public class TestCancelledUpload extends Http2TestBase {
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
@@ -138,12 +138,30 @@ public class TestCancelledUpload extends Http2TestBase {
 }
 
 // This should be the reset
+checkReset();
 Assert.assertEquals("3-RST-[3]\n", output.getTrace());
 
 // If there are any more frames after this, ignore them
 }
 
 
+/*
+ * Depending on timing, several resets may be sent.
+ */
+private boolean checkReset() throws IOException, Http2Exception {
+while (true) {
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return true;
+} else if (output.getTrace().startsWith("3-RST-[")) {
+output.clearTrace();
+parser.readFrame(true);
+} else {
+return false;
+}
+}
+}
+
+
 @Override
 protected void configureAndStartWebApplication() throws LifecycleException 
{
 Tomcat tomcat = getTomcatInstance();


-
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: Make test more robust

2020-09-15 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 0c04042  Make test more robust
0c04042 is described below

commit 0c0404293ae85d4779f7b7a31b6dc3547c15acd6
Author: Mark Thomas 
AuthorDate: Tue Sep 15 19:09:05 2020 +0100

Make test more robust
---
 .../apache/coyote/http2/TestCancelledUpload.java   | 28 ++
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestCancelledUpload.java 
b/test/org/apache/coyote/http2/TestCancelledUpload.java
index 2a5b762..9964aa4 100644
--- a/test/org/apache/coyote/http2/TestCancelledUpload.java
+++ b/test/org/apache/coyote/http2/TestCancelledUpload.java
@@ -74,7 +74,7 @@ public class TestCancelledUpload extends Http2TestBase {
 parser.readFrame(true);
 
 // If reset is first frame received end test here
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -85,7 +85,7 @@ public class TestCancelledUpload extends Http2TestBase {
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
@@ -94,7 +94,7 @@ public class TestCancelledUpload extends Http2TestBase {
 }
 
 // Check for reset and exit if found
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -109,7 +109,7 @@ public class TestCancelledUpload extends Http2TestBase {
 
 parser.readFrame(true);
 // Check for reset and exit if found
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -129,7 +129,7 @@ public class TestCancelledUpload extends Http2TestBase {
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
@@ -138,12 +138,30 @@ public class TestCancelledUpload extends Http2TestBase {
 }
 
 // This should be the reset
+checkReset();
 Assert.assertEquals("3-RST-[3]\n", output.getTrace());
 
 // If there are any more frames after this, ignore them
 }
 
 
+/*
+ * Depending on timing, several resets may be sent.
+ */
+private boolean checkReset() throws IOException, Http2Exception {
+while (true) {
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return true;
+} else if (output.getTrace().startsWith("3-RST-[")) {
+output.clearTrace();
+parser.readFrame(true);
+} else {
+return false;
+}
+}
+}
+
+
 @Override
 protected void configureAndStartWebApplication() throws LifecycleException 
{
 Tomcat tomcat = getTomcatInstance();


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



[tomcat] branch master updated: Make test more robust

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

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


The following commit(s) were added to refs/heads/master by this push:
 new d0971a5  Make test more robust
d0971a5 is described below

commit d0971a5333bdcfe452e8881626efced4e07efc5f
Author: Mark Thomas 
AuthorDate: Tue Sep 15 19:09:05 2020 +0100

Make test more robust
---
 .../apache/coyote/http2/TestCancelledUpload.java   | 28 ++
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/test/org/apache/coyote/http2/TestCancelledUpload.java 
b/test/org/apache/coyote/http2/TestCancelledUpload.java
index 5c85b65..ebaaec0 100644
--- a/test/org/apache/coyote/http2/TestCancelledUpload.java
+++ b/test/org/apache/coyote/http2/TestCancelledUpload.java
@@ -75,7 +75,7 @@ public class TestCancelledUpload extends Http2TestBase {
 parser.readFrame(true);
 
 // If reset is first frame received end test here
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -86,7 +86,7 @@ public class TestCancelledUpload extends Http2TestBase {
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
@@ -95,7 +95,7 @@ public class TestCancelledUpload extends Http2TestBase {
 }
 
 // Check for reset and exit if found
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -110,7 +110,7 @@ public class TestCancelledUpload extends Http2TestBase {
 
 parser.readFrame(true);
 // Check for reset and exit if found
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 
@@ -130,7 +130,7 @@ public class TestCancelledUpload extends Http2TestBase {
 int size = Integer.parseInt(trace.substring(14, trace.length() - 
2));
 output.clearTrace();
 parser.readFrame(true);
-if (output.getTrace().startsWith("3-RST-[3]\n")) {
+if (checkReset()) {
 return;
 }
 Assert.assertEquals("3-WindowSize-[" + size + "]\n", 
output.getTrace());
@@ -139,12 +139,30 @@ public class TestCancelledUpload extends Http2TestBase {
 }
 
 // This should be the reset
+checkReset();
 Assert.assertEquals("3-RST-[3]\n", output.getTrace());
 
 // If there are any more frames after this, ignore them
 }
 
 
+/*
+ * Depending on timing, several resets may be sent.
+ */
+private boolean checkReset() throws IOException, Http2Exception {
+while (true) {
+if (output.getTrace().startsWith("3-RST-[3]\n")) {
+return true;
+} else if (output.getTrace().startsWith("3-RST-[")) {
+output.clearTrace();
+parser.readFrame(true);
+} else {
+return false;
+}
+}
+}
+
+
 @Override
 protected void configureAndStartWebApplication() throws LifecycleException 
{
 Tomcat tomcat = getTomcatInstance();


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



svn commit: r41467 - /dev/tomcat/tomcat-8/v8.5.58/ /release/tomcat/tomcat-8/v8.5.58/

2020-09-15 Thread markt
Author: markt
Date: Tue Sep 15 17:01:34 2020
New Revision: 41467

Log:
Release Apache Tomcat 8.5.58

Added:
release/tomcat/tomcat-8/v8.5.58/
  - copied from r41466, dev/tomcat/tomcat-8/v8.5.58/
Removed:
dev/tomcat/tomcat-8/v8.5.58/


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



Re: [VOTE][RESULT] Release Apache Tomcat 8.5.58

2020-09-15 Thread Mark Thomas
The following votes were cast:

Binding:
+1: markt, mgrigorov, fhanik

No other votes were cast.

The vote therefore passes.

Thanks to everyone who contributed to this release.

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



[Bug 64715] PasswordValidationCallback not supported

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

--- Comment #16 from Mark Thomas  ---
All valid points regarding the expected behaviour of CallbackHandlers. I'd
recommend raising issues against the Jakarta Authentication spec:
https://github.com/eclipse-ee4j/authentication/issues

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



[tomcat] branch 8.5.x updated: Fix possible concurrency issue

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

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


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

commit 73ee8766e89df8afd5655441d5535dd115256773
Author: Mark Thomas 
AuthorDate: Tue Sep 15 17:34:50 2020 +0100

Fix possible concurrency issue
---
 java/org/apache/coyote/http11/Http11InputBuffer.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index 3ed3f20..728242e 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -71,7 +71,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 /**
  * State.
  */
-private boolean parsingHeader;
+private volatile boolean parsingHeader;
 
 
 /**
@@ -130,7 +130,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
  */
 private byte prevChr = 0;
 private byte chr = 0;
-private boolean parsingRequestLine;
+private volatile boolean parsingRequestLine;
 private int parsingRequestLinePhase = 0;
 private boolean parsingRequestLineEol = false;
 private int parsingRequestLineStart = 0;
@@ -281,18 +281,22 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 
 byteBuffer.limit(0).position(0);
 lastActiveFilter = -1;
-parsingHeader = true;
 swallowInput = true;
 
 chr = 0;
 prevChr = 0;
 headerParsePos = HeaderParsePosition.HEADER_START;
-parsingRequestLine = true;
 parsingRequestLinePhase = 0;
 parsingRequestLineEol = false;
 parsingRequestLineStart = 0;
 parsingRequestLineQPos = -1;
 headerData.recycle();
+// Recycled last because they are volatile
+// All variables visible to this thread are guaranteed to be visible to
+// any other thread once that thread reads the same volatile. The first
+// action when parsing input data is to read one of these volatiles.
+parsingRequestLine = true;
+parsingHeader = true;
 }
 
 


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



[tomcat] branch 9.0.x updated: Fix possible concurrency issue

2020-09-15 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 a233ffd  Fix possible concurrency issue
a233ffd is described below

commit a233ffde7dd04165721d68f0ab9d9bac4b2ff90e
Author: Mark Thomas 
AuthorDate: Tue Sep 15 17:34:50 2020 +0100

Fix possible concurrency issue
---
 java/org/apache/coyote/http11/Http11InputBuffer.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index f5538af..9e5ffe0 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -71,7 +71,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 /**
  * State.
  */
-private boolean parsingHeader;
+private volatile boolean parsingHeader;
 
 
 /**
@@ -130,7 +130,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
  */
 private byte prevChr = 0;
 private byte chr = 0;
-private boolean parsingRequestLine;
+private volatile boolean parsingRequestLine;
 private int parsingRequestLinePhase = 0;
 private boolean parsingRequestLineEol = false;
 private int parsingRequestLineStart = 0;
@@ -266,18 +266,22 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 
 byteBuffer.limit(0).position(0);
 lastActiveFilter = -1;
-parsingHeader = true;
 swallowInput = true;
 
 chr = 0;
 prevChr = 0;
 headerParsePos = HeaderParsePosition.HEADER_START;
-parsingRequestLine = true;
 parsingRequestLinePhase = 0;
 parsingRequestLineEol = false;
 parsingRequestLineStart = 0;
 parsingRequestLineQPos = -1;
 headerData.recycle();
+// Recycled last because they are volatile
+// All variables visible to this thread are guaranteed to be visible to
+// any other thread once that thread reads the same volatile. The first
+// action when parsing input data is to read one of these volatiles.
+parsingRequestLine = true;
+parsingHeader = true;
 }
 
 


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



Re: [tomcat] branch master updated: Fix possible concurrency issue

2020-09-15 Thread Mark Thomas
On 15/09/2020 17:35, ma...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> markt pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/master by this push:
>  new 6c21ee5  Fix possible concurrency issue
> 6c21ee5 is described below
> 
> commit 6c21ee5a57e6a6fa9c780d4a8f857d5c3a0b9a35
> Author: Mark Thomas 
> AuthorDate: Tue Sep 15 17:34:50 2020 +0100
> 
> Fix possible concurrency issue

Hi,

This fix is a little on the speculative side.

I've been watching the intermittent CI failures for the last month or so
and there is evidence (mainly in failed WebSocket tests) of something
going wrong in HTTP request parsing.

Today, I saw a failure of once of the TestCoyoteAdapterRequestFuzzing
tests with the following stack trace:

15-Sep-2020 15:15:13.301 INFO [http-nio-127.0.0.1-auto-8-exec-1]
org.apache.coyote.http11.Http11Processor.service Error parsing HTTP
request header
 Note: further occurrences of HTTP request parsing errors will be logged
at DEBUG level.
java.lang.IllegalArgumentException: Request header is too large
at
org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:777)
at
org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:938)
at
org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:589)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:284)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

Given the request, that should not be possible. The only explanation I
can come up with is that the recycling of the InputBuffer was not fully
visible to the http-nio-127.0.0.1-auto-8-exec-1 thread.

This seems a little far-fetched to me but I can't come up with a better
theory. With this theory in mind a looked at the Http11InputBuffer and
if my understanding is correct:
- there is a theoretical concurrency issue
- the patch below fixes it

I do intend to back-port this as my understanding is that the issue is
(theoretically) correct. I'll continue to keep an eye on the CI results
to see if there is any noticeable impact. That said, as I can't
reproduce this and impact is going to have be inferred.

Mark

> ---
>  java/org/apache/coyote/http11/Http11InputBuffer.java | 12 
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
> b/java/org/apache/coyote/http11/Http11InputBuffer.java
> index ab0d1c6..555e3ad 100644
> --- a/java/org/apache/coyote/http11/Http11InputBuffer.java
> +++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
> @@ -71,7 +71,7 @@ public class Http11InputBuffer implements InputBuffer, 
> ApplicationBufferHandler
>  /**
>   * State.
>   */
> -private boolean parsingHeader;
> +private volatile boolean parsingHeader;
>  
>  
>  /**
> @@ -130,7 +130,7 @@ public class Http11InputBuffer implements InputBuffer, 
> ApplicationBufferHandler
>   */
>  private byte prevChr = 0;
>  private byte chr = 0;
> -private boolean parsingRequestLine;
> +private volatile boolean parsingRequestLine;
>  private int parsingRequestLinePhase = 0;
>  private boolean parsingRequestLineEol = false;
>  private int parsingRequestLineStart = 0;
> @@ -266,18 +266,22 @@ public class Http11InputBuffer implements InputBuffer, 
> ApplicationBufferHandler
>  
>  byteBuffer.limit(0).position(0);
>  lastActiveFilter = -1;
> -parsingHeader = true;
>  swallowInput = true;
>  
>  chr = 0;
>  prevChr = 0;
>  headerParsePos = HeaderParsePosition.HEADER_START;
> -parsingRequestLine = true;
>  parsingRequestLinePhase = 0;
>  parsingRequestLineEol = false;
>  parsingRequestLineStart = 0;
>  parsingRequestLineQPos = -1;
>  headerData.recycle();
> +// Recycled last because they are volatile
> +// All variables visible to this thread are guaranteed to be visible 
> to
> +// any other thread once that thread reads the same volatile. The 
> first
> +// action 

[tomcat] branch master updated: Fix possible concurrency issue

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 6c21ee5  Fix possible concurrency issue
6c21ee5 is described below

commit 6c21ee5a57e6a6fa9c780d4a8f857d5c3a0b9a35
Author: Mark Thomas 
AuthorDate: Tue Sep 15 17:34:50 2020 +0100

Fix possible concurrency issue
---
 java/org/apache/coyote/http11/Http11InputBuffer.java | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http11/Http11InputBuffer.java 
b/java/org/apache/coyote/http11/Http11InputBuffer.java
index ab0d1c6..555e3ad 100644
--- a/java/org/apache/coyote/http11/Http11InputBuffer.java
+++ b/java/org/apache/coyote/http11/Http11InputBuffer.java
@@ -71,7 +71,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 /**
  * State.
  */
-private boolean parsingHeader;
+private volatile boolean parsingHeader;
 
 
 /**
@@ -130,7 +130,7 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
  */
 private byte prevChr = 0;
 private byte chr = 0;
-private boolean parsingRequestLine;
+private volatile boolean parsingRequestLine;
 private int parsingRequestLinePhase = 0;
 private boolean parsingRequestLineEol = false;
 private int parsingRequestLineStart = 0;
@@ -266,18 +266,22 @@ public class Http11InputBuffer implements InputBuffer, 
ApplicationBufferHandler
 
 byteBuffer.limit(0).position(0);
 lastActiveFilter = -1;
-parsingHeader = true;
 swallowInput = true;
 
 chr = 0;
 prevChr = 0;
 headerParsePos = HeaderParsePosition.HEADER_START;
-parsingRequestLine = true;
 parsingRequestLinePhase = 0;
 parsingRequestLineEol = false;
 parsingRequestLineStart = 0;
 parsingRequestLineQPos = -1;
 headerData.recycle();
+// Recycled last because they are volatile
+// All variables visible to this thread are guaranteed to be visible to
+// any other thread once that thread reads the same volatile. The first
+// action when parsing input data is to read one of these volatiles.
+parsingRequestLine = true;
+parsingHeader = true;
 }
 
 


-
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: Avoid NPE and keep original behaviour

2020-09-15 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 273c36f  Avoid NPE and keep original behaviour
273c36f is described below

commit 273c36fd51f438305b233a008788bc92e2942cbd
Author: Mark Thomas 
AuthorDate: Tue Sep 15 17:04:43 2020 +0100

Avoid NPE and keep original behaviour
---
 .../apache/catalina/valves/PersistentValve.java| 29 +-
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index df94820..5976f02 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,27 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-synchronized (session) {
-if (store != null && session != null && 
session.isValid()
-&& !isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger()
-.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
-+ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
-+ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+boolean stored = false;
+if (session != null) {
+synchronized (session) {
+if (store != null && session.isValid() &&
+!isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) 
manager).removeSuper(session);
+session.recycle();
+stored = true;
 }
 
 }
 }
+if (!stored) {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + store 
+ " session: " + session + " valid: "
++ (session == null ? "N/A" : 
Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
+}
 } else {
 if (container.getLogger().isDebugEnabled()) {
 container.getLogger().debug("newsessionId Manager: 
" +


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



[tomcat] branch 8.5.x updated: Avoid NPE and keep original behaviour

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new bfccc40  Avoid NPE and keep original behaviour
bfccc40 is described below

commit bfccc408e8f939a5c4603996dbc7a6cd979a92ea
Author: Mark Thomas 
AuthorDate: Tue Sep 15 17:04:43 2020 +0100

Avoid NPE and keep original behaviour
---
 .../apache/catalina/valves/PersistentValve.java| 29 +-
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index df94820..5976f02 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,27 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-synchronized (session) {
-if (store != null && session != null && 
session.isValid()
-&& !isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger()
-.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
-+ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
-+ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+boolean stored = false;
+if (session != null) {
+synchronized (session) {
+if (store != null && session.isValid() &&
+!isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) 
manager).removeSuper(session);
+session.recycle();
+stored = true;
 }
 
 }
 }
+if (!stored) {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + store 
+ " session: " + session + " valid: "
++ (session == null ? "N/A" : 
Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
+}
 } else {
 if (container.getLogger().isDebugEnabled()) {
 container.getLogger().debug("newsessionId Manager: 
" +


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



[tomcat] branch master updated: Avoid NPE and keep original behaviour

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 8290514  Avoid NPE and keep original behaviour
8290514 is described below

commit 8290514200cdde3c996afbc097001c5aedc77c66
Author: Mark Thomas 
AuthorDate: Tue Sep 15 17:04:43 2020 +0100

Avoid NPE and keep original behaviour
---
 .../apache/catalina/valves/PersistentValve.java| 29 +-
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index 36afb94..a63794c 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,21 +170,26 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-synchronized (session) {
-if (store != null && session != null && 
session.isValid()
-&& !isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger()
-.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
-+ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
-+ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+boolean stored = false;
+if (session != null) {
+synchronized (session) {
+if (store != null && session.isValid() &&
+!isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) 
manager).removeSuper(session);
+session.recycle();
+stored = true;
 }
 }
 }
+if (!stored) {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + store 
+ " session: " + session + " valid: "
++ (session == null ? "N/A" : 
Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
+}
 } else {
 if (container.getLogger().isDebugEnabled()) {
 container.getLogger().debug("newsessionId Manager: 
" +


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



buildbot success in on tomcat-7-trunk

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

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

Buildslave for this Build: asf946_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch 7.0.x] 15bbc3d545f4052b082ea726ec66bc7a20dd0460
Blamelist: Mark Thomas ,Violeta Georgieva [VMware] 


Build succeeded!

Sincerely,
 -The Buildbot




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



[Bug 58624] Websocket send blocks indefinitely in FutureToSendHandler

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

cameraezviz  changed:

   What|Removed |Added

URL||https://ngaydem.vn/tin-tuc/
   ||huong-dan-cai-dat-su-dung-c
   ||amera-ezviz-xem-tren-dien-t
   ||hoai/

--- Comment #18 from cameraezviz  ---
Kính gửi: Quý Khách hàng!
Lời đầu, Công ty Cổ phần phát triển công nghệ Ngày Đêm (Ngày Đêm) xin gửi đến
Quý Khách hàng lời chúc sức khỏe, thành công và thịnh vượng. Ngày Đêm xin cảm
ơn Quý Khách hàng đã tín nhiệm, tin dùng và đồng hành cùng sự phát triển của
chúng tôi trong thời gian qua.
Ngày Đêm là một trong những Công ty hàng đầu cung cấp các giải pháp công nghệ,
thi công và lắp đặt, nâng cấp – bao trì pccc, hệ thống camera quan sát, hệ
thống báo động – báo cháy, hệ thống ngôi nhà thông minh, thiết bị văn phòng,
chiếu sáng, hệ thống điện dân dụng…tại Việt Nam. Với trên 7 năm kinh nghiệm
hoạt động kinh doanh, Ngày Đêm tin tưởng sẽ luôn mang đến cho khách hàng sự hài
lòng và tiện ích nhất. Đi cùng nhu cầu của Quý khách, chúng tôi cam kết mang
đến cho khách hàng tiện dụng nhất bằng cách cung cấp sản phẩm một cách trọn
gói, biến ý tưởng của Quý khách hàng thành hiện thực, bao gồm: xây dựng ý
tưởng, thiết kế, thi công, vận hành và chuyển giao công nghệ. Với phương trâm
chữ Tín đi cùng chất lượng, sự hài lòng của Quý khách là thành công của chúng
tôi, Ngày Đêm luôn đặt chất lượng sản phẩm, công trình lên hàng đầu, lấy sự hài
lòng của Quý khách hàng làm tôn chỉ hành động, Công ty chúng tôi đã giành được
sự quan tâm, tin tưởng tuyệt đối từ các đối tác và khách hàng trên toàn quốc.
Nhằm cung cấp cho khách hàng giá cả hợp lý nhất, cùng với thực hiện các dự án,
Ngày Đêm thực hiện các công việc xuất nhập khẩu thiết bị ngoại nhập và nhằm
cung cấp dịch vụ ưu đãi nhất. Ngoài ra Ngày Đêm còn đăng ký làm đại diện độc
quyền, đại diện phân phối cho một số hãng cung cấp thiết bị trên thị trường
Việt Nam như Hikvision, Dahua…(Camera quan sát), Panasonic, Kocom…( chuông
cửa)…và nhiều hãng khác, …
Hoạt động không ngừng nghỉ, Ngày Đêm còn là nhà tư vấn thiết kế chuyên nghiệp
với đội ngũ cán bộ, kỹ sư, kỹ thuật viên giàu kinh nghiệm, chúng tôi đã thực
hiện nhiều công trình trong các lĩnh vực phục vụ cho các công trình tư nhân,
công cộng như: Cơ quan nhà nước, Trường học, khu công nghiệp, khu đô thị, hệ
thống siêu thị, biệt thự, văn phòng, nhà dân, cửa hàng,… 
Đến với chúng tôi, đảm bảo Quý khách hàng sẽ luôn có được những thiết kế ưng ý,
những sản phẩm có chất lượng tốt nhất và dịch vụ hậu mãi chất lượng cao nhất.
Với ý nghĩa của thương hiệu NGÀY ĐÊM – luôn đảm bảo dịch vụ – luôn đảm bảo an
ninh cũng như việc quản lý cho khách hàng cả ngày lẫn đêm, chúng tôi cam kết sẽ
xử lý các sự cố cho khách hàng trong thời gian 24h kể từ khi nhận được thông
báo của khách hàng.
Chúng tôi hiểu rằng, đồng hành cùng sự phát triển của Ngày Đêm là sự thịnh
vượng của Quý khách hàng, Công ty Cổ phần phát triển công nghệ Ngày Đêm luôn
chào đón hợp tác của các đối tác trong và ngoài nước, trên cơ sở chia sẻ lợi
ích cùng hướng tới sự phát triển bền vững lâu dài.
Trân trọng !
https://ngaydem.vn/tin-tuc/huong-dan-cai-dat-su-dung-camera-ezviz-xem-tren-dien-thoai/

-- 
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] 02/02: Deprecate JDBCRealm

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

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

commit 15bbc3d545f4052b082ea726ec66bc7a20dd0460
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:44:40 2020 +0100

Deprecate JDBCRealm
---
 java/org/apache/catalina/mbeans/MBeanFactory.java  | 7 +--
 java/org/apache/catalina/mbeans/mbeans-descriptors.xml | 2 +-
 java/org/apache/catalina/realm/DataSourceRealm.java| 2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  | 4 
 webapps/docs/changelog.xml | 3 +++
 webapps/docs/config/realm.xml  | 3 +++
 webapps/docs/realm-howto.xml   | 3 +++
 7 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java 
b/java/org/apache/catalina/mbeans/MBeanFactory.java
index c1580a5..1dce4b0 100644
--- a/java/org/apache/catalina/mbeans/MBeanFactory.java
+++ b/java/org/apache/catalina/mbeans/MBeanFactory.java
@@ -39,7 +39,6 @@ import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.core.StandardService;
 import org.apache.catalina.loader.WebappLoader;
 import org.apache.catalina.realm.DataSourceRealm;
-import org.apache.catalina.realm.JDBCRealm;
 import org.apache.catalina.realm.JNDIRealm;
 import org.apache.catalina.realm.MemoryRealm;
 import org.apache.catalina.realm.UserDatabaseRealm;
@@ -392,13 +391,17 @@ public class MBeanFactory {
  * @return the object name of the created realm
  *
  * @exception Exception if an MBean cannot be created or registered
+ *
+ * @deprecated This method will be removed in Tomcat 10. Use a
+ * DataSourceRealm instead.
  */
+@Deprecated
 public String createJDBCRealm(String parent, String driverName,
 String connectionName, String connectionPassword, String connectionURL)
 throws Exception {
 
 // Create a new JDBCRealm instance
-JDBCRealm realm = new JDBCRealm();
+org.apache.catalina.realm.JDBCRealm realm = new 
org.apache.catalina.realm.JDBCRealm();
 realm.setDriverName(driverName);
 realm.setConnectionName(connectionName);
 realm.setConnectionPassword(connectionPassword);
diff --git a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml 
b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
index 6c59c00..168d45e 100644
--- a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
@@ -115,7 +115,7 @@
 
 
 
   Realm that works with any JDBC JNDI DataSource.
-* See the JDBCRealm.howto for more details on how to set up the database and
+* See the Realm How-To for more details on how to set up the database and
 * for configuration options.
 *
 * @author Glenn L. Nielsen
diff --git a/java/org/apache/catalina/realm/JDBCRealm.java 
b/java/org/apache/catalina/realm/JDBCRealm.java
index 9679de2..76d0751 100644
--- a/java/org/apache/catalina/realm/JDBCRealm.java
+++ b/java/org/apache/catalina/realm/JDBCRealm.java
@@ -47,7 +47,11 @@ import org.apache.tomcat.util.ExceptionUtils;
 * @author Craig R. McClanahan
 * @author Carson McDonald
 * @author Ignacio Ortega
+*
+* @deprecated Will be removed in Tomcat 10 onwards. Use the DataSourceRealm
+* instead.
 */
+@Deprecated
 public class JDBCRealm
 extends RealmBase {
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index eb0ee90..b675d3b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -80,6 +80,9 @@
 the requested resource. Based on a pull request by Sergey Ponomarev.
 (markt)
   
+  
+Deprecate the JDBCRealm. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index b536e13..66a3b6e 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -1046,6 +1046,9 @@
 
   
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 The JDBC Database Realm connects Tomcat to
 a relational database, accessed through an appropriate JDBC driver,
 to perform lookups of usernames, passwords, and their associated
diff --git a/webapps/docs/realm-howto.xml b/webapps/docs/realm-howto.xml
index d52a003..29e637d 100644
--- a/webapps/docs/realm-howto.xml
+++ b/webapps/docs/realm-howto.xml
@@ -1110,6 +1110,9 @@ functionality to a UserDatabase Realm.
 
 Introduction
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 JDBCRealm is an implementation of the Tomcat
 Realm interface that looks up users in a relational database
 accessed via a JDBC driver.  There is substantial configuration flexibility


-
To 

[tomcat] 01/02: Documentation improvements in preparation for deprecating JDBCRealm

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

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

commit 4bac072db10ee573d518f84d576ff405621bb446
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:32:23 2020 +0100

Documentation improvements in preparation for deprecating JDBCRealm
---
 webapps/docs/appdev/deployment.xml   |   2 +-
 webapps/docs/config/realm.xml| 262 +++
 webapps/docs/host-manager-howto.xml  |   7 +-
 webapps/docs/html-host-manager-howto.xml |   7 +-
 webapps/docs/realm-howto.xml | 225 +-
 5 files changed, 249 insertions(+), 254 deletions(-)

diff --git a/webapps/docs/appdev/deployment.xml 
b/webapps/docs/appdev/deployment.xml
index 6d48a5d..64fef9a 100644
--- a/webapps/docs/appdev/deployment.xml
+++ b/webapps/docs/appdev/deployment.xml
@@ -131,7 +131,7 @@ The location commonly used within a Tomcat installation for 
shared code is
 $CATALINA_HOME/lib. JAR files placed here are visible both to
 web applications and internal Tomcat code. This is a good place to put JDBC
 drivers that are required for both your application or internal Tomcat use
-(such as for a JDBCRealm).
+(such as for a DataSourceRealm).
 
 Out of the box, a standard Tomcat installation includes a variety
 of pre-installed shared library files, including:
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index 5d07c76..b536e13 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -92,137 +92,6 @@
   
 
 
-  
-
-The JDBC Database Realm connects Tomcat to
-a relational database, accessed through an appropriate JDBC driver,
-to perform lookups of usernames, passwords, and their associated
-roles.  Because the lookup is done each time that it is required,
-changes to the database will be immediately reflected in the
-information used to authenticate new logins.
-
-A rich set of additional attributes lets you configure the required
-connection to the underlying database, as well as the table and
-column names used to retrieve the required information:
-
-
-
-  
-This attribute controls how the special role name * is
-handled when processing authorization constraints in web.xml. By
-default, the specification compliant value of strict is
-used which means that the user must be assigned one of the roles 
defined
-in web.xml. The alternative values are authOnly which 
means
-that the user must be authenticated but no check is made for assigned
-roles and strictAuthOnly which means that the user must be
-authenticated and no check will be made for assigned roles unless roles
-are defined in web.xml in which case the user must be assigned at least
-one of those roles.
-When this attribute has the value of authOnly or
-strictAuthOnly, the roleNameCol and
-userRoleTable attributes become optional. If those two
-attributes are omitted, the user's roles will not be loaded by this
-Realm.
-  
-
-  
-The database username to use when establishing the JDBC
-connection.
-  
-
-  
-The database password to use when establishing the JDBC
-connection.
-  
-
-  
-The connection URL to be passed to the JDBC driver when
-establishing a database connection.
-  
-
-  
-The name of the MessageDigest algorithm used
-to encode user passwords stored in the database.  If not specified,
-user passwords are assumed to be stored in clear-text.
-  
-
-  
-The charset for encoding digests.  If not specified, the platform
-default will be used.
-  
-
-  
-Fully qualified Java class name of the JDBC driver to be
-used to connect to the authentication database.
-  
-
-  
-Name of the column, in the "user roles" table, which contains
-a role name assigned to the corresponding user.
-This attribute is required in majority of
-configurations. See allRolesMode attribute for
-a rare case when it can be omitted.
-  
-
-  
-When processing users authenticated via the GSS-API, this attribute
-controls if any @... is removed from the end of the user
-name. If not specified, the default is true.
-  
-
-  
-The HTTP status code to use when the container needs to issue an 
HTTP
-   redirect to meet the requirements of a configured transport
-   guarantee. The provided status code is not validated. If not
-   specified, the default value of 302 is used.
-  
-
-  
-Name of the column, in the "users" table, which contains
-the user's credentials (i.e. password).  If a value for the
-digest attribute is specified, 

[tomcat] branch 7.0.x updated (e4f402d -> 15bbc3d)

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

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


from e4f402d  Fix typos
 new 4bac072  Documentation improvements in preparation for deprecating 
JDBCRealm
 new 15bbc3d  Deprecate JDBCRealm

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/mbeans/MBeanFactory.java  |   7 +-
 .../apache/catalina/mbeans/mbeans-descriptors.xml  |   2 +-
 .../org/apache/catalina/realm/DataSourceRealm.java |   2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  |   4 +
 webapps/docs/appdev/deployment.xml |   2 +-
 webapps/docs/changelog.xml |   3 +
 webapps/docs/config/realm.xml  | 265 +++--
 webapps/docs/host-manager-howto.xml|   7 +-
 webapps/docs/html-host-manager-howto.xml   |   7 +-
 webapps/docs/realm-howto.xml   | 228 +-
 10 files changed, 269 insertions(+), 258 deletions(-)


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



[tomcat] 02/02: Deprecate JDBCRealm

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

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

commit 73da693d2b7798cc5e539faadc117f2250398c09
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:44:40 2020 +0100

Deprecate JDBCRealm
---
 java/org/apache/catalina/mbeans/MBeanFactory.java  | 7 +--
 java/org/apache/catalina/mbeans/mbeans-descriptors.xml | 2 +-
 java/org/apache/catalina/realm/DataSourceRealm.java| 2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  | 4 
 webapps/docs/changelog.xml | 3 +++
 webapps/docs/config/realm.xml  | 3 +++
 webapps/docs/realm-howto.xml   | 3 +++
 7 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java 
b/java/org/apache/catalina/mbeans/MBeanFactory.java
index 6e411d0..ee45cd0 100644
--- a/java/org/apache/catalina/mbeans/MBeanFactory.java
+++ b/java/org/apache/catalina/mbeans/MBeanFactory.java
@@ -37,7 +37,6 @@ import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.core.StandardService;
 import org.apache.catalina.loader.WebappLoader;
 import org.apache.catalina.realm.DataSourceRealm;
-import org.apache.catalina.realm.JDBCRealm;
 import org.apache.catalina.realm.JNDIRealm;
 import org.apache.catalina.realm.MemoryRealm;
 import org.apache.catalina.realm.UserDatabaseRealm;
@@ -325,13 +324,17 @@ public class MBeanFactory {
  * @return the object name of the created realm
  *
  * @exception Exception if an MBean cannot be created or registered
+ *
+ * @deprecated This method will be removed in Tomcat 10. Use a
+ * DataSourceRealm instead.
  */
+@Deprecated
 public String createJDBCRealm(String parent, String driverName,
 String connectionName, String connectionPassword, String connectionURL)
 throws Exception {
 
 // Create a new JDBCRealm instance
-JDBCRealm realm = new JDBCRealm();
+org.apache.catalina.realm.JDBCRealm realm = new 
org.apache.catalina.realm.JDBCRealm();
 realm.setDriverName(driverName);
 realm.setConnectionName(connectionName);
 realm.setConnectionPassword(connectionPassword);
diff --git a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml 
b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
index 8af469b..913830f 100644
--- a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
@@ -106,7 +106,7 @@
 
 
 
   Realm that works with any JDBC JNDI DataSource.
-* See the JDBCRealm.howto for more details on how to set up the database and
+* See the Realm How-To for more details on how to set up the database and
 * for configuration options.
 *
 * @author Glenn L. Nielsen
diff --git a/java/org/apache/catalina/realm/JDBCRealm.java 
b/java/org/apache/catalina/realm/JDBCRealm.java
index 9f6c663..d32fcb1 100644
--- a/java/org/apache/catalina/realm/JDBCRealm.java
+++ b/java/org/apache/catalina/realm/JDBCRealm.java
@@ -47,7 +47,11 @@ import org.apache.tomcat.util.ExceptionUtils;
 * @author Craig R. McClanahan
 * @author Carson McDonald
 * @author Ignacio Ortega
+*
+* @deprecated Will be removed in Tomcat 10 onwards. Use the DataSourceRealm
+* instead.
 */
+@Deprecated
 public class JDBCRealm
 extends RealmBase {
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f6a9a95..2524fb3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -51,6 +51,9 @@
 Fix race condition when saving and recycling session in
 PersistentValve. (kfujino)
   
+  
+Deprecate the JDBCRealm. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index 2b674c4..8cf4381 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -1024,6 +1024,9 @@
 
   
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 The JDBC Database Realm connects Tomcat to
 a relational database, accessed through an appropriate JDBC driver,
 to perform lookups of usernames, passwords, and their associated
diff --git a/webapps/docs/realm-howto.xml b/webapps/docs/realm-howto.xml
index c70fc92..adad6aa 100644
--- a/webapps/docs/realm-howto.xml
+++ b/webapps/docs/realm-howto.xml
@@ -1115,6 +1115,9 @@ functionality to a UserDatabase Realm.
 
 Introduction
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 JDBCRealm is an implementation of the Tomcat
 Realm interface that looks up users in a relational database
 accessed via a JDBC driver.  There is substantial configuration flexibility


-
To 

[tomcat] 01/02: Documentation improvements in preparation for deprecating JDBCRealm

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

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

commit 301fe5663666f7e9c244168f20a6be3f5d6991b9
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:32:23 2020 +0100

Documentation improvements in preparation for deprecating JDBCRealm
---
 webapps/docs/appdev/deployment.xml   |   2 +-
 webapps/docs/config/realm.xml| 244 ---
 webapps/docs/host-manager-howto.xml  |   7 +-
 webapps/docs/html-host-manager-howto.xml |   7 +-
 webapps/docs/realm-howto.xml | 217 ++-
 5 files changed, 238 insertions(+), 239 deletions(-)

diff --git a/webapps/docs/appdev/deployment.xml 
b/webapps/docs/appdev/deployment.xml
index b615331..46f77af 100644
--- a/webapps/docs/appdev/deployment.xml
+++ b/webapps/docs/appdev/deployment.xml
@@ -131,7 +131,7 @@ The location commonly used within a Tomcat installation for 
shared code is
 $CATALINA_HOME/lib. JAR files placed here are visible both to
 web applications and internal Tomcat code. This is a good place to put JDBC
 drivers that are required for both your application or internal Tomcat use
-(such as for a JDBCRealm).
+(such as for a DataSourceRealm).
 
 Out of the box, a standard Tomcat installation includes a variety
 of pre-installed shared library files, including:
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index c9b0a95..2b674c4 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -92,126 +92,6 @@
   
 
 
-  
-
-The JDBC Database Realm connects Tomcat to
-a relational database, accessed through an appropriate JDBC driver,
-to perform lookups of usernames, passwords, and their associated
-roles.  Because the lookup is done each time that it is required,
-changes to the database will be immediately reflected in the
-information used to authenticate new logins.
-
-A rich set of additional attributes lets you configure the required
-connection to the underlying database, as well as the table and
-column names used to retrieve the required information:
-
-
-
-  
-This attribute controls how the special role name * is
-handled when processing authorization constraints in web.xml. By
-default, the specification compliant value of strict is
-used which means that the user must be assigned one of the roles 
defined
-in web.xml. The alternative values are authOnly which 
means
-that the user must be authenticated but no check is made for assigned
-roles and strictAuthOnly which means that the user must be
-authenticated and no check will be made for assigned roles unless roles
-are defined in web.xml in which case the user must be assigned at least
-one of those roles.
-When this attribute has the value of authOnly or
-strictAuthOnly, the roleNameCol and
-userRoleTable attributes become optional. If those two
-attributes are omitted, the user's roles will not be loaded by this
-Realm.
-  
-
-  
-The database username to use when establishing the JDBC
-connection.
-  
-
-  
-The database password to use when establishing the JDBC
-connection.
-  
-
-  
-The connection URL to be passed to the JDBC driver when
-establishing a database connection.
-  
-
-  
-Fully qualified Java class name of the JDBC driver to be
-used to connect to the authentication database.
-  
-
-  
-Name of the column, in the "user roles" table, which contains
-a role name assigned to the corresponding user.
-This attribute is required in majority of
-configurations. See allRolesMode attribute for
-a rare case when it can be omitted.
-  
-
-  
-When processing users authenticated via the GSS-API, this attribute
-controls if any @... is removed from the end of the user
-name. If not specified, the default is true.
-  
-
-  
-The HTTP status code to use when the container needs to issue an 
HTTP
-   redirect to meet the requirements of a configured transport
-   guarantee. The provided status code is not validated. If not
-   specified, the default value of 302 is used.
-  
-
-  
-Name of the column, in the "users" table, which contains
-the user's credentials (i.e. password).  If a
-CredentialHandler is specified, this component
-will assume that the passwords have been encoded with the
-specified algorithm.  Otherwise, they will be assumed to be
-in clear text.
-  
-
-  
-Name of the column, in the "users" and "user roles" table,
-that contains the user's username.
-  
-
-  
-Name of the 

[tomcat] branch 8.5.x updated (08b8f9d -> 73da693)

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

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


from 08b8f9d  Fix typos
 new 301fe56  Documentation improvements in preparation for deprecating 
JDBCRealm
 new 73da693  Deprecate JDBCRealm

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/mbeans/MBeanFactory.java  |   7 +-
 .../apache/catalina/mbeans/mbeans-descriptors.xml  |   2 +-
 .../org/apache/catalina/realm/DataSourceRealm.java |   2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  |   4 +
 webapps/docs/appdev/deployment.xml |   2 +-
 webapps/docs/changelog.xml |   3 +
 webapps/docs/config/realm.xml  | 247 +++--
 webapps/docs/host-manager-howto.xml|   7 +-
 webapps/docs/html-host-manager-howto.xml   |   7 +-
 webapps/docs/realm-howto.xml   | 220 +-
 10 files changed, 258 insertions(+), 243 deletions(-)


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



[tomcat] branch 7.0.x updated: Fix typos

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

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new e4f402d  Fix typos
e4f402d is described below

commit e4f402d80761c41a54cbd8101b12353ae836fd19
Author: Violeta Georgieva [VMware] 
AuthorDate: Tue Sep 15 18:07:28 2020 +0300

Fix typos
---
 webapps/docs/changelog.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6c4b8c9..eb0ee90 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -90,7 +90,7 @@
 return value, particularly when end of stream has been reached. (markt)
   
   
-Fix a rare potential race condition when chekcing for timeouts with the
+Fix a rare potential race condition when checking for timeouts with the
 APR connector. (markt)
   
 
@@ -119,7 +119,7 @@
 the output is more consistent. PR provided by Holomark. (markt)
   
   
-Remove the out of date functional specification secton from the
+Remove the out of date functional specification section from the
 documentation web application. (markt)
   
 
@@ -150,7 +150,7 @@
 Update to Commons Daemon 1.2.3. This adds support to jsvc for
 --enable-preview and native memory tracking (Procrun
 already supported these features), adds some addition debug logging and
-adds a new feature to Procrun that outputs the commnd to (re-)configure
+adds a new feature to Procrun that outputs the command to 
(re-)configure
 the service with the current settings. (markt)
   
   


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



[tomcat] 02/02: Deprecate JDBCRealm

2020-09-15 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 b2a97a84eab79cef12ef24b3e320a528e5d75631
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:44:40 2020 +0100

Deprecate JDBCRealm
---
 java/org/apache/catalina/mbeans/MBeanFactory.java  | 7 +--
 java/org/apache/catalina/mbeans/mbeans-descriptors.xml | 2 +-
 java/org/apache/catalina/realm/DataSourceRealm.java| 2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  | 4 
 webapps/docs/changelog.xml | 3 +++
 webapps/docs/config/realm.xml  | 3 +++
 webapps/docs/realm-howto.xml   | 3 +++
 7 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java 
b/java/org/apache/catalina/mbeans/MBeanFactory.java
index 050031b..bf2970e 100644
--- a/java/org/apache/catalina/mbeans/MBeanFactory.java
+++ b/java/org/apache/catalina/mbeans/MBeanFactory.java
@@ -38,7 +38,6 @@ import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.core.StandardService;
 import org.apache.catalina.loader.WebappLoader;
 import org.apache.catalina.realm.DataSourceRealm;
-import org.apache.catalina.realm.JDBCRealm;
 import org.apache.catalina.realm.JNDIRealm;
 import org.apache.catalina.realm.MemoryRealm;
 import org.apache.catalina.realm.UserDatabaseRealm;
@@ -334,13 +333,17 @@ public class MBeanFactory {
  * @return the object name of the created realm
  *
  * @exception Exception if an MBean cannot be created or registered
+ *
+ * @deprecated This method will be removed in Tomcat 10. Use a
+ * DataSourceRealm instead.
  */
+@Deprecated
 public String createJDBCRealm(String parent, String driverName,
 String connectionName, String connectionPassword, String connectionURL)
 throws Exception {
 
 // Create a new JDBCRealm instance
-JDBCRealm realm = new JDBCRealm();
+org.apache.catalina.realm.JDBCRealm realm = new 
org.apache.catalina.realm.JDBCRealm();
 realm.setDriverName(driverName);
 realm.setConnectionName(connectionName);
 realm.setConnectionPassword(connectionPassword);
diff --git a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml 
b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
index 8af469b..913830f 100644
--- a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
@@ -106,7 +106,7 @@
 
 
 
   Realm that works with any JDBC JNDI DataSource.
-* See the JDBCRealm.howto for more details on how to set up the database and
+* See the Realm How-To for more details on how to set up the database and
 * for configuration options.
 *
 * @author Glenn L. Nielsen
diff --git a/java/org/apache/catalina/realm/JDBCRealm.java 
b/java/org/apache/catalina/realm/JDBCRealm.java
index f27d9ac..01cd54f 100644
--- a/java/org/apache/catalina/realm/JDBCRealm.java
+++ b/java/org/apache/catalina/realm/JDBCRealm.java
@@ -47,7 +47,11 @@ import org.apache.tomcat.util.ExceptionUtils;
 * @author Craig R. McClanahan
 * @author Carson McDonald
 * @author Ignacio Ortega
+*
+* @deprecated Will be removed in Tomcat 10 onwards. Use the DataSourceRealm
+* instead.
 */
+@Deprecated
 public class JDBCRealm
 extends RealmBase {
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9a6e52c..9151610 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,6 +55,9 @@
 Fix race condition when saving and recycling session in
 PersistentValve. (kfujino)
   
+  
+Deprecate the JDBCRealm. (markt)
+  
 
   
   
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index 44fbd2d..247ea64 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -1050,6 +1050,9 @@
 
   
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 The JDBC Database Realm connects Tomcat to
 a relational database, accessed through an appropriate JDBC driver,
 to perform lookups of usernames, passwords, and their associated
diff --git a/webapps/docs/realm-howto.xml b/webapps/docs/realm-howto.xml
index c70fc92..adad6aa 100644
--- a/webapps/docs/realm-howto.xml
+++ b/webapps/docs/realm-howto.xml
@@ -1115,6 +1115,9 @@ functionality to a UserDatabase Realm.
 
 Introduction
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 JDBCRealm is an implementation of the Tomcat
 Realm interface that looks up users in a relational database
 accessed via a JDBC driver.  There is substantial configuration flexibility


-
To 

[tomcat] 01/02: Documentation improvements in preparation for deprecating JDBCRealm

2020-09-15 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 a0f8a6a97cda296c18be3b4ad434551102c77d11
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:32:23 2020 +0100

Documentation improvements in preparation for deprecating JDBCRealm
---
 webapps/docs/appdev/deployment.xml   |   2 +-
 webapps/docs/config/realm.xml| 244 ---
 webapps/docs/host-manager-howto.xml  |   7 +-
 webapps/docs/html-host-manager-howto.xml |   7 +-
 webapps/docs/realm-howto.xml | 217 ++-
 5 files changed, 238 insertions(+), 239 deletions(-)

diff --git a/webapps/docs/appdev/deployment.xml 
b/webapps/docs/appdev/deployment.xml
index f479f97..77395a4 100644
--- a/webapps/docs/appdev/deployment.xml
+++ b/webapps/docs/appdev/deployment.xml
@@ -131,7 +131,7 @@ The location commonly used within a Tomcat installation for 
shared code is
 $CATALINA_HOME/lib. JAR files placed here are visible both to
 web applications and internal Tomcat code. This is a good place to put JDBC
 drivers that are required for both your application or internal Tomcat use
-(such as for a JDBCRealm).
+(such as for a DataSourceRealm).
 
 Out of the box, a standard Tomcat installation includes a variety
 of pre-installed shared library files, including:
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index 974e54e..44fbd2d 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -92,126 +92,6 @@
   
 
 
-  
-
-The JDBC Database Realm connects Tomcat to
-a relational database, accessed through an appropriate JDBC driver,
-to perform lookups of usernames, passwords, and their associated
-roles.  Because the lookup is done each time that it is required,
-changes to the database will be immediately reflected in the
-information used to authenticate new logins.
-
-A rich set of additional attributes lets you configure the required
-connection to the underlying database, as well as the table and
-column names used to retrieve the required information:
-
-
-
-  
-This attribute controls how the special role name * is
-handled when processing authorization constraints in web.xml. By
-default, the specification compliant value of strict is
-used which means that the user must be assigned one of the roles 
defined
-in web.xml. The alternative values are authOnly which 
means
-that the user must be authenticated but no check is made for assigned
-roles and strictAuthOnly which means that the user must be
-authenticated and no check will be made for assigned roles unless roles
-are defined in web.xml in which case the user must be assigned at least
-one of those roles.
-When this attribute has the value of authOnly or
-strictAuthOnly, the roleNameCol and
-userRoleTable attributes become optional. If those two
-attributes are omitted, the user's roles will not be loaded by this
-Realm.
-  
-
-  
-The database username to use when establishing the JDBC
-connection.
-  
-
-  
-The database password to use when establishing the JDBC
-connection.
-  
-
-  
-The connection URL to be passed to the JDBC driver when
-establishing a database connection.
-  
-
-  
-Fully qualified Java class name of the JDBC driver to be
-used to connect to the authentication database.
-  
-
-  
-Name of the column, in the "user roles" table, which contains
-a role name assigned to the corresponding user.
-This attribute is required in majority of
-configurations. See allRolesMode attribute for
-a rare case when it can be omitted.
-  
-
-  
-When processing users authenticated via the GSS-API, this attribute
-controls if any @... is removed from the end of the user
-name. If not specified, the default is true.
-  
-
-  
-The HTTP status code to use when the container needs to issue an 
HTTP
-   redirect to meet the requirements of a configured transport
-   guarantee. The provided status code is not validated. If not
-   specified, the default value of 302 is used.
-  
-
-  
-Name of the column, in the "users" table, which contains
-the user's credentials (i.e. password).  If a
-CredentialHandler is specified, this component
-will assume that the passwords have been encoded with the
-specified algorithm.  Otherwise, they will be assumed to be
-in clear text.
-  
-
-  
-Name of the column, in the "users" and "user roles" table,
-that contains the user's username.
-  
-
-  
-Name of the 

[tomcat] branch 9.0.x updated (49aa2b3 -> b2a97a8)

2020-09-15 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 49aa2b3  Fix typos
 new a0f8a6a  Documentation improvements in preparation for deprecating 
JDBCRealm
 new b2a97a8  Deprecate JDBCRealm

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/mbeans/MBeanFactory.java  |   7 +-
 .../apache/catalina/mbeans/mbeans-descriptors.xml  |   2 +-
 .../org/apache/catalina/realm/DataSourceRealm.java |   2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  |   4 +
 webapps/docs/appdev/deployment.xml |   2 +-
 webapps/docs/changelog.xml |   3 +
 webapps/docs/config/realm.xml  | 247 +++--
 webapps/docs/host-manager-howto.xml|   7 +-
 webapps/docs/html-host-manager-howto.xml   |   7 +-
 webapps/docs/realm-howto.xml   | 220 +-
 10 files changed, 258 insertions(+), 243 deletions(-)


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



[tomcat] branch master updated: Update changelog

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

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


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

commit d94684a96f18acd307d00e7b217cdef7b0250f24
Author: Mark Thomas 
AuthorDate: Tue Sep 15 16:02:31 2020 +0100

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

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9936d7c..4c72b3a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -55,6 +55,9 @@
 Fix race condition when saving and recycling session in
 PersistentValve. (kfujino)
   
+  
+Remove the JDBCRealm. (markt)
+  
 
   
   


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



[tomcat] branch 8.5.x updated: Fix typos

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

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


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

commit 08b8f9da8357754012535dfa5e0accdb4834abda
Author: Violeta Georgieva [VMware] 
AuthorDate: Tue Sep 15 17:57:00 2020 +0300

Fix typos
---
 webapps/docs/changelog.xml | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 328941f..f6a9a95 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -76,7 +76,7 @@
 Update to Commons Daemon 1.2.3. This adds support to jsvc for
 --enable-preview and native memory tracking (Procrun
 already supported these features), adds some addition debug logging and
-adds a new feature to Procrun that outputs the commnd to (re-)configure
+adds a new feature to Procrun that outputs the command to 
(re-)configure
 the service with the current settings. (markt)
   
 
@@ -121,7 +121,7 @@
 Based on a patch provided by Milo van der Zee. (markt)
   
   
-Correct the path vaidation to allow the use of the file system root for
+Correct the path validation to allow the use of the file system root 
for
 the docBase attribute of a Context. Note that
 such a configuration should be used with caution. (markt)
   
@@ -142,7 +142,7 @@
   
 64713: The JASPIC authenticator now checks the value of
 jakarta.servlet.http.registerSession set by the
-ServerAuthModule when decideing whether or nor to register
+ServerAuthModule when deciding whether or nor to register
 the session. Based on a patch by Robert Rodewald. (markt)
   
 
@@ -249,7 +249,7 @@
 (schultz)
   
   
-Remove the out of date functional specification secton from the
+Remove the out of date functional specification section from the
 documentation web application. (markt)
   
   


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



[tomcat] 03/03: Remove deprecated JDBCRealm

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

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

commit c714bfdfbeb37a7fcc679143a35fd72ac40cdabf
Author: Mark Thomas 
AuthorDate: Tue Sep 15 15:01:18 2020 +0100

Remove deprecated JDBCRealm
---
 build.xml  |   1 -
 java/org/apache/catalina/mbeans/MBeanFactory.java  |  32 -
 .../apache/catalina/mbeans/mbeans-descriptors.xml  |   9 -
 java/org/apache/catalina/realm/JDBCRealm.java  | 745 -
 .../apache/catalina/realm/LocalStrings.properties  |   7 -
 .../catalina/realm/LocalStrings_de.properties  |   3 -
 .../catalina/realm/LocalStrings_es.properties  |   7 -
 .../catalina/realm/LocalStrings_fr.properties  |   7 -
 .../catalina/realm/LocalStrings_ja.properties  |   7 -
 .../catalina/realm/LocalStrings_ko.properties  |   7 -
 .../catalina/realm/LocalStrings_zh_CN.properties   |   7 -
 .../apache/catalina/realm/mbeans-descriptors.xml   |  71 --
 res/findbugs/filter-false-positives.xml|  19 +-
 webapps/docs/config/realm.xml  | 126 
 webapps/docs/manager-howto.xml |   2 +-
 webapps/docs/realm-howto.xml   | 113 
 webapps/docs/security-howto.xml|   4 -
 17 files changed, 2 insertions(+), 1165 deletions(-)

diff --git a/build.xml b/build.xml
index 349c1d4..717912d 100644
--- a/build.xml
+++ b/build.xml
@@ -561,7 +561,6 @@
 
 
 
-
 
 
 
diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java 
b/java/org/apache/catalina/mbeans/MBeanFactory.java
index bf2970e..8ef53ce 100644
--- a/java/org/apache/catalina/mbeans/MBeanFactory.java
+++ b/java/org/apache/catalina/mbeans/MBeanFactory.java
@@ -323,38 +323,6 @@ public class MBeanFactory {
 
 
 /**
- * Create a new JDBC Realm.
- *
- * @param parent MBean Name of the associated parent component
- * @param driverName JDBC driver name
- * @param connectionName the user name for the connection
- * @param connectionPassword the password for the connection
- * @param connectionURL the connection URL to the database
- * @return the object name of the created realm
- *
- * @exception Exception if an MBean cannot be created or registered
- *
- * @deprecated This method will be removed in Tomcat 10. Use a
- * DataSourceRealm instead.
- */
-@Deprecated
-public String createJDBCRealm(String parent, String driverName,
-String connectionName, String connectionPassword, String connectionURL)
-throws Exception {
-
-// Create a new JDBCRealm instance
-org.apache.catalina.realm.JDBCRealm realm = new 
org.apache.catalina.realm.JDBCRealm();
-realm.setDriverName(driverName);
-realm.setConnectionName(connectionName);
-realm.setConnectionPassword(connectionPassword);
-realm.setConnectionURL(connectionURL);
-
-// Add the new instance to its parent component
-return addRealmToParent(parent, realm);
-}
-
-
-/**
  * Create a new JNDI Realm.
  *
  * @param parent MBean Name of the associated parent component
diff --git a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml 
b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
index 913830f..9597210 100644
--- a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
@@ -105,15 +105,6 @@
  type="int"/>
 
 
-
-  
-
-
 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.
- */
-
-
-package org.apache.catalina.realm;
-
-
-import java.security.Principal;
-import java.sql.Connection;
-import java.sql.Driver;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Properties;
-
-import org.apache.catalina.LifecycleException;
-import org.apache.tomcat.util.ExceptionUtils;
-
-
-/**
-*
-* Implementation of Realm that works with any JDBC supported database.
-* See the JDBCRealm.howto for more details on how to set up the database and
-* for configuration options.
-*
-* For a Realm implementation that supports connection pooling and
-* doesn't require synchronisation of authenticate(),
-* getPassword(), roles() and
-* getPrincipal() or the ugly connection logic use the
-* DataSourceRealm.
-*
-* @author Craig R. McClanahan
-* @author Carson McDonald
-* @author Ignacio Ortega
-*
-* @deprecated Will be removed in Tomcat 10 onwards. Use the DataSourceRealm

[tomcat] 01/03: Documentation improvements in preparation for deprecating JDBCRealm

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

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

commit 3b15ba95dc681a39ea6115cfc351c0270f2dbfea
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:32:23 2020 +0100

Documentation improvements in preparation for deprecating JDBCRealm
---
 webapps/docs/appdev/deployment.xml   |   2 +-
 webapps/docs/config/realm.xml| 244 ---
 webapps/docs/host-manager-howto.xml  |   7 +-
 webapps/docs/html-host-manager-howto.xml |   7 +-
 webapps/docs/realm-howto.xml | 217 ++-
 5 files changed, 238 insertions(+), 239 deletions(-)

diff --git a/webapps/docs/appdev/deployment.xml 
b/webapps/docs/appdev/deployment.xml
index f479f97..77395a4 100644
--- a/webapps/docs/appdev/deployment.xml
+++ b/webapps/docs/appdev/deployment.xml
@@ -131,7 +131,7 @@ The location commonly used within a Tomcat installation for 
shared code is
 $CATALINA_HOME/lib. JAR files placed here are visible both to
 web applications and internal Tomcat code. This is a good place to put JDBC
 drivers that are required for both your application or internal Tomcat use
-(such as for a JDBCRealm).
+(such as for a DataSourceRealm).
 
 Out of the box, a standard Tomcat installation includes a variety
 of pre-installed shared library files, including:
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index aa5e5b9..f18eacc 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -92,126 +92,6 @@
   
 
 
-  
-
-The JDBC Database Realm connects Tomcat to
-a relational database, accessed through an appropriate JDBC driver,
-to perform lookups of usernames, passwords, and their associated
-roles.  Because the lookup is done each time that it is required,
-changes to the database will be immediately reflected in the
-information used to authenticate new logins.
-
-A rich set of additional attributes lets you configure the required
-connection to the underlying database, as well as the table and
-column names used to retrieve the required information:
-
-
-
-  
-This attribute controls how the special role name * is
-handled when processing authorization constraints in web.xml. By
-default, the specification compliant value of strict is
-used which means that the user must be assigned one of the roles 
defined
-in web.xml. The alternative values are authOnly which 
means
-that the user must be authenticated but no check is made for assigned
-roles and strictAuthOnly which means that the user must be
-authenticated and no check will be made for assigned roles unless roles
-are defined in web.xml in which case the user must be assigned at least
-one of those roles.
-When this attribute has the value of authOnly or
-strictAuthOnly, the roleNameCol and
-userRoleTable attributes become optional. If those two
-attributes are omitted, the user's roles will not be loaded by this
-Realm.
-  
-
-  
-The database username to use when establishing the JDBC
-connection.
-  
-
-  
-The database password to use when establishing the JDBC
-connection.
-  
-
-  
-The connection URL to be passed to the JDBC driver when
-establishing a database connection.
-  
-
-  
-Fully qualified Java class name of the JDBC driver to be
-used to connect to the authentication database.
-  
-
-  
-Name of the column, in the "user roles" table, which contains
-a role name assigned to the corresponding user.
-This attribute is required in majority of
-configurations. See allRolesMode attribute for
-a rare case when it can be omitted.
-  
-
-  
-When processing users authenticated via the GSS-API, this attribute
-controls if any @... is removed from the end of the user
-name. If not specified, the default is true.
-  
-
-  
-The HTTP status code to use when the container needs to issue an 
HTTP
-   redirect to meet the requirements of a configured transport
-   guarantee. The provided status code is not validated. If not
-   specified, the default value of 302 is used.
-  
-
-  
-Name of the column, in the "users" table, which contains
-the user's credentials (i.e. password).  If a
-CredentialHandler is specified, this component
-will assume that the passwords have been encoded with the
-specified algorithm.  Otherwise, they will be assumed to be
-in clear text.
-  
-
-  
-Name of the column, in the "users" and "user roles" table,
-that contains the user's username.
-  
-
-  
-Name of the 

[tomcat] 02/03: Deprecate JDBCRealm

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

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

commit 20181bb9b7dc6d9407dd3c9430c4d79f880c1027
Author: Mark Thomas 
AuthorDate: Tue Sep 15 14:44:40 2020 +0100

Deprecate JDBCRealm
---
 java/org/apache/catalina/mbeans/MBeanFactory.java  | 7 +--
 java/org/apache/catalina/mbeans/mbeans-descriptors.xml | 2 +-
 java/org/apache/catalina/realm/DataSourceRealm.java| 2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  | 4 
 webapps/docs/config/realm.xml  | 3 +++
 webapps/docs/realm-howto.xml   | 3 +++
 6 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/catalina/mbeans/MBeanFactory.java 
b/java/org/apache/catalina/mbeans/MBeanFactory.java
index 050031b..bf2970e 100644
--- a/java/org/apache/catalina/mbeans/MBeanFactory.java
+++ b/java/org/apache/catalina/mbeans/MBeanFactory.java
@@ -38,7 +38,6 @@ import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.core.StandardService;
 import org.apache.catalina.loader.WebappLoader;
 import org.apache.catalina.realm.DataSourceRealm;
-import org.apache.catalina.realm.JDBCRealm;
 import org.apache.catalina.realm.JNDIRealm;
 import org.apache.catalina.realm.MemoryRealm;
 import org.apache.catalina.realm.UserDatabaseRealm;
@@ -334,13 +333,17 @@ public class MBeanFactory {
  * @return the object name of the created realm
  *
  * @exception Exception if an MBean cannot be created or registered
+ *
+ * @deprecated This method will be removed in Tomcat 10. Use a
+ * DataSourceRealm instead.
  */
+@Deprecated
 public String createJDBCRealm(String parent, String driverName,
 String connectionName, String connectionPassword, String connectionURL)
 throws Exception {
 
 // Create a new JDBCRealm instance
-JDBCRealm realm = new JDBCRealm();
+org.apache.catalina.realm.JDBCRealm realm = new 
org.apache.catalina.realm.JDBCRealm();
 realm.setDriverName(driverName);
 realm.setConnectionName(connectionName);
 realm.setConnectionPassword(connectionPassword);
diff --git a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml 
b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
index 8af469b..913830f 100644
--- a/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
+++ b/java/org/apache/catalina/mbeans/mbeans-descriptors.xml
@@ -106,7 +106,7 @@
 
 
 
   Realm that works with any JDBC JNDI DataSource.
-* See the JDBCRealm.howto for more details on how to set up the database and
+* See the Realm How-To for more details on how to set up the database and
 * for configuration options.
 *
 * @author Glenn L. Nielsen
diff --git a/java/org/apache/catalina/realm/JDBCRealm.java 
b/java/org/apache/catalina/realm/JDBCRealm.java
index 3d7507c..8b9c472 100644
--- a/java/org/apache/catalina/realm/JDBCRealm.java
+++ b/java/org/apache/catalina/realm/JDBCRealm.java
@@ -47,7 +47,11 @@ import org.apache.tomcat.util.ExceptionUtils;
 * @author Craig R. McClanahan
 * @author Carson McDonald
 * @author Ignacio Ortega
+*
+* @deprecated Will be removed in Tomcat 10 onwards. Use the DataSourceRealm
+* instead.
 */
+@Deprecated
 public class JDBCRealm
 extends RealmBase {
 
diff --git a/webapps/docs/config/realm.xml b/webapps/docs/config/realm.xml
index f18eacc..08e4480 100644
--- a/webapps/docs/config/realm.xml
+++ b/webapps/docs/config/realm.xml
@@ -1057,6 +1057,9 @@
 
   
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 The JDBC Database Realm connects Tomcat to
 a relational database, accessed through an appropriate JDBC driver,
 to perform lookups of usernames, passwords, and their associated
diff --git a/webapps/docs/realm-howto.xml b/webapps/docs/realm-howto.xml
index c70fc92..adad6aa 100644
--- a/webapps/docs/realm-howto.xml
+++ b/webapps/docs/realm-howto.xml
@@ -1115,6 +1115,9 @@ functionality to a UserDatabase Realm.
 
 Introduction
 
+The JDBC Database Realm has been deprecated and will be removed
+in Tomcat 10 onwards. Use the DataSourceRealm instead.
+
 JDBCRealm is an implementation of the Tomcat
 Realm interface that looks up users in a relational database
 accessed via a JDBC driver.  There is substantial configuration flexibility


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



[tomcat] branch master updated (f438fd5 -> c714bfd)

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

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


from f438fd5  Fix typos
 new 3b15ba9  Documentation improvements in preparation for deprecating 
JDBCRealm
 new 20181bb  Deprecate JDBCRealm
 new c714bfd  Remove deprecated JDBCRealm

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:
 build.xml  |   1 -
 java/org/apache/catalina/mbeans/MBeanFactory.java  |  29 -
 .../apache/catalina/mbeans/mbeans-descriptors.xml  |   9 -
 .../org/apache/catalina/realm/DataSourceRealm.java |   2 +-
 java/org/apache/catalina/realm/JDBCRealm.java  | 741 -
 .../apache/catalina/realm/LocalStrings.properties  |   7 -
 .../catalina/realm/LocalStrings_de.properties  |   3 -
 .../catalina/realm/LocalStrings_es.properties  |   7 -
 .../catalina/realm/LocalStrings_fr.properties  |   7 -
 .../catalina/realm/LocalStrings_ja.properties  |   7 -
 .../catalina/realm/LocalStrings_ko.properties  |   7 -
 .../catalina/realm/LocalStrings_zh_CN.properties   |   7 -
 .../apache/catalina/realm/mbeans-descriptors.xml   |  71 --
 res/findbugs/filter-false-positives.xml|  19 +-
 webapps/docs/appdev/deployment.xml |   2 +-
 webapps/docs/config/realm.xml  | 121 
 webapps/docs/host-manager-howto.xml|   7 +-
 webapps/docs/html-host-manager-howto.xml   |   7 +-
 webapps/docs/manager-howto.xml |   2 +-
 webapps/docs/realm-howto.xml   | 111 ---
 webapps/docs/security-howto.xml|   4 -
 21 files changed, 10 insertions(+), 1161 deletions(-)
 delete mode 100644 java/org/apache/catalina/realm/JDBCRealm.java


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

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

violetagg 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 49aa2b3  Fix typos
49aa2b3 is described below

commit 49aa2b33a2d02ce0fe7261e99d9d51d377da6e04
Author: Violeta Georgieva [VMware] 
AuthorDate: Tue Sep 15 17:57:00 2020 +0300

Fix typos
---
 webapps/docs/changelog.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 2a53152..9a6e52c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -83,7 +83,7 @@
 Update to Commons Daemon 1.2.3. This adds support to jsvc for
 --enable-preview and native memory tracking (Procrun
 already supported these features), adds some addition debug logging and
-adds a new feature to Procrun that outputs the commnd to (re-)configure
+adds a new feature to Procrun that outputs the command to 
(re-)configure
 the service with the current settings. (markt)
   
 
@@ -103,7 +103,7 @@
 opportunity to rewrite the request. (remm/markt)
   
   
-Change top package name for generated emebedded classes to avoid
+Change top package name for generated embedded classes to avoid
 conflict with default host name on case insensitive filesystems.
 (remm)
   
@@ -134,7 +134,7 @@
 Based on a patch provided by Milo van der Zee. (markt)
   
   
-Correct the path vaidation to allow the use of the file system root for
+Correct the path validation to allow the use of the file system root 
for
 the docBase attribute of a Context. Note that
 such a configuration should be used with caution. (markt)
   
@@ -159,7 +159,7 @@
   
 64713: The JASPIC authenticator now checks the value of
 jakarta.servlet.http.registerSession set by the
-ServerAuthModule when decideing whether or nor to register
+ServerAuthModule when deciding whether or nor to register
 the session. Based on a patch by Robert Rodewald. (markt)
   
 
@@ -271,7 +271,7 @@
 (schultz)
   
   
-Remove the out of date functional specification secton from the
+Remove the out of date functional specification section from the
 documentation web application. (markt)
   
   


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



[tomcat] branch master updated: Fix typos

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

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


The following commit(s) were added to refs/heads/master by this push:
 new f438fd5  Fix typos
f438fd5 is described below

commit f438fd56311f85e321884ea236cf6f90a04455a2
Author: Violeta Georgieva [VMware] 
AuthorDate: Tue Sep 15 17:57:00 2020 +0300

Fix typos
---
 webapps/docs/changelog.xml | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f61cb8a..9936d7c 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -83,7 +83,7 @@
 Update to Commons Daemon 1.2.3. This adds support to jsvc for
 --enable-preview and native memory tracking (Procrun
 already supported these features), adds some addition debug logging and
-adds a new feature to Procrun that outputs the commnd to (re-)configure
+adds a new feature to Procrun that outputs the command to 
(re-)configure
 the service with the current settings. (markt)
   
 
@@ -103,7 +103,7 @@
 opportunity to rewrite the request. (remm/markt)
   
   
-Change top package name for generated emebedded classes to avoid
+Change top package name for generated embedded classes to avoid
 conflict with default host name on case insensitive filesystems.
 (remm)
   
@@ -134,7 +134,7 @@
 Based on a patch provided by Milo van der Zee. (markt)
   
   
-Correct the path vaidation to allow the use of the file system root for
+Correct the path validation to allow the use of the file system root 
for
 the docBase attribute of a Context. Note that
 such a configuration should be used with caution. (markt)
   
@@ -159,7 +159,7 @@
   
 64713: The JASPIC authenticator now checks the value of
 jakarta.servlet.http.registerSession set by the
-ServerAuthModule when decideing whether or nor to register
+ServerAuthModule when deciding whether or nor to register
 the session. Based on a patch by Robert Rodewald. (markt)
   
 
@@ -275,7 +275,7 @@
 (schultz)
   
   
-Remove the out of date functional specification secton from the
+Remove the out of date functional specification section from the
 documentation web application. (markt)
   
   


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



Release Announcement: General Availability of Java 15 / JDK 15

2020-09-15 Thread Rory O'Donnell

Hi Mark,

**Release Announcement: General Availability of Java 15 / JDK 15 [1]
**

 * JDK 15, the reference implementation of Java 15, is now Generally
   Available.
 * GPL-licensed OpenJDK builds from Oracle are available here:
   http://jdk.java.net/15/
 * JDK 15 Release notes
   

JDK 15 includes fourteen features [2]:

 * JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)
   
 * JEP 360: Sealed Classes (Preview) 
 * JEP 371: Hidden Classes 
 * JEP 372: Remove the Nashorn JavaScript Engine
   
 * JEP 373: Reimplement the Legacy DatagramSocket API
   
 * JEP 374: Disable and Deprecate Biased Locking
   
 * JEP 375: Pattern Matching for instanceof (Second Preview)
   
 * JEP 377: ZGC: A Scalable Low-Latency Garbage Collector
   
 * JEP 378: Text Blocks 
 * JEP 379: Shenandoah: A Low-Pause-Time Garbage Collector
   
 * JEP 381: Remove the Solaris and SPARC Ports
   
 * JEP 383: Foreign-Memory Access API (Second Incubator)
   
 * JEP 384: Records (Second Preview) 
 * JEP 385: Deprecate RMI Activation for Removal
   

Thanks to everyone who contributed to JDK 15, whether by creating 
features or enhancements, logging  bugs, or downloading and testing the 
early-access builds.


OpenJDK 16 Early Access build 15**is now available at http://jdk.java.net/16

 * JEPs integrated to JDK 16:
 o JEP 347: Enable C++14 Language Features
   
 o JEP 357: Migrate from Mercurial to Git
   
 o JEP 369: Migrate to GitHub 

 * Release Notes are available at http://jdk.java.net/16/release-notes

**

 * Significant changes since the last availability email:
 o Build 15
 + JDK-8244090: public lookup should find public members of
   public exported types (Reported by Eclipse Jetty)
 + JDK-8250968: Symlinks attributes not preserved when using
   jarsigner on zip files
 o Build 14
 + JDK-8189744: Deprecate the JDK-specific API for setting
   socket options, jdk.net.Sockets
 + JDK-8241003: Deprecate "denigrated" java.security.cert APIs
   that represent DNs as Principal or String objects
 + JDK-8245462: The default HttpClient implementation returns
   cancelable futures


*__*
Rgds,Rory


[1] 
https://mail.openjdk.java.net/pipermail/jdk-dev/2020-September/004733.html

[2] https://openjdk.java.net/projects/jdk/15/
--

Rgds, Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin, Ireland



[tomcat] branch 7.0.x updated: Align closer to 8.5.x. Trivial commit to trigger CI.

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

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new de4e6c4  Align closer to 8.5.x. Trivial commit to trigger CI.
de4e6c4 is described below

commit de4e6c48f3008a262be6e0e61e09b5ee570deda8
Author: Mark Thomas 
AuthorDate: Tue Sep 15 15:49:08 2020 +0100

Align closer to 8.5.x. Trivial commit to trigger CI.
---
 java/org/apache/catalina/connector/CoyotePrincipal.java | 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/java/org/apache/catalina/connector/CoyotePrincipal.java 
b/java/org/apache/catalina/connector/CoyotePrincipal.java
index aa0ccbc..ec67952 100644
--- a/java/org/apache/catalina/connector/CoyotePrincipal.java
+++ b/java/org/apache/catalina/connector/CoyotePrincipal.java
@@ -49,7 +49,7 @@ public class CoyotePrincipal implements Principal, 
Serializable {
 
 @Override
 public String getName() {
-return (this.name);
+return this.name;
 }
 
 
@@ -62,12 +62,7 @@ public class CoyotePrincipal implements Principal, 
Serializable {
  */
 @Override
 public String toString() {
-
-StringBuilder sb = new StringBuilder("CoyotePrincipal[");
-sb.append(this.name);
-sb.append("]");
-return (sb.toString());
-
+return "CoyotePrincipal[" + this.name + "]";
 }
 
 


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



[tomcat-native] branch master updated: Enable building to continue against 1.1.1 and 3.x

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

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


The following commit(s) were added to refs/heads/master by this push:
 new 3ee4a3f  Enable building to continue against 1.1.1 and 3.x
3ee4a3f is described below

commit 3ee4a3fe34c9d5ceb0b1acf18c5b7963604868bd
Author: Mark Thomas 
AuthorDate: Tue Sep 15 15:38:50 2020 +0100

Enable building to continue against 1.1.1 and 3.x
---
 native/src/sslutils.c | 5 -
 xdocs/miscellaneous/changelog.xml | 5 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/native/src/sslutils.c b/native/src/sslutils.c
index 0896429..b31a1b8 100644
--- a/native/src/sslutils.c
+++ b/native/src/sslutils.c
@@ -992,8 +992,11 @@ static OCSP_RESPONSE *get_ocsp_response(apr_pool_t *p, 
X509 *cert, X509 *issuer,
 int ok = 0;
 apr_socket_t *apr_sock = NULL;
 apr_pool_t *mp;
-
+#if OPENSSL_VERSION_NUMBER < 0x3000L
 if (OCSP_parse_url(url,, _port, , _ssl) == 0 )
+#else
+if (OCSP_parse_url(url,, _port, NULL, , _ssl) == 0 )
+#endif
 goto end;
 
 if (sscanf(c_port, "%d", ) != 1)
diff --git a/xdocs/miscellaneous/changelog.xml 
b/xdocs/miscellaneous/changelog.xml
index af7fa20..f607e81 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -35,6 +35,11 @@
   
 
 
+  
+
+  Enable building to continue against OpenSSL 3.x and 1.1.1. (markt)
+
+  
 
 
   


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



[GitHub] [tomcat] jbampton opened a new pull request #364: Fix case of HTML and SHTML

2020-09-15 Thread GitBox


jbampton opened a new pull request #364:
URL: https://github.com/apache/tomcat/pull/364


   



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

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



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



[tomcat] branch 8.5.x updated: Fix race condition when saving and recycling session in PersistentValve.

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d14d690  Fix race condition when saving and recycling session in 
PersistentValve.
d14d690 is described below

commit d14d690144aa8250a36ab6aed37f50fdb1b4bddf
Author: KeiichiFujino 
AuthorDate: Tue Sep 15 22:42:27 2020 +0900

Fix race condition when saving and recycling session in PersistentValve.
---
 .../apache/catalina/valves/PersistentValve.java| 29 +++---
 webapps/docs/changelog.xml |  8 ++
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index 7734e26..df94820 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,21 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-if (store != null && session != null && 
session.isValid() &&
-!isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger().debug("newsessionId 
store: " +
-store + " session: " + session +
-" valid: " +
-(session == null ? "N/A" : 
Boolean.toString(
-session.isValid())) +
-" stale: " + isSessionStale(session,
-System.currentTimeMillis()));
-}
+synchronized (session) {
+if (store != null && session != null && 
session.isValid()
+&& !isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) manager).removeSuper(session);
+session.recycle();
+} else {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
++ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
 
+}
 }
 } else {
 if (container.getLogger().isDebugEnabled()) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f378ad6..328941f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Fix race condition when saving and recycling session in
+PersistentValve. (kfujino)
+  
+
+  
   
 
   


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



[tomcat] branch 8.5.x updated: Fix race condition when saving and recycling session in PersistentValve.

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d14d690  Fix race condition when saving and recycling session in 
PersistentValve.
d14d690 is described below

commit d14d690144aa8250a36ab6aed37f50fdb1b4bddf
Author: KeiichiFujino 
AuthorDate: Tue Sep 15 22:42:27 2020 +0900

Fix race condition when saving and recycling session in PersistentValve.
---
 .../apache/catalina/valves/PersistentValve.java| 29 +++---
 webapps/docs/changelog.xml |  8 ++
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index 7734e26..df94820 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,21 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-if (store != null && session != null && 
session.isValid() &&
-!isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger().debug("newsessionId 
store: " +
-store + " session: " + session +
-" valid: " +
-(session == null ? "N/A" : 
Boolean.toString(
-session.isValid())) +
-" stale: " + isSessionStale(session,
-System.currentTimeMillis()));
-}
+synchronized (session) {
+if (store != null && session != null && 
session.isValid()
+&& !isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) manager).removeSuper(session);
+session.recycle();
+} else {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
++ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
 
+}
 }
 } else {
 if (container.getLogger().isDebugEnabled()) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f378ad6..328941f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Fix race condition when saving and recycling session in
+PersistentValve. (kfujino)
+  
+
+  
   
 
   


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



[tomcat] branch 8.5.x updated: Fix race condition when saving and recycling session in PersistentValve.

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d14d690  Fix race condition when saving and recycling session in 
PersistentValve.
d14d690 is described below

commit d14d690144aa8250a36ab6aed37f50fdb1b4bddf
Author: KeiichiFujino 
AuthorDate: Tue Sep 15 22:42:27 2020 +0900

Fix race condition when saving and recycling session in PersistentValve.
---
 .../apache/catalina/valves/PersistentValve.java| 29 +++---
 webapps/docs/changelog.xml |  8 ++
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index 7734e26..df94820 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,21 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-if (store != null && session != null && 
session.isValid() &&
-!isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger().debug("newsessionId 
store: " +
-store + " session: " + session +
-" valid: " +
-(session == null ? "N/A" : 
Boolean.toString(
-session.isValid())) +
-" stale: " + isSessionStale(session,
-System.currentTimeMillis()));
-}
+synchronized (session) {
+if (store != null && session != null && 
session.isValid()
+&& !isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) manager).removeSuper(session);
+session.recycle();
+} else {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
++ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
 
+}
 }
 } else {
 if (container.getLogger().isDebugEnabled()) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f378ad6..328941f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Fix race condition when saving and recycling session in
+PersistentValve. (kfujino)
+  
+
+  
   
 
   


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



[tomcat] branch 8.5.x updated: Fix race condition when saving and recycling session in PersistentValve.

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d14d690  Fix race condition when saving and recycling session in 
PersistentValve.
d14d690 is described below

commit d14d690144aa8250a36ab6aed37f50fdb1b4bddf
Author: KeiichiFujino 
AuthorDate: Tue Sep 15 22:42:27 2020 +0900

Fix race condition when saving and recycling session in PersistentValve.
---
 .../apache/catalina/valves/PersistentValve.java| 29 +++---
 webapps/docs/changelog.xml |  8 ++
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index 7734e26..df94820 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,21 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-if (store != null && session != null && 
session.isValid() &&
-!isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger().debug("newsessionId 
store: " +
-store + " session: " + session +
-" valid: " +
-(session == null ? "N/A" : 
Boolean.toString(
-session.isValid())) +
-" stale: " + isSessionStale(session,
-System.currentTimeMillis()));
-}
+synchronized (session) {
+if (store != null && session != null && 
session.isValid()
+&& !isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) manager).removeSuper(session);
+session.recycle();
+} else {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
++ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
 
+}
 }
 } else {
 if (container.getLogger().isDebugEnabled()) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f378ad6..328941f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Fix race condition when saving and recycling session in
+PersistentValve. (kfujino)
+  
+
+  
   
 
   


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



[tomcat] branch 8.5.x updated: Fix race condition when saving and recycling session in PersistentValve.

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new d14d690  Fix race condition when saving and recycling session in 
PersistentValve.
d14d690 is described below

commit d14d690144aa8250a36ab6aed37f50fdb1b4bddf
Author: KeiichiFujino 
AuthorDate: Tue Sep 15 22:42:27 2020 +0900

Fix race condition when saving and recycling session in PersistentValve.
---
 .../apache/catalina/valves/PersistentValve.java| 29 +++---
 webapps/docs/changelog.xml |  8 ++
 2 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index 7734e26..df94820 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,21 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-if (store != null && session != null && 
session.isValid() &&
-!isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger().debug("newsessionId 
store: " +
-store + " session: " + session +
-" valid: " +
-(session == null ? "N/A" : 
Boolean.toString(
-session.isValid())) +
-" stale: " + isSessionStale(session,
-System.currentTimeMillis()));
-}
+synchronized (session) {
+if (store != null && session != null && 
session.isValid()
+&& !isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) manager).removeSuper(session);
+session.recycle();
+} else {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
++ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
 
+}
 }
 } else {
 if (container.getLogger().isDebugEnabled()) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f378ad6..328941f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Fix race condition when saving and recycling session in
+PersistentValve. (kfujino)
+  
+
+  
   
 
   


-
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 race condition when saving and recycling session in PersistentValve.

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

kfujino 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 33ec983  Fix race condition when saving and recycling session in 
PersistentValve.
33ec983 is described below

commit 33ec983d8204d1c08610b83182d4412791970202
Author: KeiichiFujino 
AuthorDate: Tue Sep 15 22:35:58 2020 +0900

Fix race condition when saving and recycling session in PersistentValve.
---
 .../apache/catalina/valves/PersistentValve.java| 29 +++---
 webapps/docs/changelog.xml |  4 +++
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/java/org/apache/catalina/valves/PersistentValve.java 
b/java/org/apache/catalina/valves/PersistentValve.java
index 7734e26..df94820 100644
--- a/java/org/apache/catalina/valves/PersistentValve.java
+++ b/java/org/apache/catalina/valves/PersistentValve.java
@@ -170,22 +170,21 @@ public class PersistentValve extends ValveBase {
 if (manager instanceof StoreManager) {
 Session session = manager.findSession(newsessionId);
 Store store = ((StoreManager) manager).getStore();
-if (store != null && session != null && 
session.isValid() &&
-!isSessionStale(session, 
System.currentTimeMillis())) {
-store.save(session);
-((StoreManager) manager).removeSuper(session);
-session.recycle();
-} else {
-if (container.getLogger().isDebugEnabled()) {
-container.getLogger().debug("newsessionId 
store: " +
-store + " session: " + session +
-" valid: " +
-(session == null ? "N/A" : 
Boolean.toString(
-session.isValid())) +
-" stale: " + isSessionStale(session,
-System.currentTimeMillis()));
-}
+synchronized (session) {
+if (store != null && session != null && 
session.isValid()
+&& !isSessionStale(session, 
System.currentTimeMillis())) {
+store.save(session);
+((StoreManager) manager).removeSuper(session);
+session.recycle();
+} else {
+if (container.getLogger().isDebugEnabled()) {
+container.getLogger()
+.debug("newsessionId store: " + 
store + " session: " + session + " valid: "
++ (session == null ? "N/A" 
: Boolean.toString(session.isValid()))
++ " stale: " + 
isSessionStale(session, System.currentTimeMillis()));
+}
 
+}
 }
 } else {
 if (container.getLogger().isDebugEnabled()) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 2493e7b..2a53152 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -51,6 +51,10 @@
 The health check valve will now check the state of its associated
 containers to report availability. (remm)
   
+  
+Fix race condition when saving and recycling session in
+PersistentValve. (kfujino)
+  
 
   
   


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



Re: Deprecated JDBCRealm

2020-09-15 Thread Rémy Maucherat
On Tue, Sep 15, 2020 at 3:26 PM Mark Thomas  wrote:

> On 15/09/2020 14:12, Konstantin Kolinko wrote:
> > пн, 14 сент. 2020 г. в 21:53, Mark Thomas :
> >>
> >> All,
> >>
> >> I'd like to proposed the following:
> >> - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x
> >> - Remove the JDBCRealm in 10.0.x
> >>
> >> The reasons for this are:
> >> - The JDBCRealm is single threaded
> >> - The DataSourceRealm is a better solution
> >>
> >> Thoughts?
> >
> > +1
> >
> > Looking at documentation [1], it may be improved:
> >
> > a) Change ordering. It would be better to list DataSourceRealm first,
> > followed by JDBCRealm.. (Currently JDBCRealm is the first one).
>
> I'll fix that.
>
> > b) Explicitly mention that JDBCRealm uses a single connection in its
> > own documentation. (Currently documentation for DataSourceRealm
> > mentions it, but the one for JDBCRealm itself does not).
>
> And that.
>
> > BTW, JNDIRealm also does not mention that it uses a single connection.
>
> Only by default and we could/should change that. How about changing the
> default to, say, 10?
>

I didn't get any feedback, so it's only in Tomcat 10. It seems risky to
backport if it hasn't been really tested.

Rémy


>
> Mark
>
>
> >
> > [1] https://tomcat.apache.org/tomcat-9.0-doc/config/realm.html
> >
> > Best regards,
> > Konstantin Kolinko
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: dev-h...@tomcat.apache.org
> >
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>
>


Re: Deprecated JDBCRealm

2020-09-15 Thread Mark Thomas
On 15/09/2020 14:12, Konstantin Kolinko wrote:
> пн, 14 сент. 2020 г. в 21:53, Mark Thomas :
>>
>> All,
>>
>> I'd like to proposed the following:
>> - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x
>> - Remove the JDBCRealm in 10.0.x
>>
>> The reasons for this are:
>> - The JDBCRealm is single threaded
>> - The DataSourceRealm is a better solution
>>
>> Thoughts?
> 
> +1
> 
> Looking at documentation [1], it may be improved:
> 
> a) Change ordering. It would be better to list DataSourceRealm first,
> followed by JDBCRealm.. (Currently JDBCRealm is the first one).

I'll fix that.

> b) Explicitly mention that JDBCRealm uses a single connection in its
> own documentation. (Currently documentation for DataSourceRealm
> mentions it, but the one for JDBCRealm itself does not).

And that.

> BTW, JNDIRealm also does not mention that it uses a single connection.

Only by default and we could/should change that. How about changing the
default to, say, 10?

Mark


> 
> [1] https://tomcat.apache.org/tomcat-9.0-doc/config/realm.html
> 
> Best regards,
> Konstantin Kolinko
> 
> -
> 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



[GitHub] [tomcat] martin-g commented on pull request #361: Add a GitHub action to lint the Markdown and YAML files.

2020-09-15 Thread GitBox


martin-g commented on pull request #361:
URL: https://github.com/apache/tomcat/pull/361#issuecomment-692710101


   Thanks! Looks better now!
   Let's see what others think about this linters.



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

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



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



[tomcat] branch master updated (d381d87 -> 3f3fee0)

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

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


from d381d87  Add SameSite=strict to Manager and Host Manager cookies
 add 3f3fee0  Fix race condition when saving and recycling session in 
PersistentValve.

No new revisions were added by this update.

Summary of changes:
 .../apache/catalina/valves/PersistentValve.java| 28 ++
 webapps/docs/changelog.xml |  4 
 2 files changed, 17 insertions(+), 15 deletions(-)


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



[tomcat] branch master updated (d381d87 -> 3f3fee0)

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

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


from d381d87  Add SameSite=strict to Manager and Host Manager cookies
 add 3f3fee0  Fix race condition when saving and recycling session in 
PersistentValve.

No new revisions were added by this update.

Summary of changes:
 .../apache/catalina/valves/PersistentValve.java| 28 ++
 webapps/docs/changelog.xml |  4 
 2 files changed, 17 insertions(+), 15 deletions(-)


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



[tomcat] branch master updated (d381d87 -> 3f3fee0)

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

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


from d381d87  Add SameSite=strict to Manager and Host Manager cookies
 add 3f3fee0  Fix race condition when saving and recycling session in 
PersistentValve.

No new revisions were added by this update.

Summary of changes:
 .../apache/catalina/valves/PersistentValve.java| 28 ++
 webapps/docs/changelog.xml |  4 
 2 files changed, 17 insertions(+), 15 deletions(-)


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



[tomcat] branch master updated (d381d87 -> 3f3fee0)

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

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


from d381d87  Add SameSite=strict to Manager and Host Manager cookies
 add 3f3fee0  Fix race condition when saving and recycling session in 
PersistentValve.

No new revisions were added by this update.

Summary of changes:
 .../apache/catalina/valves/PersistentValve.java| 28 ++
 webapps/docs/changelog.xml |  4 
 2 files changed, 17 insertions(+), 15 deletions(-)


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



[tomcat] branch master updated (d381d87 -> 3f3fee0)

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

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


from d381d87  Add SameSite=strict to Manager and Host Manager cookies
 add 3f3fee0  Fix race condition when saving and recycling session in 
PersistentValve.

No new revisions were added by this update.

Summary of changes:
 .../apache/catalina/valves/PersistentValve.java| 28 ++
 webapps/docs/changelog.xml |  4 
 2 files changed, 17 insertions(+), 15 deletions(-)


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



Re: Deprecated JDBCRealm

2020-09-15 Thread Konstantin Kolinko
пн, 14 сент. 2020 г. в 21:53, Mark Thomas :
>
> All,
>
> I'd like to proposed the following:
> - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x
> - Remove the JDBCRealm in 10.0.x
>
> The reasons for this are:
> - The JDBCRealm is single threaded
> - The DataSourceRealm is a better solution
>
> Thoughts?

+1

Looking at documentation [1], it may be improved:

a) Change ordering. It would be better to list DataSourceRealm first,
followed by JDBCRealm.. (Currently JDBCRealm is the first one).

b) Explicitly mention that JDBCRealm uses a single connection in its
own documentation. (Currently documentation for DataSourceRealm
mentions it, but the one for JDBCRealm itself does not).

BTW, JNDIRealm also does not mention that it uses a single connection.

[1] https://tomcat.apache.org/tomcat-9.0-doc/config/realm.html

Best regards,
Konstantin Kolinko

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



[GitHub] [tomcat] jbampton commented on pull request #361: Add a GitHub action to lint the Markdown and YAML files.

2020-09-15 Thread GitBox


jbampton commented on pull request #361:
URL: https://github.com/apache/tomcat/pull/361#issuecomment-692703262


   Hey @martin-g I have moved both config files to the `.github` folder. 
   
   If we put them in the `.github/workflows/` folder, GitHub will think they 
are both workflows.



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

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



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



Tag Tomcat 7

2020-09-15 Thread Violeta Georgieva
Hi,

Tomorrow I'm going to prepare Tomcat 7 for a release/vote.
Please reply here if you need more time for additional fixes.

Thanks,
Violeta


[tomcat] branch 7.0.x updated: Update Tomcat Native to 1.2.25

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

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


The following commit(s) were added to refs/heads/7.0.x by this push:
 new 3875dc9  Update Tomcat Native to 1.2.25
3875dc9 is described below

commit 3875dc99227adaf47bc66e2d36cadd9b88d430ab
Author: Mark Thomas 
AuthorDate: Mon Sep 7 12:20:44 2020 +0100

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

diff --git a/build.properties.default b/build.properties.default
index b549abe..650734b 100644
--- a/build.properties.default
+++ b/build.properties.default
@@ -181,13 +181,13 @@ 
jdt.loc.1=http://archive.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj
 
jdt.loc.2=http://download.eclipse.org/eclipse/downloads/drops4/${jdt.release}/ecj-${jdt.version}.jar
 
 # - Tomcat native library -
-tomcat-native.version=1.2.24
+tomcat-native.version=1.2.25
 tomcat-native.src.checksum.enabled=true
 tomcat-native.src.checksum.algorithm=SHA-512
-tomcat-native.src.checksum.value=5dae151a60f8bd5a9a29d63eca838c77174426025ee65a826f0698943494dd3656d50bcd417e220a926b9ce111ea167043d4b806264030e951873d06767b3d6f
+tomcat-native.src.checksum.value=e121c0a18c51b5f952833df44c3a0add1f9a6e1b61e300abbafa0bc7e8f32296e64c9f81e9ad7389c1bd24abc40739e4726a56158d08e33b7ef00e5fa8a1d33d
 tomcat-native.win.checksum.enabled=true
 tomcat-native.win.checksum.algorithm=SHA-512
-tomcat-native.win.checksum.value=c2d581f1f602dce61abc36370ce485c805b90863301555fc3d44362b655f34f950d0096fad22895374086f33d4505792c27f83fe35d4aeb87a08215bea8ae74a
+tomcat-native.win.checksum.value=0171a7ff3db708c2051e1f7a188286c5174091e208e1822c3027dd7aa415562c94be8d397a61bbe57bf9ee40ab52e1b346123fb7f2b170a43c60e8596eb65618
 tomcat-native.home=${base.path}/tomcat-native-${tomcat-native.version}
 tomcat-native.tar.gz=${tomcat-native.home}/tomcat-native.tar.gz
 
tomcat-native.loc.1=${base-tomcat.loc.1}/tomcat-connectors/native/${tomcat-native.version}/source/tomcat-native-${tomcat-native.version}-src.tar.gz
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 15add9d..6c4b8c9 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -153,6 +153,10 @@
 adds a new feature to Procrun that outputs the commnd to (re-)configure
 the service with the current settings. (markt)
   
+  
+Update the packaged version of the Tomcat Native Library to 1.2.25.
+(markt)
+  
 
   
 


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



Re: Deprecated JDBCRealm

2020-09-15 Thread Keiichi Fujino
2020年9月15日(火) 3:53 Mark Thomas :

> All,
>
> I'd like to proposed the following:
> - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x
> - Remove the JDBCRealm in 10.0.x
>
> The reasons for this are:
> - The JDBCRealm is single threaded
> - The DataSourceRealm is a better solution
>
> Thoughts?
>
>
+1


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

-- 
Keiichi.Fujino


Re: [tomcat] branch master updated: Replace "".equals(a) with a.isEmpty()

2020-09-15 Thread Martin Grigorov
On Tue, Sep 15, 2020 at 1:52 PM Mark Thomas  wrote:

> On 15/09/2020 10:21, mgrigo...@apache.org wrote:
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > mgrigorov pushed a commit to branch master
> > in repository https://gitbox.apache.org/repos/asf/tomcat.git
> >
> >
> > The following commit(s) were added to refs/heads/master by this push:
> >  new f550254  Replace "".equals(a) with a.isEmpty()
> >  new 6053839  Merge pull request #356 from
> martin-g/improvement/use-string-isempty
> > f550254 is described below
> >
> > commit f550254bb15e1b0cc50225aee1c3fb1ed034f552
> > Author: Martin Tzvetanov Grigorov 
> > AuthorDate: Thu Sep 10 12:52:11 2020 +0300
> >
> > Replace "".equals(a) with a.isEmpty()
>
> How sure are you that none of these will introduce the possibility of a
> NullPointerException?
>

Most of them have explicit checks for null/non-null.
For the others I have checked whether null is possible. If it was possible
then it'd have failed a few lines later even with the old code.
But yes, it is still possible that a regression is introduced somewhere.
That's the reason why I suggested this PR in the beginning of the new
release cycle - now we have 1 month to fix such regressions. And still, the
unit tests and our test apps do not cover all possible cases ...
If you have concerns about some part of the change let me know and I will
either improve it or revert the change!

Martin


>
> Mark
>
> >
> >
> https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416
> > Proposal for JDK: https://github.com/openjdk/jdk/pull/29
> > ---
> >  .../apache/catalina/ant/jmx/JMXAccessorCondition.java  |  2 +-
> >  .../apache/catalina/ant/jmx/JMXAccessorCreateTask.java |  2 +-
> >  java/org/apache/catalina/ant/jmx/JMXAccessorTask.java  |  2 +-
> >  java/org/apache/catalina/core/ApplicationContext.java  |  2 +-
> >  java/org/apache/catalina/core/StandardContext.java |  2 +-
> >  java/org/apache/catalina/core/StandardEngine.java  |  2 +-
> >  java/org/apache/catalina/filters/WebdavFixFilter.java  |  2 +-
> >  java/org/apache/catalina/ha/backend/TcpSender.java |  2 +-
> >  .../catalina/ha/session/JvmRouteBinderValve.java   |  2 +-
> >  .../apache/catalina/manager/HTMLManagerServlet.java|  9 +
> >  java/org/apache/catalina/manager/ManagerServlet.java   |  2 +-
> >  .../catalina/manager/host/HostManagerServlet.java  |  2 +-
> >  java/org/apache/catalina/realm/RealmBase.java  |  2 +-
> >  java/org/apache/catalina/servlets/CGIServlet.java  |  8 
> >  java/org/apache/catalina/session/JDBCStore.java|  2 +-
> >  .../org/apache/catalina/storeconfig/StoreRegistry.java |  2 +-
> >  java/org/apache/catalina/util/ContextName.java | 18
> +-
> >  java/org/apache/el/MethodExpressionImpl.java   |  2 +-
> >  java/org/apache/el/MethodExpressionLiteral.java|  2 +-
> >  java/org/apache/el/ValueExpressionImpl.java|  2 +-
> >  java/org/apache/el/ValueExpressionLiteral.java |  2 +-
> >  java/org/apache/el/lang/ELSupport.java |  7 ---
> >  java/org/apache/el/lang/FunctionMapperImpl.java|  2 +-
> >  java/org/apache/el/util/ReflectionUtil.java|  2 +-
> >  java/org/apache/jasper/JspC.java   |  2 +-
> >  java/org/apache/jasper/compiler/Generator.java |  2 +-
> >  java/org/apache/jasper/compiler/Validator.java |  2 +-
> >  .../apache/tomcat/util/digester/SetPropertiesRule.java |  2 +-
> >  java/org/apache/tomcat/util/net/SSLUtilBase.java   |  2 +-
> >  .../apache/tomcat/websocket/WsWebSocketContainer.java  |  3 ++-
> >  30 files changed, 49 insertions(+), 46 deletions(-)
> >
> > diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
> b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
> > index b009684..4ac07c3 100644
> > --- a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
> > +++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
> > @@ -149,7 +149,7 @@ public class JMXAccessorCondition extends
> JMXAccessorConditionBase {
> >   * @return true if there is no if condition, or the named property
> exists
> >   */
> >  protected boolean testIfCondition() {
> > -if (ifCondition == null || "".equals(ifCondition)) {
> > +if (ifCondition == null || ifCondition.isEmpty()) {
> >  return true;
> >  }
> >  return getProject().getProperty(ifCondition) != null;
> > diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
> b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
> > index 28aab6c..558a258 100644
> > --- a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
> > +++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
> > @@ -154,7 +154,7 @@ public class JMXAccessorCreateTask extends
> JMXAccessorTask {
> > }
> > 

Re: [tomcat] branch master updated: Replace "".equals(a) with a.isEmpty()

2020-09-15 Thread Mark Thomas
On 15/09/2020 10:21, mgrigo...@apache.org wrote:
> This is an automated email from the ASF dual-hosted git repository.
> 
> mgrigorov pushed a commit to branch master
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
> 
> 
> The following commit(s) were added to refs/heads/master by this push:
>  new f550254  Replace "".equals(a) with a.isEmpty()
>  new 6053839  Merge pull request #356 from 
> martin-g/improvement/use-string-isempty
> f550254 is described below
> 
> commit f550254bb15e1b0cc50225aee1c3fb1ed034f552
> Author: Martin Tzvetanov Grigorov 
> AuthorDate: Thu Sep 10 12:52:11 2020 +0300
> 
> Replace "".equals(a) with a.isEmpty()

How sure are you that none of these will introduce the possibility of a
NullPointerException?

Mark

> 
> 
> https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416
> Proposal for JDK: https://github.com/openjdk/jdk/pull/29
> ---
>  .../apache/catalina/ant/jmx/JMXAccessorCondition.java  |  2 +-
>  .../apache/catalina/ant/jmx/JMXAccessorCreateTask.java |  2 +-
>  java/org/apache/catalina/ant/jmx/JMXAccessorTask.java  |  2 +-
>  java/org/apache/catalina/core/ApplicationContext.java  |  2 +-
>  java/org/apache/catalina/core/StandardContext.java |  2 +-
>  java/org/apache/catalina/core/StandardEngine.java  |  2 +-
>  java/org/apache/catalina/filters/WebdavFixFilter.java  |  2 +-
>  java/org/apache/catalina/ha/backend/TcpSender.java |  2 +-
>  .../catalina/ha/session/JvmRouteBinderValve.java   |  2 +-
>  .../apache/catalina/manager/HTMLManagerServlet.java|  9 +
>  java/org/apache/catalina/manager/ManagerServlet.java   |  2 +-
>  .../catalina/manager/host/HostManagerServlet.java  |  2 +-
>  java/org/apache/catalina/realm/RealmBase.java  |  2 +-
>  java/org/apache/catalina/servlets/CGIServlet.java  |  8 
>  java/org/apache/catalina/session/JDBCStore.java|  2 +-
>  .../org/apache/catalina/storeconfig/StoreRegistry.java |  2 +-
>  java/org/apache/catalina/util/ContextName.java | 18 
> +-
>  java/org/apache/el/MethodExpressionImpl.java   |  2 +-
>  java/org/apache/el/MethodExpressionLiteral.java|  2 +-
>  java/org/apache/el/ValueExpressionImpl.java|  2 +-
>  java/org/apache/el/ValueExpressionLiteral.java |  2 +-
>  java/org/apache/el/lang/ELSupport.java |  7 ---
>  java/org/apache/el/lang/FunctionMapperImpl.java|  2 +-
>  java/org/apache/el/util/ReflectionUtil.java|  2 +-
>  java/org/apache/jasper/JspC.java   |  2 +-
>  java/org/apache/jasper/compiler/Generator.java |  2 +-
>  java/org/apache/jasper/compiler/Validator.java |  2 +-
>  .../apache/tomcat/util/digester/SetPropertiesRule.java |  2 +-
>  java/org/apache/tomcat/util/net/SSLUtilBase.java   |  2 +-
>  .../apache/tomcat/websocket/WsWebSocketContainer.java  |  3 ++-
>  30 files changed, 49 insertions(+), 46 deletions(-)
> 
> diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java 
> b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
> index b009684..4ac07c3 100644
> --- a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
> +++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
> @@ -149,7 +149,7 @@ public class JMXAccessorCondition extends 
> JMXAccessorConditionBase {
>   * @return true if there is no if condition, or the named property exists
>   */
>  protected boolean testIfCondition() {
> -if (ifCondition == null || "".equals(ifCondition)) {
> +if (ifCondition == null || ifCondition.isEmpty()) {
>  return true;
>  }
>  return getProject().getProperty(ifCondition) != null;
> diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java 
> b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
> index 28aab6c..558a258 100644
> --- a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
> +++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
> @@ -154,7 +154,7 @@ public class JMXAccessorCreateTask extends 
> JMXAccessorTask {
> }
> }
>  }
> -if (classLoader != null && !"".equals(classLoader)) {
> +if (classLoader != null && !classLoader.isEmpty()) {
>  if (isEcho()) {
>  handleOutput("create MBean " + name + " from class "
>  + className + " with classLoader " + classLoader);
> diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java 
> b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
> index 8d5d268..d79e471 100644
> --- a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
> +++ b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
> @@ -254,7 +254,7 @@ public class JMXAccessorTask extends 
> BaseRedirectorHelperTask {
>   * @return Returns the useRef.
>   */
>  public boolean isUseRef() {

[tomcat] 02/02: Add SameSite=strict to Manager and Host Manager cookies

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

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

commit 918e09ec6fa1b08b42638583a4da531b123d84d0
Author: Mark Thomas 
AuthorDate: Tue Sep 15 11:40:40 2020 +0100

Add SameSite=strict to Manager and Host Manager cookies
---
 webapps/docs/changelog.xml| 9 +
 webapps/host-manager/META-INF/context.xml | 2 ++
 webapps/manager/META-INF/context.xml  | 2 ++
 3 files changed, 13 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f17503e..f378ad6 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -53,6 +53,15 @@
   
 
   
+  
+
+  
+Configure the Manager and Host Manager applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
+
+  
   
 
   
diff --git a/webapps/host-manager/META-INF/context.xml 
b/webapps/host-manager/META-INF/context.xml
index 8d1f61d..1fa3a5a 100644
--- a/webapps/host-manager/META-INF/context.xml
+++ b/webapps/host-manager/META-INF/context.xml
@@ -16,6 +16,8 @@
   limitations under the License.
 -->
 
+  
   
   
diff --git a/webapps/manager/META-INF/context.xml 
b/webapps/manager/META-INF/context.xml
index 0217745..120b7ab 100644
--- a/webapps/manager/META-INF/context.xml
+++ b/webapps/manager/META-INF/context.xml
@@ -16,6 +16,8 @@
   limitations under the License.
 -->
 
+  
   
   


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



[tomcat] 01/02: Don't send an HTTP/2 ping when the connection is known to be closing

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

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

commit 77caf7ec15f0e381869349698531a30622c2ebe9
Author: Mark Thomas 
AuthorDate: Mon Sep 14 18:47:17 2020 +0100

Don't send an HTTP/2 ping when the connection is known to be closing
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 13 +++--
 webapps/docs/changelog.xml|  8 
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 7b95592..4bc31fb 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -312,10 +312,15 @@ public class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpU
 SocketState result = SocketState.CLOSED;
 
 try {
-pingManager.sendPing(false);
-
 switch(status) {
 case OPEN_READ:
+synchronized (socketWrapper) {
+if (!socketWrapper.canWrite()) {
+// Only send a ping if there is no other data waiting 
to be sent.
+// Ping manager will ensure they aren't sent too 
frequently.
+pingManager.sendPing(false);
+}
+}
 try {
 // There is data to read so use the read timeout while
 // reading frames ...
@@ -824,6 +829,10 @@ public class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpU
 synchronized (socketWrapper) {
 if (socketWrapper.flush(false)) {
 socketWrapper.registerWriteInterest();
+} else {
+// Only send a ping if there is no other data waiting to be 
sent.
+// Ping manager will ensure they aren't sent too frequently.
+pingManager.sendPing(false);
 }
 }
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 19cef68..f17503e 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -45,6 +45,14 @@
   issues do not "pop up" wrt. others).
 -->
 
+  
+
+  
+Do not send an HTTP/2 PING frame to measure round-trip time when it is
+known that the HTTP/2 connection is not in a good state. (markt)
+  
+
+  
   
 
   


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



[tomcat] branch 8.5.x updated (4d5d395 -> 918e09e)

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

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


from 4d5d395  Replace "".equals(a) with a.isEmpty()
 new 77caf7e  Don't send an HTTP/2 ping when the connection is known to be 
closing
 new 918e09e  Add SameSite=strict to Manager and Host Manager cookies

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


Summary of changes:
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 13 +++--
 webapps/docs/changelog.xml| 17 +
 webapps/host-manager/META-INF/context.xml |  2 ++
 webapps/manager/META-INF/context.xml  |  2 ++
 4 files changed, 32 insertions(+), 2 deletions(-)


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



[tomcat] 03/03: Add SameSite=strict to Manager and Host Manager cookies

2020-09-15 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 3405dec9efb027252ddba005d6e44dda4c9f43df
Author: Mark Thomas 
AuthorDate: Tue Sep 15 11:40:40 2020 +0100

Add SameSite=strict to Manager and Host Manager cookies
---
 webapps/docs/changelog.xml| 9 +
 webapps/host-manager/META-INF/context.xml | 2 ++
 webapps/manager/META-INF/context.xml  | 2 ++
 3 files changed, 13 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index b9e9d89..2493e7b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -64,6 +64,15 @@
   
 
   
+  
+
+  
+Configure the Manager and Host Manager applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
+
+  
   
 
   
diff --git a/webapps/host-manager/META-INF/context.xml 
b/webapps/host-manager/META-INF/context.xml
index 8d1f61d..1fa3a5a 100644
--- a/webapps/host-manager/META-INF/context.xml
+++ b/webapps/host-manager/META-INF/context.xml
@@ -16,6 +16,8 @@
   limitations under the License.
 -->
 
+  
   
   
diff --git a/webapps/manager/META-INF/context.xml 
b/webapps/manager/META-INF/context.xml
index 0217745..120b7ab 100644
--- a/webapps/manager/META-INF/context.xml
+++ b/webapps/manager/META-INF/context.xml
@@ -16,6 +16,8 @@
   limitations under the License.
 -->
 
+  
   
   


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



[tomcat] 02/03: Use UPGRADED to ensure timeouts are processed

2020-09-15 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 8d9ea69b5b6078f836c16fe2528d03814ecb0691
Author: Mark Thomas 
AuthorDate: Mon Sep 14 18:48:13 2020 +0100

Use UPGRADED to ensure timeouts are processed
---
 java/org/apache/coyote/AbstractProtocol.java | 2 +-
 webapps/docs/changelog.xml   | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/AbstractProtocol.java 
b/java/org/apache/coyote/AbstractProtocol.java
index a47c732..d9bab30 100644
--- a/java/org/apache/coyote/AbstractProtocol.java
+++ b/java/org/apache/coyote/AbstractProtocol.java
@@ -924,7 +924,7 @@ public abstract class AbstractProtocol implements 
ProtocolHandler,
 if (httpUpgradeHandler instanceof 
InternalHttpUpgradeHandler) {
 if (((InternalHttpUpgradeHandler) 
httpUpgradeHandler).hasAsyncIO()) {
 // The handler will initiate all further 
I/O
-state = SocketState.LONG;
+state = SocketState.UPGRADED;
 }
 }
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5c755d5..b9e9d89 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -59,6 +59,9 @@
 Do not send an HTTP/2 PING frame to measure round-trip time when it is
 known that the HTTP/2 connection is not in a good state. (markt)
   
+  
+Ensure HTTP/2 timeouts are processed for idle connections. (markt)
+  
 
   
   


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



[tomcat] branch 9.0.x updated (a666c70 -> 3405dec)

2020-09-15 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 a666c70  Replace "".equals(a) with a.isEmpty()
 new 831f685  Don't send an HTTP/2 ping when the connection is known to be 
closing
 new 8d9ea69  Use UPGRADED to ensure timeouts are processed
 new 3405dec  Add SameSite=strict to Manager and Host Manager cookies

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/org/apache/coyote/AbstractProtocol.java |  2 +-
 .../org/apache/coyote/http2/Http2UpgradeHandler.java | 13 +++--
 webapps/docs/changelog.xml   | 20 
 webapps/host-manager/META-INF/context.xml|  2 ++
 webapps/manager/META-INF/context.xml |  2 ++
 5 files changed, 36 insertions(+), 3 deletions(-)


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



[tomcat] 01/03: Don't send an HTTP/2 ping when the connection is known to be closing

2020-09-15 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 831f685e26746b18276c7d5dc04800b13e459183
Author: Mark Thomas 
AuthorDate: Mon Sep 14 18:47:17 2020 +0100

Don't send an HTTP/2 ping when the connection is known to be closing
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 13 +++--
 webapps/docs/changelog.xml|  8 
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java 
b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index a1434bf..bcf9b5a 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -316,10 +316,15 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 SocketState result = SocketState.CLOSED;
 
 try {
-pingManager.sendPing(false);
-
 switch(status) {
 case OPEN_READ:
+synchronized (socketWrapper) {
+if (!socketWrapper.canWrite()) {
+// Only send a ping if there is no other data waiting 
to be sent.
+// Ping manager will ensure they aren't sent too 
frequently.
+pingManager.sendPing(false);
+}
+}
 try {
 // There is data to read so use the read timeout while
 // reading frames ...
@@ -827,6 +832,10 @@ class Http2UpgradeHandler extends AbstractStream 
implements InternalHttpUpgradeH
 synchronized (socketWrapper) {
 if (socketWrapper.flush(false)) {
 socketWrapper.registerWriteInterest();
+} else {
+// Only send a ping if there is no other data waiting to be 
sent.
+// Ping manager will ensure they aren't sent too frequently.
+pingManager.sendPing(false);
 }
 }
 }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 5c3e83f..5c755d5 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -53,6 +53,14 @@
   
 
   
+  
+
+  
+Do not send an HTTP/2 PING frame to measure round-trip time when it is
+known that the HTTP/2 connection is not in a good state. (markt)
+  
+
+  
   
 
   


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



[tomcat] branch master updated: Add SameSite=strict to Manager and Host Manager cookies

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

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


The following commit(s) were added to refs/heads/master by this push:
 new d381d87  Add SameSite=strict to Manager and Host Manager cookies
d381d87 is described below

commit d381d87005fa89d1f19d9091c0954f317c135d9d
Author: Mark Thomas 
AuthorDate: Tue Sep 15 11:40:40 2020 +0100

Add SameSite=strict to Manager and Host Manager cookies
---
 webapps/docs/changelog.xml| 9 +
 webapps/host-manager/META-INF/context.xml | 2 ++
 webapps/manager/META-INF/context.xml  | 2 ++
 3 files changed, 13 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index e10a44d..c5389e0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -64,6 +64,15 @@
   
 
   
+  
+
+  
+Configure the Manager and Host Manager applications to set
+SameSite=strict for all cookies, including session 
cookies,
+created by the application. (markt)
+  
+
+  
   
 
   
diff --git a/webapps/host-manager/META-INF/context.xml 
b/webapps/host-manager/META-INF/context.xml
index 8d1f61d..1fa3a5a 100644
--- a/webapps/host-manager/META-INF/context.xml
+++ b/webapps/host-manager/META-INF/context.xml
@@ -16,6 +16,8 @@
   limitations under the License.
 -->
 
+  
   
   
diff --git a/webapps/manager/META-INF/context.xml 
b/webapps/manager/META-INF/context.xml
index 0217745..120b7ab 100644
--- a/webapps/manager/META-INF/context.xml
+++ b/webapps/manager/META-INF/context.xml
@@ -16,6 +16,8 @@
   limitations under the License.
 -->
 
+  
   
   


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



[tomcat] branch 8.5.x updated: Replace "".equals(a) with a.isEmpty()

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
 new 4d5d395  Replace "".equals(a) with a.isEmpty()
4d5d395 is described below

commit 4d5d3956f3416008d3778a4ccc696602ad489b6c
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu Sep 10 12:52:11 2020 +0300

Replace "".equals(a) with a.isEmpty()


https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416
Proposal for JDK: https://github.com/openjdk/jdk/pull/29

(cherry picked from commit f550254bb15e1b0cc50225aee1c3fb1ed034f552)
---
 .../apache/catalina/ant/jmx/JMXAccessorCondition.java  |  2 +-
 .../apache/catalina/ant/jmx/JMXAccessorCreateTask.java |  2 +-
 java/org/apache/catalina/ant/jmx/JMXAccessorTask.java  |  2 +-
 java/org/apache/catalina/core/ApplicationContext.java  |  2 +-
 java/org/apache/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/core/StandardEngine.java  |  2 +-
 java/org/apache/catalina/filters/WebdavFixFilter.java  |  2 +-
 java/org/apache/catalina/ha/backend/TcpSender.java |  2 +-
 .../catalina/ha/session/JvmRouteBinderValve.java   |  2 +-
 .../apache/catalina/manager/HTMLManagerServlet.java|  9 +
 java/org/apache/catalina/manager/ManagerServlet.java   |  2 +-
 .../catalina/manager/host/HostManagerServlet.java  |  2 +-
 java/org/apache/catalina/realm/RealmBase.java  |  2 +-
 java/org/apache/catalina/servlets/CGIServlet.java  |  8 
 java/org/apache/catalina/session/JDBCStore.java|  2 +-
 .../org/apache/catalina/storeconfig/StoreRegistry.java |  2 +-
 java/org/apache/catalina/util/ContextName.java | 18 +-
 java/org/apache/el/MethodExpressionImpl.java   |  2 +-
 java/org/apache/el/MethodExpressionLiteral.java|  2 +-
 java/org/apache/el/ValueExpressionImpl.java|  2 +-
 java/org/apache/el/ValueExpressionLiteral.java |  2 +-
 java/org/apache/el/lang/ELSupport.java |  7 ---
 java/org/apache/el/lang/FunctionMapperImpl.java|  2 +-
 java/org/apache/el/util/ReflectionUtil.java|  2 +-
 java/org/apache/jasper/JspC.java   |  2 +-
 java/org/apache/jasper/compiler/Generator.java |  2 +-
 java/org/apache/jasper/compiler/Validator.java |  2 +-
 .../apache/tomcat/util/digester/SetPropertiesRule.java |  2 +-
 java/org/apache/tomcat/util/net/SSLUtilBase.java   |  2 +-
 .../apache/tomcat/websocket/WsWebSocketContainer.java  |  3 ++-
 30 files changed, 49 insertions(+), 46 deletions(-)

diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
index b009684..4ac07c3 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
@@ -149,7 +149,7 @@ public class JMXAccessorCondition extends 
JMXAccessorConditionBase {
  * @return true if there is no if condition, or the named property exists
  */
 protected boolean testIfCondition() {
-if (ifCondition == null || "".equals(ifCondition)) {
+if (ifCondition == null || ifCondition.isEmpty()) {
 return true;
 }
 return getProject().getProperty(ifCondition) != null;
diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
index 28aab6c..558a258 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
@@ -154,7 +154,7 @@ public class JMXAccessorCreateTask extends JMXAccessorTask {
}
}
 }
-if (classLoader != null && !"".equals(classLoader)) {
+if (classLoader != null && !classLoader.isEmpty()) {
 if (isEcho()) {
 handleOutput("create MBean " + name + " from class "
 + className + " with classLoader " + classLoader);
diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
index 8d5d268..d79e471 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
@@ -254,7 +254,7 @@ public class JMXAccessorTask extends 
BaseRedirectorHelperTask {
  * @return Returns the useRef.
  */
 public boolean isUseRef() {
-return ref != null && !"".equals(ref);
+return ref != null && !ref.isEmpty();
 }
 
 /**
diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index b6cd374..d109c5a 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ 

[tomcat] branch 9.0.x updated: Replace "".equals(a) with a.isEmpty()

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

mgrigorov 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 a666c70  Replace "".equals(a) with a.isEmpty()
a666c70 is described below

commit a666c70dfffda09d50ff93106ebb29bfe7107fed
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu Sep 10 12:52:11 2020 +0300

Replace "".equals(a) with a.isEmpty()


https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416
Proposal for JDK: https://github.com/openjdk/jdk/pull/29

(cherry picked from commit f550254bb15e1b0cc50225aee1c3fb1ed034f552)
---
 .../apache/catalina/ant/jmx/JMXAccessorCondition.java  |  2 +-
 .../apache/catalina/ant/jmx/JMXAccessorCreateTask.java |  2 +-
 java/org/apache/catalina/ant/jmx/JMXAccessorTask.java  |  2 +-
 java/org/apache/catalina/core/ApplicationContext.java  |  2 +-
 java/org/apache/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/core/StandardEngine.java  |  2 +-
 java/org/apache/catalina/filters/WebdavFixFilter.java  |  2 +-
 java/org/apache/catalina/ha/backend/TcpSender.java |  2 +-
 .../catalina/ha/session/JvmRouteBinderValve.java   |  2 +-
 .../apache/catalina/manager/HTMLManagerServlet.java|  9 +
 java/org/apache/catalina/manager/ManagerServlet.java   |  2 +-
 .../catalina/manager/host/HostManagerServlet.java  |  2 +-
 java/org/apache/catalina/realm/RealmBase.java  |  2 +-
 java/org/apache/catalina/servlets/CGIServlet.java  |  8 
 java/org/apache/catalina/session/JDBCStore.java|  2 +-
 .../org/apache/catalina/storeconfig/StoreRegistry.java |  2 +-
 java/org/apache/catalina/util/ContextName.java | 18 +-
 java/org/apache/el/MethodExpressionImpl.java   |  2 +-
 java/org/apache/el/MethodExpressionLiteral.java|  2 +-
 java/org/apache/el/ValueExpressionImpl.java|  2 +-
 java/org/apache/el/ValueExpressionLiteral.java |  2 +-
 java/org/apache/el/lang/ELSupport.java |  7 ---
 java/org/apache/el/lang/FunctionMapperImpl.java|  2 +-
 java/org/apache/el/util/ReflectionUtil.java|  2 +-
 java/org/apache/jasper/JspC.java   |  2 +-
 java/org/apache/jasper/compiler/Generator.java |  2 +-
 java/org/apache/jasper/compiler/Validator.java |  2 +-
 .../apache/tomcat/util/digester/SetPropertiesRule.java |  2 +-
 java/org/apache/tomcat/util/net/SSLUtilBase.java   |  2 +-
 .../apache/tomcat/websocket/WsWebSocketContainer.java  |  3 ++-
 30 files changed, 49 insertions(+), 46 deletions(-)

diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
index b009684..4ac07c3 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
@@ -149,7 +149,7 @@ public class JMXAccessorCondition extends 
JMXAccessorConditionBase {
  * @return true if there is no if condition, or the named property exists
  */
 protected boolean testIfCondition() {
-if (ifCondition == null || "".equals(ifCondition)) {
+if (ifCondition == null || ifCondition.isEmpty()) {
 return true;
 }
 return getProject().getProperty(ifCondition) != null;
diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
index 28aab6c..558a258 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
@@ -154,7 +154,7 @@ public class JMXAccessorCreateTask extends JMXAccessorTask {
}
}
 }
-if (classLoader != null && !"".equals(classLoader)) {
+if (classLoader != null && !classLoader.isEmpty()) {
 if (isEcho()) {
 handleOutput("create MBean " + name + " from class "
 + className + " with classLoader " + classLoader);
diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
index 8d5d268..d79e471 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
@@ -254,7 +254,7 @@ public class JMXAccessorTask extends 
BaseRedirectorHelperTask {
  * @return Returns the useRef.
  */
 public boolean isUseRef() {
-return ref != null && !"".equals(ref);
+return ref != null && !ref.isEmpty();
 }
 
 /**
diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index 7e6eed6..2bc9a48 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ 

[tomcat] branch master updated: Replace "".equals(a) with a.isEmpty()

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

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


The following commit(s) were added to refs/heads/master by this push:
 new f550254  Replace "".equals(a) with a.isEmpty()
 new 6053839  Merge pull request #356 from 
martin-g/improvement/use-string-isempty
f550254 is described below

commit f550254bb15e1b0cc50225aee1c3fb1ed034f552
Author: Martin Tzvetanov Grigorov 
AuthorDate: Thu Sep 10 12:52:11 2020 +0300

Replace "".equals(a) with a.isEmpty()


https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416
Proposal for JDK: https://github.com/openjdk/jdk/pull/29
---
 .../apache/catalina/ant/jmx/JMXAccessorCondition.java  |  2 +-
 .../apache/catalina/ant/jmx/JMXAccessorCreateTask.java |  2 +-
 java/org/apache/catalina/ant/jmx/JMXAccessorTask.java  |  2 +-
 java/org/apache/catalina/core/ApplicationContext.java  |  2 +-
 java/org/apache/catalina/core/StandardContext.java |  2 +-
 java/org/apache/catalina/core/StandardEngine.java  |  2 +-
 java/org/apache/catalina/filters/WebdavFixFilter.java  |  2 +-
 java/org/apache/catalina/ha/backend/TcpSender.java |  2 +-
 .../catalina/ha/session/JvmRouteBinderValve.java   |  2 +-
 .../apache/catalina/manager/HTMLManagerServlet.java|  9 +
 java/org/apache/catalina/manager/ManagerServlet.java   |  2 +-
 .../catalina/manager/host/HostManagerServlet.java  |  2 +-
 java/org/apache/catalina/realm/RealmBase.java  |  2 +-
 java/org/apache/catalina/servlets/CGIServlet.java  |  8 
 java/org/apache/catalina/session/JDBCStore.java|  2 +-
 .../org/apache/catalina/storeconfig/StoreRegistry.java |  2 +-
 java/org/apache/catalina/util/ContextName.java | 18 +-
 java/org/apache/el/MethodExpressionImpl.java   |  2 +-
 java/org/apache/el/MethodExpressionLiteral.java|  2 +-
 java/org/apache/el/ValueExpressionImpl.java|  2 +-
 java/org/apache/el/ValueExpressionLiteral.java |  2 +-
 java/org/apache/el/lang/ELSupport.java |  7 ---
 java/org/apache/el/lang/FunctionMapperImpl.java|  2 +-
 java/org/apache/el/util/ReflectionUtil.java|  2 +-
 java/org/apache/jasper/JspC.java   |  2 +-
 java/org/apache/jasper/compiler/Generator.java |  2 +-
 java/org/apache/jasper/compiler/Validator.java |  2 +-
 .../apache/tomcat/util/digester/SetPropertiesRule.java |  2 +-
 java/org/apache/tomcat/util/net/SSLUtilBase.java   |  2 +-
 .../apache/tomcat/websocket/WsWebSocketContainer.java  |  3 ++-
 30 files changed, 49 insertions(+), 46 deletions(-)

diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
index b009684..4ac07c3 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCondition.java
@@ -149,7 +149,7 @@ public class JMXAccessorCondition extends 
JMXAccessorConditionBase {
  * @return true if there is no if condition, or the named property exists
  */
 protected boolean testIfCondition() {
-if (ifCondition == null || "".equals(ifCondition)) {
+if (ifCondition == null || ifCondition.isEmpty()) {
 return true;
 }
 return getProject().getProperty(ifCondition) != null;
diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
index 28aab6c..558a258 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorCreateTask.java
@@ -154,7 +154,7 @@ public class JMXAccessorCreateTask extends JMXAccessorTask {
}
}
 }
-if (classLoader != null && !"".equals(classLoader)) {
+if (classLoader != null && !classLoader.isEmpty()) {
 if (isEcho()) {
 handleOutput("create MBean " + name + " from class "
 + className + " with classLoader " + classLoader);
diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java 
b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
index 8d5d268..d79e471 100644
--- a/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
+++ b/java/org/apache/catalina/ant/jmx/JMXAccessorTask.java
@@ -254,7 +254,7 @@ public class JMXAccessorTask extends 
BaseRedirectorHelperTask {
  * @return Returns the useRef.
  */
 public boolean isUseRef() {
-return ref != null && !"".equals(ref);
+return ref != null && !ref.isEmpty();
 }
 
 /**
diff --git a/java/org/apache/catalina/core/ApplicationContext.java 
b/java/org/apache/catalina/core/ApplicationContext.java
index 61981e5..06bdaa3 100644
--- a/java/org/apache/catalina/core/ApplicationContext.java
+++ 

[GitHub] [tomcat] martin-g merged pull request #356: Micro optimization: replace "".equals(a) with a.isEmpty()

2020-09-15 Thread GitBox


martin-g merged pull request #356:
URL: https://github.com/apache/tomcat/pull/356


   



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

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



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



Re: Deprecated JDBCRealm

2020-09-15 Thread Martin Grigorov
On Mon, Sep 14, 2020 at 9:53 PM Mark Thomas  wrote:

> All,
>
> I'd like to proposed the following:
> - Deprecated the JDBCRealm in 7.0.x, 8.5.x and 9.0.x
> - Remove the JDBCRealm in 10.0.x
>
> The reasons for this are:
> - The JDBCRealm is single threaded
> - The DataSourceRealm is a better solution
>
> Thoughts?
>

+1


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


svn commit: r41462 - /release/tomcat/tomcat-10/v10.0.0-M7/

2020-09-15 Thread markt
Author: markt
Date: Tue Sep 15 08:56:13 2020
New Revision: 41462

Log:
Drop old release from mirrors

Removed:
release/tomcat/tomcat-10/v10.0.0-M7/


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



svn commit: r41461 - /dev/tomcat/tomcat-9/v9.0.38/ /release/tomcat/tomcat-9/v9.0.38/

2020-09-15 Thread markt
Author: markt
Date: Tue Sep 15 08:55:46 2020
New Revision: 41461

Log:
Release Apache Tomcat 9.0.38

Added:
release/tomcat/tomcat-9/v9.0.38/
  - copied from r41460, dev/tomcat/tomcat-9/v9.0.38/
Removed:
dev/tomcat/tomcat-9/v9.0.38/


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



Re: [VOTE][RESULT] Release Apache Tomcat 9.0.38

2020-09-15 Thread Mark Thomas
The following votes were cast:

Binding:
+1: remm, kfujino, mgrigorov, markt, fhanik, csutherl

Non-binding:
+1: Raymond Auge

The vote therefore passes.

Thank you to everyone who has contributed to this release.

Mark

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



[ANN] Apache Tomcat 10.0.0-M8 available

2020-09-15 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 10.0.0-M8.

Apache Tomcat 10 is an open source software implementation of the
Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language,
Jakarta WebSocket, Jakarta Authentication and Jakarta Annotations
specifications.

Users of Tomcat 10 onwards should be aware that, as a result of the move
from Java EE to Jakarta EE as part of the transfer of Java EE to the
Eclipse Foundation, the primary package for all implemented APIs has
changed from javax.* to jakarta.*. This will almost certainly require
code changes to enable applications to migrate from Tomcat 9 and earlier
to Tomcat 10 and later. A migration tool is under development to aid
this process.

Apache Tomcat 10.0.0-M8 is a milestone release of the 10.0.x
branch and has been made to provide users with early access to the new
features in Apache Tomcat 10.0.x so that they may provide feedback. The
notable changes compared to 10.0.0-M7 include:

- For requests containing the Expect: 100-continue header, optional
  support has been added to delay sending an intermediate 100 status
  response until the servlet reads the request body, allowing the
  servlet the opportunity to respond without asking for the request
  body. Based on a pull request by malaysf.

- Add support for a read idle timeout and a write idle timeout to the
  WebSocket session via custom properties in the user properties
  instance associated with the session. Based on a pull request by
  sakshamverma.

- Update the packaged version of the Tomcat Native Library to 1.2.25

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

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

Migration guides from Apache Tomcat 7.0.x, 8.5.x and 9.0.x:
http://tomcat.apache.org/migration.html

Enjoy!

- The Apache Tomcat team

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



svn commit: r1881734 - in /tomcat/site/trunk: docs/index.html xdocs/index.xml

2020-09-15 Thread markt
Author: markt
Date: Tue Sep 15 08:42:30 2020
New Revision: 1881734

URL: http://svn.apache.org/viewvc?rev=1881734=rev
Log:
Fix copy/paste error

Modified:
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/xdocs/index.xml

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1881734=1881733=1881734=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Tue Sep 15 08:42:30 2020
@@ -28,7 +28,7 @@ wiki page.
 Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat
 project logo are trademarks of the Apache Software Foundation.
 
-2020-09-14 Tomcat 10.0.0-M7 Released
+2020-09-14 Tomcat 10.0.0-M8 Released
 
 The Apache Tomcat Project is proud to announce the release of version 10.0.0-M8
 of Apache Tomcat. This release is a milestone release and is targeted at 
Jakarta

Modified: tomcat/site/trunk/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/index.xml?rev=1881734=1881733=1881734=diff
==
--- tomcat/site/trunk/xdocs/index.xml (original)
+++ tomcat/site/trunk/xdocs/index.xml Tue Sep 15 08:42:30 2020
@@ -40,7 +40,7 @@ project logo are trademarks of the Apach
 
 
 
-
+
 
 The Apache Tomcat Project is proud to announce the release of version 10.0.0-M8
 of Apache Tomcat. This release is a milestone release and is targeted at 
Jakarta



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



svn commit: r1881733 - in /tomcat/site/trunk: ./ docs/ xdocs/

2020-09-15 Thread markt
Author: markt
Date: Tue Sep 15 08:40:37 2020
New Revision: 1881733

URL: http://svn.apache.org/viewvc?rev=1881733=rev
Log:
Update site for 10.0.0-M8 release

Modified:
tomcat/site/trunk/build.properties.default
tomcat/site/trunk/docs/download-10.html
tomcat/site/trunk/docs/index.html
tomcat/site/trunk/docs/migration-10.html
tomcat/site/trunk/docs/oldnews.html
tomcat/site/trunk/docs/whichversion.html
tomcat/site/trunk/xdocs/download-10.xml
tomcat/site/trunk/xdocs/index.xml
tomcat/site/trunk/xdocs/migration-10.xml
tomcat/site/trunk/xdocs/oldnews.xml
tomcat/site/trunk/xdocs/whichversion.xml

Modified: tomcat/site/trunk/build.properties.default
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/build.properties.default?rev=1881733=1881732=1881733=diff
==
--- tomcat/site/trunk/build.properties.default (original)
+++ tomcat/site/trunk/build.properties.default Tue Sep 15 08:40:37 2020
@@ -39,7 +39,7 @@ tomcat.loc=https://downloads.apache.org/
 tomcat70=7.0.105
 tomcat85=8.5.57
 tomcat90=9.0.37
-tomcat100=10.0.0-M7
+tomcat100=10.0.0-M8
 
 # - Download destination -
 tomcat-site-docs.home=${base.path}/tomcat-site-docs/

Modified: tomcat/site/trunk/docs/download-10.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/download-10.html?rev=1881733=1881732=1881733=diff
==
--- tomcat/site/trunk/docs/download-10.html (original)
+++ tomcat/site/trunk/docs/download-10.html Tue Sep 15 08:40:37 2020
@@ -21,7 +21,7 @@
 
   Quick Navigation
 
-[define v]10.0.0-M7[end]
+[define v]10.0.0-M8[end]
 https://downloads.apache.org/tomcat/tomcat-10/KEYS;>KEYS |
 [v] |
 Browse |

Modified: tomcat/site/trunk/docs/index.html
URL: 
http://svn.apache.org/viewvc/tomcat/site/trunk/docs/index.html?rev=1881733=1881732=1881733=diff
==
--- tomcat/site/trunk/docs/index.html (original)
+++ tomcat/site/trunk/docs/index.html Tue Sep 15 08:40:37 2020
@@ -28,6 +28,40 @@ wiki page.
 Apache Tomcat, Tomcat, Apache, the Apache feather, and the Apache Tomcat
 project logo are trademarks of the Apache Software Foundation.
 
+2020-09-14 Tomcat 10.0.0-M7 Released
+
+The Apache Tomcat Project is proud to announce the release of version 10.0.0-M8
+of Apache Tomcat. This release is a milestone release and is targeted at 
Jakarta
+EE 9.
+Users of Tomcat 10 onwards should be aware that, as a result of the move 
from
+Java EE to Jakarta EE as part of the transfer of Java EE to the Eclipse
+Foundation, the primary package for all implemented APIs has changed from
+javax.* to jakarta.*. This will almost certainly
+require code changes to enable applications to migrate from Tomcat 9 and 
earlier
+to Tomcat 10 and later. A
+https://github.com/apache/tomcat-jakartaee-migration;>migration
+tool is under development to aid this process.
+The notable changes in this release are:
+
+For requests containing the Expect: 100-continue header,
+optional support has been added to delay sending an intermediate 100 status
+response until the servlet reads the request body, allowing the servlet the
+opportunity to respond without asking for the request body. Based on a pull
+request by malaysf.
+Add support for a read idle timeout and a write idle timeout to the
+WebSocket session via custom properties in the user properties instance
+associated with the session. Based on a pull request by sakshamverma.
+Update the packaged version of the Tomcat Native Library to 1.2.25
+
+
+Full details of these changes, and all the other changes, are available in the
+Tomcat 10
+(alpha) changelog.
+
+
+
+https://tomcat.apache.org/download-10.cgi;>Download
+
 2020-09-03 Tomcat Native 1.2.25 Released
 
 The Apache Tomcat Project is proud to announce the release of version 1.2.25 of
@@ -104,35 +138,6 @@ changelog.
 
 https://tomcat.apache.org/download-80.cgi;>Download
 
-2020-07-05 Tomcat 10.0.0-M7 Released
-
-The Apache Tomcat Project is proud to announce the release of version 10.0.0-M7
-of Apache Tomcat. This release is a milestone release and is targeted at 
Jakarta
-EE 9.
-Users of Tomcat 10 onwards should be aware that, as a result of the move 
from
-Java EE to Jakarta EE as part of the transfer of Java EE to the Eclipse
-Foundation, the primary package for all implemented APIs has changed from
-javax.* to jakarta.*. This will almost certainly
-require code changes to enable applications to migrate from Tomcat 9 and 
earlier
-to Tomcat 10 and later. A
-https://github.com/apache/tomcat-jakartaee-migration;>migration
-tool is under development to aid this process.
-The notable changes in this release are:
-
-Implement a significant portion of the TLS environment variables for the
-rewrite valve.
-Add the Jakarta EE 9 schema.
-Improvements to the creation 

svn commit: r1881732 - in /tomcat/site/trunk/docs/tomcat-10.0-doc: ./ annotationapi/ annotationapi/jakarta/annotation/ annotationapi/jakarta/annotation/security/ annotationapi/jakarta/annotation/sql/

2020-09-15 Thread markt
Author: markt
Date: Tue Sep 15 08:39:02 2020
New Revision: 1881732

URL: http://svn.apache.org/viewvc?rev=1881732=rev
Log:
Update Javadoc for Apache Tomcat 10.0.0-M8 release


[This commit notification would consist of 80 parts, 
which exceeds the limit of 50 ones, so it was shortened to the summary.]

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



svn commit: r41460 - in /release/tomcat: tomcat-10/v10.0.0-M6/ tomcat-8/v8.5.56/ tomcat-9/v9.0.36/

2020-09-15 Thread markt
Author: markt
Date: Tue Sep 15 08:20:14 2020
New Revision: 41460

Log:
Drop old releases from mirrors

Removed:
release/tomcat/tomcat-10/v10.0.0-M6/
release/tomcat/tomcat-8/v8.5.56/
release/tomcat/tomcat-9/v9.0.36/


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