X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fredir.php;h=4eb662ee3dc3b9581f2d6fce66d0d122cbd1489f;hb=010ec99b35c2bee8f23060e96c2af3ba5849cf84;hp=cb1ca20e0e0f8d2c9bef12f53fbd90882fdf4178;hpb=f2acce6bb24ef3eb036973bb5d7a14c050a8367d;p=friendica.git diff --git a/mod/redir.php b/mod/redir.php index cb1ca20e0e..4eb662ee3d 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -48,7 +48,7 @@ function redir_init(App $a) { redir_magic($a, $cid, $url); if (empty($cid)) { - throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Contact not found.')); + throw new \Friendica\Network\HTTPException\BadRequestException(DI::l10n()->t('Bad Request.')); } $fields = ['id', 'uid', 'nurl', 'url', 'addr', 'name', 'network', 'poll', 'issued-id', 'dfrn-id', 'duplex', 'pending']; @@ -125,13 +125,10 @@ function redir_init(App $a) { System::externalRedirect($contact['poll'] . '?dfrn_id=' . $dfrn_id . '&dfrn_version=' . DFRN_PROTOCOL_VERSION . '&type=profile&sec=' . $sec . $dest . $quiet); - - redir_check_url($contact_url, $url); - $url = $url ?: $contact_url; } if (empty($url)) { - throw new \Friendica\Network\HTTPException\NotFoundException(DI::l10n()->t('Contact not found.')); + throw new \Friendica\Network\HTTPException\BadRequestException(DI::l10n()->t('Bad Request.')); } // If we don't have a connected contact, redirect with @@ -201,4 +198,4 @@ function redir_check_url(string $contact_url, string $url) Logger::error('URL check host mismatch', ['contact' => $contact_url, 'url' => $url]); throw new \Friendica\Network\HTTPException\ForbiddenException(DI::l10n()->t('Access denied.')); -} \ No newline at end of file +}