Not saving password
#1

+Rep I forgot something, already analyzed but do not know..

pawn Код:
else if(dialogid == DIALOG_ID_REGISTER){
                if(response){
                if(strlen(inputtext) < 3){
                                ShowPlayerDialog(playerid,DIALOG_ID_REGISTER,DIALOG_STYLE_PASSWORD,"{FFAA00}Welcome to [DayZ]","{FFFFFF}The specified password was too short,\nyour password requires at least 3 characters","Register","Exit");
                                return 1;
                        }else{
                ClearChat(playerid);
                SpielerInfo[playerid][Pass] = strval(inputtext); // PASSWORD FUNCTION
pawn Код:
else if(dialogid == DIALOG_ID_LOGIN){
                if(response)
                {
                if(strlen(inputtext) == 0){
                        ShowPlayerDialog(playerid,DIALOG_ID_LOGIN,DIALOG_STYLE_PASSWORD,"{FFAA00}Welcome to DayZ 0.12 Beta","{FFFFFF}Incorrect password! Please enter your correct password!:","Login","Exit");
                        return 1;
                }else{
            if(strval(inputtext) == SpielerInfo[playerid][Pass]) {
...
                }else{
                    SpielerInfo[playerid][pFalschesPasswort]++;
                    ShowPlayerDialog(playerid,DIALOG_ID_LOGIN,DIALOG_STYLE_PASSWORD,"{FFAA00}Welcome to DayZ 0.12 Beta ","{FFFFFF}Incorrect password! Please enter your correct password!:","Login","Exit");
                    if(SpielerInfo[playerid][pFalschesPasswort] == 4)Kick(playerid);
                }
Save password....
pawn Код:
DOF2_SetInt(fFile, "Passw", SpielerInfo[playerid][Pass]);
.txt file: Passw = 0
Reply
#2

TIP:
Hash your passwords.
Use y_ini.

Whirlpool plugin (For hashing passwords): https://sampforum.blast.hk/showthread.php?tid=65290
Y_INI: https://sampforum.blast.hk/showthread.php?tid=175565
Reply
#3

Are you sure that you used INI_Close() after saving?
Reply
#4

Remove strval and use whirlpool or SHA512
Reply
#5

Quote:
Originally Posted by Runn3R
Посмотреть сообщение
Remove strval and use whirlpool or SHA512
How? tip please?
Reply
#6

bump, i not fixed it yet.. REP
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)