Skip to content
Snippets Groups Projects
Commit 6ca3e0f1 authored by srosse's avatar srosse
Browse files

OO-3344: check the token with equals() method

parent 511d51f8
No related branches found
No related tags found
No related merge requests found
......@@ -127,12 +127,11 @@ public class AdminModule extends AbstractSpringModule {
PropertyManager pm = PropertyManager.getInstance();
Property p = pm.findProperty(null, null, null, AdminModule.SYSTEM_PROPERTY_CATEGORY, tokenPropertyName);
String token = (p == null ? "" : p.getStringValue());
if (token.matches(submittedToken)) { // limit access to token
if (token.equals(submittedToken)) { // limit access to token
return true;
} else {
log.audit("Trying to set maintenance message using a wrong token. Remote address::" + request.getRemoteAddr());
return false;
}
log.audit("Trying to set maintenance message using a wrong token. Remote address::" + request.getRemoteAddr());
return false;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment