Fix misleading validation-failure log message in AddPlayer/CreateNewA… - #917
Merged
SeanDuggan merged 1 commit intoSep 2, 2026
Merged
Conversation
…dmin Replace the inaccurate "JavaScript validation bypassed" ERROR log with an accurate WARN message describing a server-side validation failure. - Log the length of the offending username/password/address fields instead of asserting a JS bypass, so operators can tell which constraint (username 3-32 chars, password 8-512 chars, address <=128 chars) was violated. - Never log the actual field values (especially the password). - Downgrade log level from ERROR to WARN, since this is a routine input-validation rejection, not a tamper signal. - Apply the same fix to CreateNewAdmin.java, which had the identical issue. - User-facing response message is unchanged. Fixes OWASP#860
SeanDuggan
approved these changes
Sep 2, 2026
SeanDuggan
left a comment
Member
There was a problem hiding this comment.
Looks good @shishir-cyber. Let us know if you find any other logging events we can improve on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #860
Problem
AddPlayer.javaandCreateNewAdmin.javaloggedlog.error("JavaScript validation bypassed")wheneverValidate.isValidUser()rejected input, even for the routine case of e.g. a too-short password. This wrongly implied a malicious client-side bypass and gave no detail on which constraint failed.Fix
actual values) so operators can see which constraint was violated.
CreateNewAdmin.java, which had the identical pattern.Verification
mvn spotless:check- passesmvn clean install -Pdocker -DskipTests- compiles cleanly