Ticket #430 (closed defect: fixed)
empty lines result in false htaccess
| Reported by: | vermasslt@… | Owned by: | somebody |
|---|---|---|---|
| Priority: | critical | Milestone: | |
| Component: | ipban | Version: | |
| Keywords: | Cc: |
Description
When someone enters an empty line in the IP-Banlist in ACP the Listener creates an "deny from" line without any parameter in the htaccess. This leads to a http 500 error.
The best way would be to check the $line for a valid IP. The quick and dirty solution would be something like this:
foreach(explode("\n", StringUtil::unifyNewlines($optionsUSER_IPBAN_CONTENT?)) as $line) {
if ( strlen($line) > 4 ) {
$content .= "deny from $line\n";
}
}
Change History
Note: See
TracTickets for help on using
tickets.
