Problem with Whirlpool
#1

hello!, i have little problem,



LOOK IN TH PIC,
my password not save on mysql? WHY?
but, in samp, th password is hashed?
Reply
#2

Is pPassword is varchar with length >= 129?
Reply
#3

It should be CHAR(128). The extra one cell is only necessary in Pawn because it needs the zero-terminator.
Reply
#4

Quote:
Originally Posted by X337
Посмотреть сообщение
Is pPassword is varchar with length >= 129?
yeah, pPassword is varchar(129)

Quote:
Originally Posted by Vince
Посмотреть сообщение
It should be CHAR(12. The extra one cell is only necessary in Pawn because it needs the zero-terminator.
i changed, but same the problem,
Reply
#5

BUMP! I NEED HELP HERE!
Reply
#6

Show us the pawno code that should save the password too the database, theres most likely something going wrong there
Reply
#7

pawn Код:
// on dialog register & login
case DIALOG_REGISTER:
        {
            if(!response)
            {
                ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_MSGBOX,"Kicked",""chat" You have to register to play in "NAME"","Close","");
                Kick(playerid);
            }
            if(response)
            {
                new str[256];
                if(!strlen(inputtext))
                {
                    format(str,sizeof(str),""chat"Welcome %s to "NAME"",PlayerName(playerid));
                    ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,str,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
                }
                new stringa[500];
                new query[128], nome[24+MAX_PLAYER_NAME];
                GetPlayerName(playerid, nome, 24);
                if(strfind(nome, TAGADMIN, true) == 0)
                {
                    format(stringa, sizeof(stringa), "{FFFFFF}Username {FF4444}%s{FFFFFF}!\nYou must confirm the password protection {FF4444}%s{FFFFFF}.\n{FFFFFF}Enter the admin password and confirm.", nome);
                    ShowPlayerDialog(playerid, DIALOGADMIN, DIALOG_STYLE_INPUT, "{33AA33}Admin Panel", stringa, "Confirm", "Exit");
                }
                WP_Hash(pInfo[playerid][pPassword], 129, inputtext);
                mysql_format(mysql, query, sizeof(query), "INSERT INTO `zmusers` (`Username`, `Password`) VALUES ('%e', '%s')", PlayerName(playerid), pInfo[playerid][pPassword]);
                mysql_tquery(mysql, query, "CreateAkun", "i", playerid);
                printf("[DEBUG HASH PASS] : %s",pInfo[playerid][pPassword]);
                pInfo[playerid][pLogged] = 1;
            }
        }

        case DIALOG_LOGIN:
        {
            if(!response)
            {
                ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_MSGBOX,"Kicked",""chat" You must log-in to play in "NAME"","Close","");
                Kick(playerid);
            }
            if(response)
            {
                new buf[129];
                WP_Hash(buf, sizeof(buf), inputtext);
                if(!strcmp(buf,pInfo[playerid][pPassword]))
                {
                    new stringa[500];
                    new nome[24], query[128];
                    GetPlayerName(playerid, nome, 24);
                    if(strfind(nome, TAGADMIN, true) == 0)
                    {
                        format(stringa, sizeof(stringa), "{FFFFFF}Welcome {FF4444}%s{FFFFFF}!\nYou must confirm the password admin {FF4444}%s{FFFFFF}.\n{FFFFFF}Enter the admin password and confirm.", nome);
                        ShowPlayerDialog(playerid, DIALOGADMIN, DIALOG_STYLE_INPUT, "{33AA33}admin", stringa, "Confirm", "Exit");
                    }
                    mysql_format(mysql, query, sizeof(query), "SELECT * FROM `zmusers` WHERE `Username` = '%e' LIMIT 1", PlayerName(playerid));
                    mysql_tquery(mysql, query, "LoadAkun", "i", playerid);
                    pInfo[playerid][pLogged] = 1;
                    SendClientMessage(playerid,-1,""chat""COL_LGREEN" You have successfully logged in ");
                    SendClientMessage(playerid,-1,""chat""COL_LGREEN" Press Spawn  to start play!");
                }
                else
                {
                    new string[256];
                    format(string,sizeof(string),""chat" Login Panel ",PlayerName(playerid));
                    ShowPlayerDialog(playerid, DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,string,""chat" system detects you have already registered, please login","Login","Quit");
                }
            }
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)