Update AP Helpers

This commit is contained in:
Daniel Supernault 2019-04-04 21:26:10 -06:00
parent 73a9da15f6
commit a07184db58
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -148,7 +148,10 @@ class Helpers {
$host = parse_url($valid, PHP_URL_HOST); $host = parse_url($valid, PHP_URL_HOST);
if(config('costar.enabled') == true) { if(config('costar.enabled') == true) {
if(in_array($host, config('costar.domain.block')) == true) { if(
(config('costar.domain.block') != null && in_array($host, config('costar.domain.block')) == true) ||
(config('costar.actor.block') != null && in_array($url, config('costar.actor.block')) == true)
) {
return false; return false;
} }
} }
@ -163,7 +166,7 @@ class Helpers {
public static function validateLocalUrl($url) public static function validateLocalUrl($url)
{ {
$url = self::validateUrl($url); $url = self::validateUrl($url);
if($url) { if($url == true) {
$domain = config('pixelfed.domain.app'); $domain = config('pixelfed.domain.app');
$host = parse_url($url, PHP_URL_HOST); $host = parse_url($url, PHP_URL_HOST);
$url = $domain === $host ? $url : false; $url = $domain === $host ? $url : false;