]> git.mxchange.org Git - friendica.git/commitdiff
Use appropriate redirect in dfrn_poll
authorfabrixxm <fabrix.xm@gmail.com>
Sat, 17 Nov 2018 15:12:45 +0000 (16:12 +0100)
committerfabrixxm <fabrix.xm@gmail.com>
Sat, 17 Nov 2018 15:12:45 +0000 (16:12 +0100)
Got an error while remote auth to a local user, where $destination_url
is relative.

mod/dfrn_poll.php

index 9cd110917fb5161dfccbd57dd347b8836e862e27..ecca0adf7c3eade53825611dea2134120e9b8a18 100644 (file)
@@ -562,7 +562,11 @@ function dfrn_poll_content(App $a)
                                        break;
                                default:
                                        $appendix = (strstr($destination_url, '?') ? '&f=&redir=1' : '?f=&redir=1');
-                                       System::externalRedirect($destination_url . $appendix);
+                                       if (filter_var($url, FILTER_VALIDATE_URL)) {
+                                               System::externalRedirect($destination_url . $appendix);
+                                       } else {
+                                               $a->internalRedirect($destination_url . $appendix);
+                                       }
                                        break;
                        }
                        // NOTREACHED