diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-11-29 20:26:00 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-11-29 20:26:00 -0800 |
commit | 650f882265cc0256fa85046baacca9dc6db56d24 (patch) | |
tree | 1b338dcd0a50279c6b78221b2f6b1f6dd66f088c /include/externals.php | |
parent | a2747403f23b0a67b8b154b2526ca7f76b5d844b (diff) | |
download | volse-hubzilla-650f882265cc0256fa85046baacca9dc6db56d24.tar.gz volse-hubzilla-650f882265cc0256fa85046baacca9dc6db56d24.tar.bz2 volse-hubzilla-650f882265cc0256fa85046baacca9dc6db56d24.zip |
generalise the site black|white allow lists, also add a channel black|white list for future use
Diffstat (limited to 'include/externals.php')
-rw-r--r-- | include/externals.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/include/externals.php b/include/externals.php index 4ac9754e2..3a3a32420 100644 --- a/include/externals.php +++ b/include/externals.php @@ -40,19 +40,11 @@ function externals_run($argv, $argc){ $url = $r[0]['site_url']; } - // Note: blacklisted sites must be stored in the config as an array. - // No simple way to turn this into a personal config because we have no identity here. - // For that we probably need a variant of superblock. - $blacklisted = false; - $bl1 = get_config('system','blacklisted_sites'); - if(is_array($bl1) && $bl1) { - foreach($bl1 as $bl) { - if($bl && strpos($url,$bl) !== false) { - $blacklisted = true; - break; - } - } + + if(! check_siteallowed($url)) { + logger('blacklisted site: ' . $url); + $blacklisted = true; } $attempts ++; |