aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-04 18:51:37 -0700
committerzotlabs <mike@macgirvin.com>2017-10-04 18:51:37 -0700
commit15b9a67c01964b83ac724945fe416dd35f66e914 (patch)
treef262ec7e6a28db4dd56744ffd2ebca37e696a81f /Zotlabs
parent80ca99fe5b9f7bb10ffae5789527b7a5d3c4f65e (diff)
downloadvolse-hubzilla-15b9a67c01964b83ac724945fe416dd35f66e914.tar.gz
volse-hubzilla-15b9a67c01964b83ac724945fe416dd35f66e914.tar.bz2
volse-hubzilla-15b9a67c01964b83ac724945fe416dd35f66e914.zip
redirect loop with rmagic and owa
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Magic.php1
-rw-r--r--Zotlabs/Module/Rmagic.php4
2 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Magic.php b/Zotlabs/Module/Magic.php
index d1550ec89..879085f96 100644
--- a/Zotlabs/Module/Magic.php
+++ b/Zotlabs/Module/Magic.php
@@ -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);
}
}
diff --git a/Zotlabs/Module/Rmagic.php b/Zotlabs/Module/Rmagic.php
index 0c4eb9ae4..bfc03f6ec 100644
--- a/Zotlabs/Module/Rmagic.php
+++ b/Zotlabs/Module/Rmagic.php
@@ -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);
}