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
https://forums.phpfreaks.com/topic/87717-any-help/
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
https://forums.phpfreaks.com/topic/87717-any-help/#findComment-451635
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
https://forums.phpfreaks.com/topic/87717-any-help/#findComment-451992
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.