Fix magic auth for redirects with non profile paths

This commit is contained in:
Michael Vogel 2019-09-29 02:16:09 +02:00
commit 4e9a810206
2 changed files with 4 additions and 7 deletions

View file

@ -192,7 +192,7 @@ function redir_magic($a, $cid, $url)
$serverret = Network::curl($basepath . '/magic');
if ($serverret->isSuccess()) {
$separator = strpos($target_url, '?') ? '&' : '?';
$target_url .= $separator . 'zrl=' . urlencode($visitor);
$target_url .= $separator . 'zrl=' . urlencode($visitor) . '&addr=' . urlencode($contact_url);
Logger::info('Redirecting with magic', ['target' => $target_url, 'visitor' => $visitor, 'contact' => $contact_url]);
$a->redirect($target_url);