Password Encryption | 
	
									
	9/6/2005 01:36:40 | |
| ASPRunnerPro General questions | ||
| 
	 
		
 How do I set ASP Runner to read and encrypt the passwords when creating them. I noticed the are plain text in the MYSQL Data base.  | 
	
									
	||
| 
 
 | 
						 
							Sergey Kornilov admin 9/6/2005 | 
| 
 
 Encrypted password do not mean security. If someone gets access to your ASP code no matter if passwords are encrypted or not.  strSQL= "update " & AddWrappers(cLoginTable) & " set " & AddWrappers(cPasswordField) & "= md5(" & passvalue & ") " & sWhere 
  | 
											|
| 
 
 | 
						 
							customcode author 9/7/2005 | 
 
Encrypted password do not mean security. If someone gets access to your ASP code no matter if passwords are encrypted or not. To encrypt passwords in the database you can use MySQL functions encpypt() or md5(). You need to modify files login.asp, register.asp and changepwd.asp to encrypt password before writing to the database and before validating. For example, here is the update password SQL statement on changepwd.asp page (see my chnages in bold): Note: password reminder page won't work anymore because you are not storing actual passwords in the database anymore. You will need to change this page to reset password. 
  | 
											|
| 
 
 | 
						 
							Sergey Kornilov admin 9/7/2005 | 
| 
 
 Replace this line in login.asp: if request("username")=CStr(rs(cUserNameField)) and request("password")=CStr(rs(cPasswordField)) then
 if request("username")=CStr(rs(cUserNameField))  then | 
											|
| 
 
 | 
						 
							501244 9/8/2005 | 
| 
 
 It worked. thx....  | 
											|
| 
 
 | 
						 
							500314 10/15/2005 | 
| 
 
 Hi I am using SQL 2000 and I got the pasword to encrypt, but I cant get the user to login with the encrpted pasword.  | 
											|
| 
 
 | 
						 
							Sergey Kornilov admin 10/15/2005 | 
| 
 
 Replace this line in login.asp: if request("username")=CStr(rs(cUserNameField)) and request("password")=CStr(rs(cPasswordField)) then 
 if request("username")=CStr(rs(cUserNameField))Â then 
 strSQL = "select * from " & cLoginTable & " where " & AddWrappers(cUserNameField) & _ "=" & strUsername & " and dbo.MD5(CONVERT(VARBINARY(50)," & AddWrappers(cPasswordField) & "))=" & strPassword  | 
											|
| 
 
 | 
						 
							500315 10/15/2005 | 
| 
 
 Hi,   | 
											|
| 
 
 | 
						 
							500316 10/15/2005 | 
| 
 
 Can you please tell me what I am doing wrong in the above mentioned code.  | 
											|
| 
 
 | 
						 
							500317 10/15/2005 | 
| 
 
 Hi ,  | 
											|
| 
 
 | 
						 
							Sergey Kornilov admin 10/15/2005 | 
| 
 
 you putting SQL query to the wrong place. New SQL query should replace existing onw before recordset is opened. Replace SQL query that comes before the following two lines: rs.open strSQL, dbConnection,1 Call ReportError  | 
											|
| 
 
 | 
						 
							500318 10/18/2005 | 
| 
 
 Hi,  | 
											|
| 
 
 | 
						 
							Sergey Kornilov admin 10/18/2005 | 
| 
 
 You need to print modified SQL statement on ASP page, make sure it looks right.  | 
											|
| 
 
 G 
 | 
						 
							Gaya 10/19/2005 | 
| 
 
 Hi,  | 
											|
| 
 
 | 
						 
							Sergey Kornilov admin 10/19/2005 | 
| 
 
 I'm not sure what kind of example do you need.  | 
											|
| 
 
 | 
						 
							500319 10/21/2005 | 
| 
 
 I am working on this , If I get stuck, I 'll post on this Forum, Thanks for your help.  | 
											|