Skip to content

Commit 5d413ef

Browse files
committed
Only use ids.whitelist.custom if the file is readable.
1 parent e701a64 commit 5d413ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interface/lib/classes/ids.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function start()
6868

6969
// Get whitelist
7070
$whitelist_path = '/usr/local/ispconfig/security/ids.whitelist';
71-
if(is_file('/usr/local/ispconfig/security/ids.whitelist.custom')) $whitelist_path = '/usr/local/ispconfig/security/ids.whitelist.custom';
71+
if(is_readable('/usr/local/ispconfig/security/ids.whitelist.custom')) $whitelist_path = '/usr/local/ispconfig/security/ids.whitelist.custom';
7272
if(!is_file($whitelist_path)) $whitelist_path = realpath(ISPC_ROOT_PATH.'/../security/ids.whitelist');
7373

7474
$whitelist_lines = file($whitelist_path);
@@ -91,7 +91,7 @@ public function start()
9191

9292
// Get HTML fields
9393
$htmlfield_path = '/usr/local/ispconfig/security/ids.htmlfield';
94-
if(is_file('/usr/local/ispconfig/security/ids.htmlfield.custom')) $htmlfield_path = '/usr/local/ispconfig/security/ids.htmlfield.custom';
94+
if(is_readable('/usr/local/ispconfig/security/ids.htmlfield.custom')) $htmlfield_path = '/usr/local/ispconfig/security/ids.htmlfield.custom';
9595
if(!is_file($htmlfield_path)) $htmlfield_path = realpath(ISPC_ROOT_PATH.'/../security/ids.htmlfield');
9696

9797
$htmlfield_lines = file($htmlfield_path);

0 commit comments

Comments
 (0)