View Single Post
Old 09-18-2012, 11:14 PM   PM User | #2
Sammy12
Registered User

 
Join Date: Jun 2011
Posts: 1,063
Thanks: 12
Thanked 241 Times in 240 Posts
Sammy12 is on a distinguished road
You shouldn't be securing a login with JavaScript (especially an admin panel), it can easily be bypassed by disabling JavaScript or tampering with the code.

Try googling PHP login and finding something server-side, something people can't see or tamper with (easily).

And by the way, the scripts you provided aren't related and you are probably missing a large portion of it.

Code:
onsubmit="return authPass(this.user.value,this.pass.value)">
There should be a JavaScript function authPass() which submits the user and pass inputs and returns whether it is valid, JavaScript validation like this should be used for checking whether the username is at least 0 characters or something that is not really important to security.

Last edited by Sammy12; 09-18-2012 at 11:21 PM..
Sammy12 is offline   Reply With Quote
Users who have thanked Sammy12 for this post:
codernoob (09-18-2012)