Merge pull request #2475 from Ry0taK/v3.0
Fix required login bypass vulnerability
This commit is contained in:
commit
641f142cd3
1 changed files with 5 additions and 1 deletions
|
|
@ -46,7 +46,11 @@ public class MapStorageResourceHandler extends AbstractHandler {
|
||||||
int soff = 0, eoff;
|
int soff = 0, eoff;
|
||||||
// We're handling this request
|
// We're handling this request
|
||||||
baseRequest.setHandled(true);
|
baseRequest.setHandled(true);
|
||||||
|
if(core.getLoginRequired()
|
||||||
|
&& request.getSession(true).getAttribute(LoginServlet.USERID_ATTRIB) == null){
|
||||||
|
response.sendError(HttpStatus.UNAUTHORIZED_401);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (path.charAt(0) == '/') soff = 1;
|
if (path.charAt(0) == '/') soff = 1;
|
||||||
eoff = path.indexOf('/', soff);
|
eoff = path.indexOf('/', soff);
|
||||||
if (soff < 0) {
|
if (soff < 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue