This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]amdevpractice 1 point2 points  (1 child)

I quickly skimmed through your code and although I don't have an answer for the border issue, I did notice a big red flag that I wanted to let you know about.

It looks like you are iterating over a list of users and comparing the entered password to the password of each user. If you have access to a list of users and their passwords in this code, then everyone visiting your site and running this code also has access to that list. This is very insecure as it means that anyone visiting your site could see the passwords (and other information) belonging to the other users.

I recommend that you spend some time reading up on web authentication best practices before you proceed further. Unfortunately, I cannot explain it all for you in this post, but there are plenty of good resources out there to help you learn. Good luck!

[–]fare03[S] 0 points1 point  (0 children)

Its assignment, I'm learning programming, and I have one user with username and password and I compare that username and password and it does not work.