Login Page
I want this developer.html to go to index.html when I press login if the username and password are correct. here is the code
5 Replies
you're comparing
document.getElementById()
's output (which is an HTMLElement) to a string, so that will never work. You have to use document.getElementById().value === password
I do hope you are aware this is horrificly insecure, right?
like, it's fine as an exercise, but never ever ever do this for anything that even matters a tiny bitI do understand. This is for a website for developers of a roblox group. It is for them to look at for announcements and other stuff. I will think of better credentials for it soon but that is what I have got for testing.
A significant percentage of even the most unskilled people (not even talking and hackers) that want to get past that will take all of ten minutes to do so, and mostly because it'll take them nine minutes to recover from laughing so hard at the fact the password is in the Javascript. It being three characters is moot at that point
You're better off just having a page that isn't linked anywhere on your site and sending that link to the people that should have access over dms, at least that way an attacker won't have the link served on a platter
Would you be able to maybe help me with making registration and encryption? The username and passwords were also just for testing the website before it would go even somewhat public. I will hopefully be able to get encryption and a database for different accounts later.
Also I am going to mark this post as solved now. Thank you!
Sorry, that's not something I can commit to. You should ask in potentially a new post, but I'd recommend you do some research and maybe try to find some tutorials online first, the more focused a question is the better the answers will be.