public class UrlUtils extends Object
Constructor and Description |
---|
UrlUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getPathUnderContext(String url,
String context)
Given an URL which may:
- include scheme,host and optionally port
- start directly with context
- start with an arbitrary path under a context
this method returns the path under context.
|
static boolean |
isSafeUrl(String returnUrl)
Validate if passed URL uses HTTP or HTTPS schema or there's no indication that any type of schema is used altogether.
|
public static boolean isSafeUrl(String returnUrl)
returnUrl
- URL decoded value of returnUrl query parampublic static String getPathUnderContext(@NotNull String url, @NotNull String context)
for context description
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.