Skip to content

Commit 8a1d8f5

Browse files
author
Till Brehm
committed
Merge branch 'patch-1' into 'stable-3.1'
Only use ids.whitelist.custom if the file is readable. See merge request ispconfig/ispconfig3!1038
2 parents 132706b + 5d413ef commit 8a1d8f5

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)