23.05.2016, 17:28
Hey all,
So I only just found out that my login system has screwed up a bit, and I need some help, but when I get to the logn screen, what happens is you can type any other password and it will let you in, so for example if you set the password to "Hello" you can just use "hi" or just leave it blank and it let's you in, and I'm not sure why it is doing this, but here is the code:
Need some help as I don't now what the hell has gone on here...
So I only just found out that my login system has screwed up a bit, and I need some help, but when I get to the logn screen, what happens is you can type any other password and it will let you in, so for example if you set the password to "Hello" you can just use "hi" or just leave it blank and it let's you in, and I'm not sure why it is doing this, but here is the code:
Код:
if(dialogid == DIALOG_LOGIN) { if(!response) { Kick(playerid); } if(response) { //if(strcmp(PlayerInfo[playerid][pPass], inputtext, true, 129)) if(strcmp(inputtext, PlayerInfo[playerid][pPass], false)) { new Query[500]; mysql_real_escape_string(PlayerInfo[playerid][Nick], PlayerInfo[playerid][Nick]); mysql_format(mysql, Query, sizeof(Query), "SELECT * FROM `playerdata` WHERE `nick` = '%s' LIMIT 1", PlayerInfo[playerid][Nick]); mysql_tquery(mysql, Query, "OnAccountLoad", "i", playerid); } else { ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"{FFFFFF}BCRP - Login","{F81414}You have entered an incorrect password.\n{FFFFFF}Type your password below to login.","Login","Quit"); } } }