Avatar

Still confused, me too (General)

by Auge ⌂, Wednesday, November 23, 2016, 15:22 (2682 days ago) @ Magma

Hello

Hey I'm not offended in the slightest. It's just that I'm a novice, I never saw " WHERE time < (NOW()-INTERVAL 10 MINUTE)" in the code of 2.3.7 but I will take another look later.

This code is not part of the version 2.3.7. It's the part of code, you altered in september to the value, you wished (WHERE time < (NOW()-INTERVAL <<<number of minutes>>> MINUTE)). After your thread from september we changed the behaviour and with it, the code to WHERE time < (NOW()-INTERVAL (SELECT CONVERT(`value`,UNSIGNED INTEGER) FROM ".$db_settings['settings_table']." WHERE `name` = 'temp_block_ip_after_repeated_failed_logins') MINUTE)").

The part (SELECT CONVERT(`value`,UNSIGNED INTEGER) FROM ".$db_settings['settings_table']." WHERE `name` = 'temp_block_ip_after_repeated_failed_logins') makes the difference and I thought that you can see this. The query in the file login.inc.php, line #41 has to be commentd and a new query with your own time limit has to be putted aside.

// comment the code in the line 41 with the prefix "//":
   //@mysqli_query($connid, "DELETE FROM ".$db_settings['login_control_table']." WHERE time < (NOW()-INTERVAL (SELECT CONVERT(`value`,UNSIGNED INTEGER) FROM ".$db_settings['settings_table']." WHERE `name` = 'temp_block_ip_after_repeated_failed_logins') MINUTE)");
// insert a new line with the corrected query with your own limit (example: 20 minutes):
   @mysqli_query($connid, "DELETE FROM ".$db_settings['login_control_table']." WHERE time < (NOW()-INTERVAL 20 MINUTE)");

As an additional task: Please inspect the tables mlf2_logincontrol and mlf2_settings with phpMyAdmin. Which value has the setting temp_block_ip_after_repeated_failed_logins? Are there data rows in the table mlf2_logincontrol and, if yes, with which values?

Thank you.

In return, not to be rude to you guys but sometimes it would be better if you treated questioners as baby novices who have no clue about code and just tell us to change this code to this code and actually write the code out. Instead of writing sentences of riddles while thinking we're all coders.

Sorry for my rudeness. You adapted not only one or two parts of code in the last years you were around here. Thatswhy I didn't thought that it would be a riddle for you.

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread