diff --git a/build.properties.default b/build.properties.default index d5a906860ee6..e03d2d48c5b0 100644 --- a/build.properties.default +++ b/build.properties.default @@ -33,7 +33,7 @@ version.major=10 version.minor=0 version.build=28 version.patch=0 -version.suffix=-TT.3 +version.suffix=-TT.4 version.dev= # ----- Build tools ----- diff --git a/java/org/apache/catalina/authenticator/FormAuthenticator.java b/java/org/apache/catalina/authenticator/FormAuthenticator.java index 95bffc286a1d..732448d94d85 100644 --- a/java/org/apache/catalina/authenticator/FormAuthenticator.java +++ b/java/org/apache/catalina/authenticator/FormAuthenticator.java @@ -728,6 +728,12 @@ protected String savedRequestURL(Session session) { sb.append('?'); sb.append(saved.getQueryString()); } + + // Avoid protocol relative redirects + while (sb.length() > 1 && sb.charAt(1) == '/') { + sb.deleteCharAt(0); + } + return sb.toString(); } } diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 7b2374b37cd0..7e374997a358 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -114,6 +114,9 @@ Update to Commons Daemon 1.3.2. (markt) + + Avoid protocol relative redirects in FORM authentication. (markt) +