Skip to content

Commit

Permalink
Merge pull request #13 from cesarhernandezgt/TOMCAT_7_0_68_TT-CVE-PATCH
Browse files Browse the repository at this point in the history
Prepare for release 7.0.68-TT.18
  • Loading branch information
cesarhernandezgt authored Sep 6, 2023
2 parents b21cbc4 + 0e9cd25 commit 35af238
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.properties.default
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ version.major=7
version.minor=0
version.build=68
version.patch=0
version.suffix=-TT.17
version.suffix=-TT.18

# ----- Build control flags -----
# Note enabling validation uses Checkstyle which is LGPL licensed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,13 @@ protected String savedRequestURL(Session session) {
sb.append('?');
sb.append(saved.getQueryString());
}
return (sb.toString());

// Avoid protocol relative redirects
while (sb.length() > 1 && sb.charAt(1) == '/') {
sb.deleteCharAt(0);
}

return (sb.toString());
}


Expand Down
4 changes: 2 additions & 2 deletions java/org/apache/tomcat/util/http/Parameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,14 @@ public void addParameter( String key, String value )
return;
}

parameterCount ++;
if (limit > -1 && parameterCount > limit) {
if (limit > -1 && parameterCount >= limit) {
// Processing this parameter will push us over the limit. ISE is
// what Request.parseParts() uses for requests that are too big
setParseFailedReason(FailReason.TOO_MANY_PARAMETERS);
throw new IllegalStateException(sm.getString(
"parameters.maxCountFail", Integer.valueOf(limit)));
}
parameterCount++;

ArrayList<String> values = paramHashValues.get(key);
if (values == null) {
Expand Down
3 changes: 3 additions & 0 deletions webapps/docs/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
<code>RemoteIpFilter</code> determines that this request was submitted
via a secure channel. (lihan)
</fix>
<fix>
Avoid protocol relative redirects in FORM authentication. (markt)
</fix>
</changelog>
</subsection>
<subsection name="WebSocket">
Expand Down

0 comments on commit 35af238

Please sign in to comment.