Y_Ini changepass problem
#1

Hello,
I created a command which allows a user to change his account password. The problem is that, when he entered the password in the dialog, and hit 'Change', the password doesn't change, is still the same.
Here's the change password dialog

pawn Код:
case DIALOG_PASSWORDCHANGE:
        {
            if(!response) return SendClientMessage(playerid, COLOR_RED, "* You cancelled this operation");
            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_PASSWORDCHANGE, DIALOG_STYLE_PASSWORD,"Password manager","Please type your new password:","Done","Cancel");
                new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_Close(File);
                ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Password changed!","Close","");
            }
        }
Reply
#2

bump
Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
DO NOT try write your own password management system, they are too important to get wrong, as you have (udb_hash). Download an existing good user system, of which there are frankly very few.
Uhm.. and where can I find a good one? (I mean, can you link me the best one that u know?)
Btw, I know that the passwords are very important, so, I'm hosted on a my own Linux VPS, and as a expert Linux user I can guarantee you the system is fully secured, you won't find a way to get into the user accounts in every way you will try..
Reply
#4

Here is a tutorial on creating a good secure registration system using Y_INI and Whirlpool (secure hashing).
https://sampforum.blast.hk/showthread.php?tid=270229
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)