I Can Login With Any Password Using Y_ini and WhirlPool, What's wrong?
#1

Hey guys, I'm having this problem which is that I can login with any password. Here is the code:

pawn Code:
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
if(strcmp(hashpass,PlayerInfo[playerid][Pass]) == 0)
{
       //Login user..etc
}
else
{
    //Give error
}
As you can see I'm using WhirlPool + y_ini.

WhirlPool works perfectly I've made a debug to show me if it hashed the inputtext or not and it did.
Reply
#2

Are you using a script before it to check the string length?
Reply
#3

Check if PlayerInfo[playerid][Pass] is being loaded correctly. It's probably null.
Reply
#4

Quote:
Originally Posted by Peach
View Post
Are you using a script before it to check the string length?
Yep.

Quote:
Originally Posted by VincentDunn
View Post
Check if PlayerInfo[playerid][Pass] is being loaded correctly. It's probably null.
If I send it like a string (%s) I get an empty line, but if I send it as an Integer I get a 0.
Reply
#5

As you said it is giving you empty line so PlayerInfo[playerid][Pass] is not loading correctly.
Reply
#6

show us your INI_ParseFile.
Reply
#7

Silly me I was loading it as an Integer.

Thanks to everyone that helped. Rep+

Argh need to spread some rep before giving it back to you Vincent.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)