소스 검색

Update AP Helpers

Daniel Supernault 6 년 전
부모
커밋
95807c93e5
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      app/Util/ActivityPub/Helpers.php

+ 5 - 1
app/Util/ActivityPub/Helpers.php

@@ -146,9 +146,13 @@ class Helpers {
 
 		$host = parse_url($valid, PHP_URL_HOST);
 
+		if(count(dns_get_record($host, DNS_A | DNS_AAAA)) == 0) {
+			return false;
+		}
+
 		if(config('costar.enabled') == true) {
 			if(
-				(config('costar.domain.block') != null && in_array($host, config('costar.domain.block')) == true) || 
+				(config('costar.domain.block') != null && Str::contains($host, config('costar.domain.block')) == true) || 
 				(config('costar.actor.block') != null && in_array($url, config('costar.actor.block')) == true)
 			) {
 				return false;