Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

Issue Confirmations

  • Yes (0)No (0)
Photo

cannot disable ipban.

Posted by Dastgir on 29 March 2015 - 07:49 AM

We are unable to disable ipban upon fail attempts of wrong password.

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);#endif
If 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.

changed status to: Invalid

Marked as Invalid, seems like I was thinking something else and doing something else o_O.....