mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
re implement xsrf protection for scm-manager 2.0.0
This commit is contained in:
@@ -184,7 +184,10 @@ public class AuthenticationResource
|
||||
|
||||
// TODO: should be configureable
|
||||
c.setMaxAge((int) TimeUnit.SECONDS.convert(10, TimeUnit.HOURS));
|
||||
c.setHttpOnly(true);
|
||||
|
||||
// set http only flag only xsrf protection is disabled,
|
||||
// because we have to extract the xsrf key with javascript in the wui
|
||||
c.setHttpOnly(!configuration.isEnabledXsrfProtection());
|
||||
response.addCookie(c);
|
||||
state = stateFactory.createState(subject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user