01.09.2015, 02:44
Here are some steps that may be helpful:
1. Check the parameters using a function such as sscanf.
2. Verify if the current password parameter matches the stored password. Hash both passwords in seperate variables before doing anything - assuming you hash your passwords.
3. Verify if the current password is different from the new.
4. Change the password - make sure you use the hashed version.
Simply adjust it to fit your system / gamemode. If you aren't hashing your passwords this is a MUST!
1. Check the parameters using a function such as sscanf.
2. Verify if the current password parameter matches the stored password. Hash both passwords in seperate variables before doing anything - assuming you hash your passwords.
3. Verify if the current password is different from the new.
4. Change the password - make sure you use the hashed version.
Simply adjust it to fit your system / gamemode. If you aren't hashing your passwords this is a MUST!