Click here to Skip to main content
16,012,168 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
hi
can you explain what does this mean

"
SQL
mycommand.CommandText = "insert into KM_USER(USER_NAME,PASSWORD,USERTYPE,REG_FLAG)values('" & Trim(UCase(userName)) & "'," _
                                            & " '" & FormsAuthentication.HashPasswordForStoringInConfigFile(Trim(passWord), "md5") & "','1','Y')

"


i need to know about this (FormsAuthentication.HashPasswordForStoringInConfigFile(Trim(passWord), "md5"))
Posted

Here is the MSDN documentation for this method.
It produces a hash password suitable for storing in a configuration file based on the specified password and hash algorithm.

http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.hashpasswordforstoringinconfigfile.aspx[^]
 
Share this answer
 
What does this mean??

It means you lifted some garbage code from somewhere. That code is so vulnerable to SQL Injection attacks it's just silly.

Also, MD5 is considered very broken and shouldn't be used to hash passwords.
 
Share this answer
 
You've really already asked this question (hence the one vote for repeating yourself).

The code above appears to be sql for inserting a new user into a user table. It is poorly constructed - should be a call to a stored procedure passing the values as parameters.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900