Issue Information
-
#008595
-
0 - None Assigned
-
Invalid
Issue Confirmations
-
Yes (0)No (0)
We are unable to disable ipban upon fail attempts of wrong password.
Cause:
Solution:
Cause:
if( result == 1 && login_config.dynamic_pass_failure_ban ) ipban_log(ip); // log failed password attempt#if PACKETVER >= 20120000 /* not sure when this started */ WFIFOHEAD(fd,26); WFIFOW(fd,0) = 0x83e; WFIFOL(fd,2) = result; if( result != 6 ) memset(WFIFOP(fd,6), '\0', 20); else { // 6 = Your are Prohibited to log in until %s struct mmo_account acc; time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; timestamp2string((char*)WFIFOP(fd,6), 20, unban_time, login_config.date_format); } WFIFOSET(fd,26);#else WFIFOHEAD(fd,23); WFIFOW(fd,0) = 0x6a; WFIFOB(fd,2) = (uint8)result; if( result != 6 ) memset(WFIFOP(fd,3), '\0', 20); else { // 6 = Your are Prohibited to log in until %s struct mmo_account acc; time_t unban_time = ( accounts->load_str(accounts, &acc, sd->userid) ) ? acc.unban_time : 0; timestamp2string((char*)WFIFOP(fd,3), 20, unban_time, login_config.date_format); } WFIFOSET(fd,23);#endifIf result is 1 , it should have check if ipban is enabled or not, if not, then end the function.
Solution:
if( result == 1){ if (!login_config.dynamic_pass_failure_ban )return;ipban_log(ip);}Thanks to @Zeira for pointing this point.
Hmm, seems like editing messed up formatting.
I don't understand, why should it terminate the function?
If you terminate it at that point, it will not show the appropriate message to the client, explaining why the login failed.
If you terminate it at that point, it will not show the appropriate message to the client, explaining why the login failed.
changed status to: Invalid
Marked as Invalid, seems like I was thinking something else and doing something else o_O.....