You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/07/26 14:00:55 UTC

[tomcat] branch 8.5.x updated: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63550

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 2deeecc  Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63550
2deeecc is described below

commit 2deeecc4d93455e4cb516276a9dd9bb744158d4b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Jul 26 14:59:57 2019 +0100

    Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=63550
    
    Only use the alternateURL for the JNDIRealm when it has been specified
---
 java/org/apache/catalina/realm/JNDIRealm.java | 4 ++++
 webapps/docs/changelog.xml                    | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java
index 950ee8a..a69dd71 100644
--- a/java/org/apache/catalina/realm/JNDIRealm.java
+++ b/java/org/apache/catalina/realm/JNDIRealm.java
@@ -2404,6 +2404,10 @@ public class JNDIRealm extends RealmBase {
             context = createDirContext(getDirectoryContextEnvironment());
 
         } catch (Exception e) {
+            if (alternateURL == null || alternateURL.length() == 0) {
+                // No alternate URL. Re-throw the exception.
+                throw e;
+            }
 
             connectionAttempt = 1;
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index f798aee..f93082f 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -47,6 +47,10 @@
 <section name="Tomcat 8.5.44 (markt)" rtext="in development">
   <subsection name="Catalina">
     <changelog>
+      <fix>
+        <bug>63550</bug>: Only try the <code>alternateURL</code> in the
+        <code>JNDIRealm</code> if one has been specified. (markt)
+      </fix>
       <add>
         <bug>63556</bug>: Mark request as forwarded in RemoteIpValve and
         RemoteIpFilter (michaelo)


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