Skip to content

Commit

Permalink
Merge pull request #16 from sjzhu/patch-1
Browse files Browse the repository at this point in the history
[web-security] Validate PIN starts with a number for SQLi 1
  • Loading branch information
zardus authored Sep 14, 2024
2 parents e9efa96 + 93c4a6b commit f1b186c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web-security/sqli-pin/server
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def challenge_post():
flask.abort(400, "Missing `username` form parameter")
if not pin:
flask.abort(400, "Missing `pin` form parameter")

if pin[0] not in "0123456789":
flask.abort(400, "Invalid pin")

try:
# https://www.sqlite.org/lang_select.html
Expand Down

0 comments on commit f1b186c

Please sign in to comment.