mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:35:30 +00:00
redirect loop with rmagic and owa
This commit is contained in:
parent
80ca99fe5b
commit
15b9a67c01
2 changed files with 3 additions and 2 deletions
|
@ -149,6 +149,7 @@ class Magic extends \Zotlabs\Web\Controller {
|
|||
if($j['success'] && $j['token']) {
|
||||
$x = strpbrk($dest,'?&');
|
||||
$args = (($x) ? '&owt=' . $j['token'] : '?f=&owt=' . $j['token']) . (($delegate) ? '&delegate=1' : '');
|
||||
|
||||
goaway($dest . $args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class Rmagic extends \Zotlabs\Web\Controller {
|
|||
if($r) {
|
||||
if($r[0]['hubloc_url'] === z_root())
|
||||
goaway(z_root() . '/login');
|
||||
$dest = z_root() . '/' . str_replace('zid=','zid_=',\App::$query_string);
|
||||
$dest = z_root() . '/' . str_replace(['rmagic','zid='],['','zid_='],\App::$query_string);
|
||||
goaway($r[0]['hubloc_url'] . '/magic' . '?f=&owa=1&dest=' . $dest);
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ class Rmagic extends \Zotlabs\Web\Controller {
|
|||
if($_SESSION['return_url'])
|
||||
$dest = urlencode(z_root() . '/' . str_replace('zid=','zid_=',$_SESSION['return_url']));
|
||||
else
|
||||
$dest = urlencode(z_root() . '/' . str_replace('zid=','zid_=',\App::$query_string));
|
||||
$dest = urlencode(z_root() . '/' . str_replace([ 'rmagic', 'zid=' ] ,[ '', 'zid_='],\App::$query_string));
|
||||
|
||||
goaway($url . '/magic' . '?f=&owa=1&dest=' . $dest);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue