Skip to content

Commit

Permalink
make sure error messages for two different expiration cases are unique
Browse files Browse the repository at this point in the history
  • Loading branch information
markstos authored Mar 26, 2021
1 parent 352e059 commit f0a7f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/passport-saml/saml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1260,11 +1260,11 @@ class SAML {
if (notOnOrAfter) {
const notOnOrAfterMs = Date.parse(notOnOrAfter);
if (nowMs - this.options.acceptedClockSkewMs >= notOnOrAfterMs)
return new Error("SAML assertion expired");
return new Error("SAML assertion expired: clocks skewed too much");
}
if (maxTimeLimitMs) {
if (nowMs - this.options.acceptedClockSkewMs >= maxTimeLimitMs)
return new Error("SAML assertion expired");
return new Error("SAML assertion expired: assertion too old");
}

return null;
Expand Down

0 comments on commit f0a7f84

Please sign in to comment.