Class URIResultParser


  • public final class URIResultParser
    extends ResultParser
    Tries to parse results that are a URI of some kind.
    • Field Detail

      • ALLOWED_URI_CHARS_PATTERN

        private static final java.util.regex.Pattern ALLOWED_URI_CHARS_PATTERN
      • USER_IN_HOST

        private static final java.util.regex.Pattern USER_IN_HOST
      • URL_WITH_PROTOCOL_PATTERN

        private static final java.util.regex.Pattern URL_WITH_PROTOCOL_PATTERN
      • URL_WITHOUT_PROTOCOL_PATTERN

        private static final java.util.regex.Pattern URL_WITHOUT_PROTOCOL_PATTERN
    • Constructor Detail

      • URIResultParser

        public URIResultParser()
    • Method Detail

      • isPossiblyMaliciousURI

        static boolean isPossiblyMaliciousURI​(java.lang.String uri)
        Returns:
        true if the URI contains suspicious patterns that may suggest it intends to mislead the user about its true nature. At the moment this looks for the presence of user/password syntax in the host/authority portion of a URI which may be used in attempts to make the URI's host appear to be other than it is. Example: http://yourbank.com@phisher.com This URI connects to phisher.com but may appear to connect to yourbank.com at first glance.
      • isBasicallyValidURI

        static boolean isBasicallyValidURI​(java.lang.String uri)