New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for https://github.com/HerculesWS/Hercules/issues/2349. #2583
Conversation
|
||
|
||
ALTER TABLE `ipbanlist` MODIFY `list` VARCHAR(13) NOT NULL DEFAULT ''; | ||
INSERT INTO `sql_updates` (`timestamp`) VALUES (1574463539); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this in main.sql too (INSERT for sql_updates)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, sorry. Done!
in this pr also useless merge commit |
Question, some custom plugins which I've saw on the forums add a command called "@ipban", for example, which is a non-automatic way of adding IP Bans. An IP official length is 15 or 16 (xxx.xxx.xxx.xxx). Wouldn't this cause issues when IP bans are not done automatically? (Also, in some rather specific cases, it might be a desired behavior to ban only the specific IP. Yes, I am aware of how dynamic IP works and why we usually use a star.) TL;DR Doesn't this causes issues or SQL errors if there are IP Bans of length 15? PS. Feel free to open an issue about it, if you think it relevant. I'm just curious. |
@pazkero ipban.c: if (SQL_ERROR == SQL->Query(ipban->sql_handle, "INSERT INTO `%s`(`list`,`btime`,`rtime`,`reason`) VALUES ('%u.%u.%u.*', NOW() , NOW() + INTERVAL %u MINUTE ,'Password error ban')",
ipban->dbs->table, p[3], p[2], p[1], login->config->dynamic_pass_failure_ban_duration)) As you can see here, the value inserted is I don't know why this is done. Also for custom source, I guess you would need to manually change sql for now. I will open the issue on your behalf as you have mentioned it. |
Pull Request Prelude
Changes Proposed
ipban_log() only inserts the first 3 octets of an IP and an asterisk for last one, so we can set the columns length of
list
inipbanlist
table to 13.Issues addressed: #2349