|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2012-2022 the original author or authors.
|
|
|
|
|
* Copyright 2012-2023 the original author or authors.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
@ -1506,10 +1506,19 @@ public class ServerProperties {
|
|
|
|
|
* Whether the server should decode percent encoded slash characters. Enabling
|
|
|
|
|
* encoded slashes can have security implications due to different servers
|
|
|
|
|
* interpreting the slash differently. Only enable this if you have a legacy
|
|
|
|
|
* application that requires it.
|
|
|
|
|
* application that requires it. Has no effect when server.undertow.decode-slash
|
|
|
|
|
* is set.
|
|
|
|
|
*/
|
|
|
|
|
private boolean allowEncodedSlash = false;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Whether encoded slash characters (%2F) should be decoded. Decoding can cause
|
|
|
|
|
* security problems if a front-end proxy does not perform the same decoding. Only
|
|
|
|
|
* enable this if you have a legacy application that requires it. When set,
|
|
|
|
|
* server.undertow.allow-encoded-slash has no effect.
|
|
|
|
|
*/
|
|
|
|
|
private Boolean decodeSlash;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Whether the URL should be decoded. When disabled, percent-encoded characters in
|
|
|
|
|
* the URL will be left as-is.
|
|
|
|
@ -1603,14 +1612,25 @@ public class ServerProperties {
|
|
|
|
|
this.maxCookies = maxCookies;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@DeprecatedConfigurationProperty(replacement = "server.undertow.decode-slash")
|
|
|
|
|
@Deprecated(forRemoval = true, since = "3.0.3")
|
|
|
|
|
public boolean isAllowEncodedSlash() {
|
|
|
|
|
return this.allowEncodedSlash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Deprecated(forRemoval = true, since = "3.0.3")
|
|
|
|
|
public void setAllowEncodedSlash(boolean allowEncodedSlash) {
|
|
|
|
|
this.allowEncodedSlash = allowEncodedSlash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Boolean getDecodeSlash() {
|
|
|
|
|
return this.decodeSlash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setDecodeSlash(Boolean decodeSlash) {
|
|
|
|
|
this.decodeSlash = decodeSlash;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public boolean isDecodeUrl() {
|
|
|
|
|
return this.decodeUrl;
|
|
|
|
|
}
|
|
|
|
|