mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-14 06:13:30 +00:00
UrlUtils reuses ABSOLUTE_URL
Fixes gh-4234
This commit is contained in:
parent
947d11f433
commit
469bc20e6d
@ -29,6 +29,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* @author Ben Alex
|
||||
*/
|
||||
public final class UrlUtils {
|
||||
|
||||
private static final Pattern ABSOLUTE_URL = Pattern.compile("\\A[a-z0-9.+-]+://.*",
|
||||
Pattern.CASE_INSENSITIVE);
|
||||
|
||||
// ~ Methods
|
||||
// ========================================================================================================
|
||||
|
||||
@ -140,8 +144,6 @@ public final class UrlUtils {
|
||||
if(url == null) {
|
||||
return false;
|
||||
}
|
||||
final Pattern ABSOLUTE_URL = Pattern.compile("\\A[a-z0-9.+-]+://.*",
|
||||
Pattern.CASE_INSENSITIVE);
|
||||
|
||||
return ABSOLUTE_URL.matcher(url).matches();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user