Jump to content

Any help??


neverett

Recommended Posts

function validate_oldpw(opw, pw){
		with(opw, pw){
			var old = opw.value;
			old = md5(old);
			if(opw.value == ""){ alert("The [old] password you entered does not match your current account password.1"); return false; }
			if(md5(old) == pw.value){ return true; }
			else{ alert("The [old] password you entered does not match your current account password.2"); return false; }
		}
}

 

Any idea why this won't work.  I'm trying to compare two passwords.  pw.value is a password stored via the md5 method.  I'm trying to take opw and check it with the supplied pw.value.  Let me know if you have any ideas.  Thanks in advance!!!

Link to comment
Share on other sites

and why wud u do that?

now you have given away a great deal in cracking the pw.

 

the md5 hash shudn be made available to the user at all. with this hash someone can generate new hashs, and come up with a password that isnt the same as the original password, but gives the same md5 hash.

 

Link to comment
Share on other sites

u give the result of the md5, that's what i'm talking about. not the function.

 

if someone were to see the md5 hash of a password, they got 2 keys to a puzzle of a user acct.

1) The username

2) the md5 hash itself (the result of md5)

 

now they can run a routine offline to hack that acct.

 

u want to make things harder, reason to use md5 hashes instead of plain text passwords. not defeat the purpose of md5 hashing

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.