Explorar o código

Update AP Helpers

Daniel Supernault %!s(int64=6) %!d(string=hai) anos
pai
achega
788c8bc640
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Util/ActivityPub/Helpers.php

+ 4 - 0
app/Util/ActivityPub/Helpers.php

@@ -170,6 +170,10 @@ class Helpers {
 
 	public static function fetchFromUrl($url)
 	{
+		$url = self::validateUrl($url);
+		if($url == false) {
+			return;
+		}
 		$res = Zttp::withHeaders(self::zttpUserAgent())->get($url);
 		$res = json_decode($res->body(), true, 8);
 		if(json_last_error() == JSON_ERROR_NONE) {