13.03.2012, 11:32
If I may make a suggestion, changing the registration line to this:
(Encrypting the password with SHA1) would be a lot more secure. Ensuring that passwords cannot be seen by the naked eye.
Obviously during login you will also have to encrypt the password they submit:
Cheers,
TJ
pawn Code:
format(Query, sizeof(Query), "INSERT INTO `USERS` (`NAME`, `PASSWORD`, `IP`, `SCORE`, `CASH`, `ADMINLEVEL`) VALUES('%s',SHA1('%s'),'%s', '0', '500', '0')", DB_Escape(name), DB_Escape(inputtext), DB_Escape(ip));
Obviously during login you will also have to encrypt the password they submit:
pawn Code:
format(Query, sizeof(Query), "SELECT * FROM `USERS` WHERE `NAME` = '%s' COLLATE NOCASE AND `PASSWORD` = SHA1('%s')", DB_Escape(name), DB_Escape(inputtext));
TJ