Password problem with my Whirlpool & Y_INI login/register dialog system -
[NWA]Hannes - 19.07.2014
Hello, I'm currently starting a new script from scratch, and I though I'd use the Y_INI system because of its speed along with the Whirlpool hash because of its security, both created by Y_Less.
However, I've run into this strange problem where I can enter any password into the login dialog and it will still log me in, even if the password was incorrect.
Here is a link to Y_INI that I use, created by Y_Less.
https://sampforum.blast.hk/showthread.php?tid=175565
Here is a link to the Whirlpool plugin I use, created by Y_Less.
https://sampforum.blast.hk/showthread.php?tid=65290
Here is a video of the register process, where I write a password with both letters and numbers.
https://www.youtube.com/watch?v=QPsrDbtldg4
Here is a video of the login process, where I write an entirely different password than the one I registered with and it logs me in anyways.
https://www.youtube.com/watch?v=B3_8g4yyHcI
Here is the entire script that I use, it's a gamemode and it's also the
only script that I use.
http://pastebin.com/cEW2V794
Here is my userfile, Hannes.ini, which is located in "/scriptfiles/Users/".
http://pastebin.com/rzENVPMZ
Here is my server log.
http://pastebin.com/5LfBauVh
Any help is greatly appreciated, since I have absolutely no idea of why this is happening.
Re: Password problem with my Whirlpool & Y_INI login/register dialog system -
Sawalha - 19.07.2014
Replace LoadUser_data stock with loadaccount_user
and at OnPlayerConnect do the samething
EDIT:
here's it edited
http://pastebin.com/aQwvezvT
Re: Password problem with my Whirlpool & Y_INI login/register dialog system -
Scottas - 19.07.2014
print out both variables before comparing them.:
pawn Code:
printf("user input: %s, real password: %s", pass, Info[playerid][Pass]);
if(!strcmp(pass, Info[playerid][Pass], false))
Probably one of strings is empty, so you should check their length before comparing them (strcmp bug)
Re: Password problem with my Whirlpool & Y_INI login/register dialog system -
[NWA]Hannes - 19.07.2014
Quote:
Originally Posted by Scottas
print out both variables before comparing them.:
pawn Code:
printf("user input: %s, real password: %s", pass, Info[playerid][Pass]); if(!strcmp(pass, Info[playerid][Pass], false))
Probably one of strings is empty, so you should check their length before comparing them (strcmp bug)
|
This was an issue too, the real password string was empty for some reason. It works with Sawalha's fix but now I know why it happened too, thank you.
Quote:
Originally Posted by Sawalha
Replace LoadUser_data stock with loadaccount_user
and at OnPlayerConnect do the samething
EDIT:
here's it edited http://pastebin.com/aQwvezvT
|
Thank you, I don't know what the exact difference is but it works now.
Re: Password problem with my Whirlpool & Y_INI login/register dialog system -
Sawalha - 19.07.2014
Sensitive case is the difference