]> git.mxchange.org Git - friendica.git/blobdiff - src/App.php
Merge pull request #6219 from MrPetovan/task/remove-x
[friendica.git] / src / App.php
index 6f95b8edb7d1994637012409b7f7a078eb965dc3..45d743b0d61d55e5899f3a88b8f26b66f7bb776a 100644 (file)
@@ -1880,7 +1880,7 @@ class App
         */
        public function internalRedirect($toUrl = '', $ssl = false)
        {
-               if (filter_var($toUrl, FILTER_VALIDATE_URL)) {
+               if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
                        throw new InternalServerErrorException("'$toUrl is not a relative path, please use System::externalRedirectTo");
                }
 
@@ -1897,7 +1897,7 @@ class App
         */
        public function redirect($toUrl)
        {
-               if (filter_var($toUrl, FILTER_VALIDATE_URL)) {
+               if (!empty(parse_url($toUrl, PHP_URL_SCHEME))) {
                        Core\System::externalRedirect($toUrl);
                } else {
                        $this->internalRedirect($toUrl);