Skip to content

Commit

Permalink
DDF-3606 Prevents low-risk XSS reflection attack from a remote SP by …
Browse files Browse the repository at this point in the history
…validating RelayState. (#2940)

(cherry picked from commit dce113c)
  • Loading branch information
coyotesqrl authored Feb 7, 2018
1 parent 99fb6e6 commit 83e64ca
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ public void validateRelayState(String relayState) {
if (relayState != null && relayState.length() > 80) {
LOGGER.warn("RelayState has invalid size: {}", relayState.length());
}

if (relayState != null && (relayState.contains("<") || relayState.contains(">"))) {
throw new IllegalArgumentException("RelayState cannot contain '<' or '>'");
}
}

protected void checkDestination(AuthnRequest authnRequest) throws ValidationException {
Expand Down

0 comments on commit 83e64ca

Please sign in to comment.