Parcourir la source

Fix whitespace in URL's (#1116 & #1117)

causefx il y a 7 ans
Parent
commit
79f4b1ccb3
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      api/functions/normal-functions.php

+ 1 - 1
api/functions/normal-functions.php

@@ -392,7 +392,7 @@ function qualifyURL($url, $return = false)
 		$url = $protocol . getServer() . $url;
 		$url = $protocol . getServer() . $url;
 	}
 	}
 	// Get Digest
 	// Get Digest
-	$digest = parse_url($url);
+	$digest = parse_url(preg_replace('/\s+/', '', $url));
 	// http/https
 	// http/https
 	if (!isset($digest['scheme'])) {
 	if (!isset($digest['scheme'])) {
 		if (isset($digest['port']) && in_array($digest['port'], array(80, 8080, 8096, 32400, 7878, 8989, 8182, 8081, 6789))) {
 		if (isset($digest['port']) && in_array($digest['port'], array(80, 8080, 8096, 32400, 7878, 8989, 8182, 8081, 6789))) {