Skip to content

Commit

Permalink
TOMEE-4239 - Backport fix for CVE-2023-41080 from apache/tomcat@bb4624a
Browse files Browse the repository at this point in the history
  • Loading branch information
rzo1 committed Aug 29, 2023
1 parent 773bb8c commit b5e88d1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit b5e88d1

Please sign in to comment.