Package com.atlassian.jira.util
Class UriValidator
java.lang.Object
com.atlassian.jira.util.UriValidator
Verify that a url is not executable
Needs to be instantiated to support testing - oh PowerMock wherefore art thou
- Since:
- v4.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetSafeUri
(String canonicalBaseUri, String uri) This method returns a safe URI - it firstly URL decodes and then only allows HTTP(s) schemes
-
Constructor Details
-
UriValidator
-
-
Method Details
-
getSafeUri
This method returns a safe URI - it firstly URL decodes and then only allows HTTP(s) schemes- Parameters:
canonicalBaseUri
- The base URI - if no trailing slash one will be provideduri
- The uri to resolve- Returns:
- A resolved URI, null if it is an unsuppported scheme, viz. Javascript
-