Merge pull request #6155 from fabrixxm/issues/localredirect

Use appropriate redirect in dfrn_poll
pull/6159/head
Tobias Diekershoff 2018-11-17 17:36:04 +01:00 committed by GitHub
commit 381474f314
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View 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