Use appropriate redirect in dfrn_poll

Got an error while remote auth to a local user, where $destination_url
is relative.
This commit is contained in:
fabrixxm 2018-11-17 16:12:45 +01:00
parent f5d58d07e1
commit 1e9e06a325

View file

@ -562,7 +562,11 @@ function dfrn_poll_content(App $a)
break; break;
default: default:
$appendix = (strstr($destination_url, '?') ? '&f=&redir=1' : '?f=&redir=1'); $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; break;
} }
// NOTREACHED // NOTREACHED