[index] Check permissions for cache folder and whitelist file
* The cache folder requires write permissions at all times * The whitelist file requires write permissions if it does not exist (can be created manually)
This commit is contained in:
parent
f1534c91e2
commit
f19d34a5a1
1 changed files with 8 additions and 0 deletions
|
@ -71,6 +71,14 @@ if(!extension_loaded('libxml'))
|
||||||
if(ini_get('allow_url_fopen') !== "1")
|
if(ini_get('allow_url_fopen') !== "1")
|
||||||
die('"allow_url_fopen" is not set to "1". Please check "php.ini');
|
die('"allow_url_fopen" is not set to "1". Please check "php.ini');
|
||||||
|
|
||||||
|
// Check cache folder permissions (write permissions required)
|
||||||
|
if(!is_writable(CACHE_DIR))
|
||||||
|
die('RSS-Bridge does not have write permissions for ' . CACHE_DIR . '!');
|
||||||
|
|
||||||
|
// Check whitelist file permissions (only in DEBUG mode)
|
||||||
|
if(!file_exists('./whitelist.txt') && !is_writable('./'))
|
||||||
|
die('RSS-Bridge does not have write permissions for ' . WHITELIST_FILE . '!');
|
||||||
|
|
||||||
// FIXME : beta test UA spoofing, please report any blacklisting by PHP-fopen-unfriendly websites
|
// FIXME : beta test UA spoofing, please report any blacklisting by PHP-fopen-unfriendly websites
|
||||||
|
|
||||||
$userAgent = 'Mozilla/5.0(X11; Linux x86_64; rv:30.0)';
|
$userAgent = 'Mozilla/5.0(X11; Linux x86_64; rv:30.0)';
|
||||||
|
|
Loading…
Reference in a new issue