Huge bug
#1

Well, zGaming (by iRage) has a HUGE bug in the script......

Mainly if you log on as someone else, if you place a random/wierd password it still logs you in... And this new version of it, still makes it happen. Anyway to fix it??

Currently
pawn Код:
new file[64], password[256], IP[16], password2[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            WP_Hash(password2, sizeof(password2), inputtext);
            format(password, sizeof(password), "%s", dini_Get(file, "Password"));
            if(strcmp(dini_Get(file, "Password"), password2))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
                ShowDialog(playerid, 2);
                return 1;
            }
before it was

pawn Код:
new file[64], password[256], IP[16], password2[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            WP_Hash(password2, sizeof(password2), inputtext);
            format(password, sizeof(password), "%s", dini_Get(file, "Password"));
            if(!strcmp(dini_Get(file, "Password"), password2))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
                ShowDialog(playerid, 2);
                return 1;
            }
Both do the same thing still.
Reply
#2

Did you make the users folder where you need to have it?
Reply
#3

I tried !strcmp, but it still allowed me to login.
Reply
#4

I had it at (strcmp and it still allowed me to login with any password.... That's what I am telling you....
Reply
#5

Remove the !.
Reply
#6

I already did?


It says

Currently:
pawn Код:
new file[64], password[256], IP[16], password2[256];
            format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
            WP_Hash(password2, sizeof(password2), inputtext);
            format(password, sizeof(password), "%s", dini_Get(file, "Password"));
            if(strcmp(dini_Get(file, "Password"), password2))
            {
                SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: {FFFFFF}Invalid password.");
                ShowDialog(playerid, 2);
                return 1;
            }
Reply
#7

It should be
Код:
if(strcmp(dini_Get(file, "Password"), password2) != 0)
Quote:

Returns -1 if string1 comes before string2
1 if string1 comes after string2
0 if the strings are the same (for the matched length).

PS: Please, do NOT use dini
Reply
#8

Sorry, but I don't see the big picture of Y_INI and DINI.....

Sure, we use tick rates to define if there faster... But the human eye can't detect it I believe. Dini likes me, and I work with it.... Y_INI is faster, who cares? It's not like I'm going to notice it...

Anyways, THANKS!
Reply
#9

Re-bump, still can access it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)