You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In version 6.0.3 our application returns a HTTP 400 with message Administrator should not start with since is automatically prepended when using hasAnyRole. Consider using hasAnyAuthority instead. This is an IllegalArgumentException
This is because we use rolePrefix "" (empty string)
final JwtGrantedAuthoritiesConverter authoritiesConverter = new JwtGrantedAuthoritiesConverter();
authoritiesConverter.setAuthorityPrefix("");
....
GrantedAuthorityDefaults grantedAuthorityDefaults() {
return new GrantedAuthorityDefaults("");
}
When using rolePrefix empty string Jsr250AuthorizationManager it calls return AuthorityAuthorizationManager.hasAnyRole(Jsr250AuthorizationManager.this.rolePrefix,
To Reproduce
Set rolePrefix to empty String
Expected behavior
If allowed for security reasons same behavior as version 6.0.2, allow empty string for role prefix.
The text was updated successfully, but these errors were encountered:
Describe the bug
In version 6.0.3 our application returns a HTTP 400 with message
Administrator should not start with since is automatically prepended when using hasAnyRole. Consider using hasAnyAuthority instead.
This is an IllegalArgumentExceptionChange is here (check on the prefix which triggers on empty string)
AuthorityAuthorizationManager.java#L128
This is because we use rolePrefix "" (empty string)
When using rolePrefix empty string Jsr250AuthorizationManager it calls
return AuthorityAuthorizationManager.hasAnyRole(Jsr250AuthorizationManager.this.rolePrefix,
To Reproduce
Set rolePrefix to empty String
Expected behavior
If allowed for security reasons same behavior as version 6.0.2, allow empty string for role prefix.
The text was updated successfully, but these errors were encountered: