pkemkes / ctf-challenges

CTF challenges I created with instructions to run them yourself
MIT License
3 stars 1 forks source link

Y: Unexpected Vulnerability in Login #24

Closed pkemkes closed 8 months ago

pkemkes commented 8 months ago

You can change the user_id stored in your session if you inject SQL into the username or password field.

Proposed fix: Check whether the user_id exists before writing it into the session here: https://github.com/pkemkes/ctf-challenges/blob/main/y/src/app/views.py#L304