mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
enabled xsrf be default and remove claim prefix to reduce size
This commit is contained in:
@@ -734,5 +734,5 @@ public class ScmConfiguration
|
||||
* @since 1.47
|
||||
*/
|
||||
@XmlElement(name = "xsrf-protection")
|
||||
private boolean enabledXsrfProtection = false;
|
||||
private boolean enabledXsrfProtection = true;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public final class Xsrf {
|
||||
|
||||
static final String HEADER_KEY = "X-XSRF-Token";
|
||||
|
||||
static final String CLAIMS_KEY = "scm-manager.org/xsrf";
|
||||
static final String CLAIMS_KEY = "xsrf";
|
||||
|
||||
private Xsrf() {
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ Sonia.security.getXsrfToken = function() {
|
||||
tokenClaimsCompressed = tokenClaimsCompressed.replace('-', '+').replace('_', '/');
|
||||
if (window.atob) {
|
||||
var token = Ext.util.JSON.decode(window.atob(tokenClaimsCompressed));
|
||||
return token['scm-manager.org/xsrf'];
|
||||
return token['xsrf'];
|
||||
} else if (debug) {
|
||||
console.log('ERROR: browser does not support window.atob');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user