From 1e9e06a325160a7b8707f2a8b828886fd1543afb Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Sat, 17 Nov 2018 16:12:45 +0100 Subject: [PATCH] Use appropriate redirect in dfrn_poll Got an error while remote auth to a local user, where $destination_url is relative. --- mod/dfrn_poll.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mod/dfrn_poll.php b/mod/dfrn_poll.php index 9cd110917f..ecca0adf7c 100644 --- a/mod/dfrn_poll.php +++ b/mod/dfrn_poll.php @@ -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 -- 2.39.5