Just now i’m writing a project, and i desided to write it with jquery and ajax requests.
only thing, i don’t know, is it secure enough?
for example, when i verify the username, when registering new user, i use jquery ajax request,
i get the array of existing usernames from db(with json), and then verify, if new_username not inArray() of existing usernames, i make another request, and register the user.
but what about security? meybe hacker can find the way to change some of my if-else statements, and whole my securite will brake.
maybe you’ll help me to understand this situation?
Thanks
Why are you implementing any of that client-side?
You should send the username/password over HTTPS in an AJAX query and have the server respond with only the data required for the user to move on, not the whole username list.
Even putting security aside, what if you have millions of users? You’re going to send that list to all clients for them to log in?