mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 16:14:26 +08:00
Changed auth check order
Fixes an issue where authentication is not required but is present anyway, leading to WebAuthFailException when trying to get web user for authentication headers coming from a reverse-proxy. Affects issues: - #1215
This commit is contained in:
parent
cafcb61cf5
commit
f17470ee6c
@ -139,8 +139,7 @@ public class ResponseHandler extends TreePageHandler {
|
||||
if (pageHandler == null) {
|
||||
return responseFactory.pageNotFound404();
|
||||
} else {
|
||||
boolean isAuthorized = authentication.isPresent() && pageHandler.isAuthorized(authentication.get(), target);
|
||||
if (!isAuthRequired || isAuthorized) {
|
||||
if (!isAuthRequired || pageHandler.isAuthorized(authentication.get(), target)) {
|
||||
return pageHandler.getResponse(request, target);
|
||||
}
|
||||
return responseFactory.forbidden403();
|
||||
|
Loading…
Reference in New Issue
Block a user