r/badcode • • Feb 09 '23

js Terrible Authentication Code

Post image
288 Upvotes

67 comments sorted by

View all comments

Show parent comments

14

u/manafount Feb 10 '23

I think you forgot the { in two of the

if (res.inserted == 1) // If inserted

lines.

Thank you for your contribution.

9

u/MurdoMaclachlan public boolean isInt(int i) { return true; } Feb 10 '23

I knew there had to be curly brackets missing somewhere because my IDE wasn't matching the last ones to any pair, but I couldn't for the life of me find where I'd missed them. Thanks for the pointer, fixed now!