List of usage examples for org.apache.wicket.util.string StringValue equals
@Override public boolean equals(final Object obj)
From source file:org.artifactory.common.wicket.component.form.SecureForm.java
License:Open Source License
@Override protected void onValidate() { // Check the random id in the hidden field. This guards against CSRF attacks. StringValue requestToken = getRequest().getPostParameters().getParameterValue(TOKEN_NAME); if (!requestToken.equals(StringValue.valueOf(getToken()))) { String message = "Attempted unauthorized form submission"; log.warn(message);/* w ww . j a v a 2 s .c om*/ AccessLogger.unauthorizedFormSubmit(message); throw new UnauthorizedActionException(this, new Action("submit without CSRF token")); } super.onValidate(); }