Login with any password bug
#4

Quote:
Originally Posted by mineralo
Посмотреть сообщение
you not checking if same password
pawn Код:
case DIALOG_LOGIN: {
            if ( !response ) return Kick ( playerid );
            if( response ) {
                //if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                //if(strlen(PInfo[playerid][Password])) {
                new file[64], PlayerName[24],pass[256];
                GetPlayerName(playerid,PlayerName,sizeof PlayerName);
                format(file,sizeof file,"Admin/%s.ini",PlayerName);
                if(strlen(inputtext)) {
                    INI_Open(file);//Opening the file with SII include
                    INI_ReadString(pass,"Password");
if(strlcmp(pass,inputtext,true) !=0) {
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
return 1;
}
                    PInfo[playerid][Registered] = INI_ReadInt("Registered");
                    PInfo[playerid][Level] = INI_ReadInt("Level");//Setting the admin level variable, to the one thats in his file.
                    PInfo[playerid][Score] = INI_ReadInt("Score"); // Setting the score of player
                    PInfo[playerid][Money] = INI_ReadInt("Money"); // Setting the money of player
                    PInfo[playerid][Operator] = INI_ReadInt("Operator");
                    INI_Close();//"Closing the file", that means that we're not using it anymore :P
                    SendClientMessage(playerid,-1,"You have been successfully logged in!");
                    PInfo[playerid][Logged] = 1;//Setting the logged in variable to 1
                    SetPlayerScore(playerid, PInfo[playerid][Score]);
                    GivePlayerMoney(playerid, PInfo[playerid][Money]);
                } else {
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","You have entered an incorrect password.\nType your password below to login.","Login","Quit");
                }
                return 1;
            }
        }
That didn't work at all it didn't even login anymore..
And we don't use a hash system.
Reply


Messages In This Thread
Login with any password bug - by Biess - 22.12.2012, 12:47
Re: Login with any password bug - by mineralo - 22.12.2012, 13:05
Re: Login with any password bug - by mineralo - 22.12.2012, 13:11
Re: Login with any password bug - by Biess - 22.12.2012, 13:11
Re: Login with any password bug - by mineralo - 22.12.2012, 13:13
Re: Login with any password bug - by mineralo - 22.12.2012, 13:19
Re: Login with any password bug - by Biess - 22.12.2012, 13:20
Re: Login with any password bug - by mineralo - 22.12.2012, 13:25
Re: Login with any password bug - by Vince - 22.12.2012, 16:00
Re: Login with any password bug - by Biess - 22.12.2012, 16:48

Forum Jump:


Users browsing this thread: 1 Guest(s)