Skip to content

Remove authentication level 1 SQL injection - #226

Open
r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/authentication-level-1
Open

r1kka6 wants to merge 1 commit into
OWASP-CTF:dc34-ctffrom
r1kka6:fix/authentication-level-1

Conversation

@r1kka6

@r1kka6 r1kka6 commented Aug 10, 2026

Copy link
Copy Markdown

Summary

  • replace the Level 1 string-concatenated SQL query with the existing repository-backed authentication flow
  • remove the unused JdbcTemplate path from AuthLoginService
  • update the unit test to verify the repository lookup contract instead of mocked raw SQL execution

Verification

  • ./gradlew compileJava test spotlessJavaCheck bootJar --no-daemon passed in an eclipse-temurin:17-jdk container
  • vulnerable baseline authenticates username=' OR 1=1 -- with any password\n- patched runtime rejects that payload while admin_sqli with not_needed_for_sqli still succeeds and wrong passwords still fail

Signed-off-by: snow <snow@snows-MacBook-Pro-2.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant