Class RedirectRestricter


  • public class RedirectRestricter
    extends java.lang.Object
    Open redirects are a security issue: https://www.netsparker.com/blog/web-security/open-redirection-vulnerability-information-prevention/ Therefor we need to make sure that we react only on allowed redirects. This class helps validate redirect requests against a whitelist.
    • Method Detail

      • isRedirectAllowed

        public boolean isRedirectAllowed​(java.lang.String redirect)
      • getRedirectOrNull

        public java.lang.String getRedirectOrNull​(java.lang.String redirect)
        Returns the given redirect if allowed, otherwise null.