Ticket #430 (closed defect: fixed)

Opened 4 years ago

Last modified 2 years ago

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

Changed 2 years ago by Torben Brodt

  • status changed from new to closed
  • resolution set to fixed

fixed in [1415]

Note: See TracTickets for help on using tickets.