Description
Alexander Sedelnikov (Migrated from SEC-1893) said:
Port-mappings does not work properly,
when it setup in spring xml configuration such as:
ss:port-mappings
<ss:port-mapping http="8181" https="8080"/>
/ss:port-mappings
with:
<ss:form-login login-page="/access/login.html"
username-parameter="username"
password-parameter="password"
login-processing-url="/app/loginuser"
default-target-url="/app/" />
Spring security redirected me to url (https://localhost:8443/access/login.html must be https://localhost:8080/access/login.html) with 8443 port (by default in the org/springframework/security/web/PortMapperImpl.java) when I try to access protected page.
I edited PortMapperImpl.java:
public PortMapperImpl() {
httpsPortMappings = new HashMap<Integer, Integer>();
httpsPortMappings.put(Integer.valueOf(8080), Integer.valueOf(8080));
}
and redirection is working now to 8080 https.
I think that when ss:port-mappings.../ss:port-mappings setted,
PortMapperImpl.java:
private final Map<Integer, Integer> httpsPortMappings;
"httpsPortMappings" not cleaned properly, and previously key value are available.