aboutsummaryrefslogtreecommitdiffstats
path: root/include/zid.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2018-03-27 21:11:34 -0400
committerAndrew Manning <tamanning@zoho.com>2018-03-27 21:11:34 -0400
commit1dc795722a8e748ebb98e8fab778cd4686a0654f (patch)
tree4f4a4e8dea10090106c4d54a02c6860332cd9df4 /include/zid.php
parentdcd658f12ea60945678717e3c310e94ece7b1f96 (diff)
parentc98776923a3aed4a0a17ca1412787de3b718eba9 (diff)
downloadvolse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.tar.gz
volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.tar.bz2
volse-hubzilla-1dc795722a8e748ebb98e8fab778cd4686a0654f.zip
Merge branch 'dev' into oauth2
Diffstat (limited to 'include/zid.php')
-rw-r--r--include/zid.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/zid.php b/include/zid.php
index 67c1d9f6c..5275c6d5a 100644
--- a/include/zid.php
+++ b/include/zid.php
@@ -53,13 +53,13 @@ function zid($s, $address = '') {
$mine = get_my_url();
$myaddr = (($address) ? $address : get_my_address());
- /**
- * @FIXME checking against our own channel url is no longer reliable. We may have a lot
- * of urls attached to our channel. Should probably match against our site, since we
- * will not need to remote authenticate on our own site anyway.
- */
+ $mine_parsed = parse_url($mine);
+ $s_parsed = parse_url($s);
- if ($mine && $myaddr && (! link_compare($mine,$s)))
+ if($mine_parsed['host'] === $s_parsed['host'])
+ $url_match = true;
+
+ if ($mine && $myaddr && (! $url_match))
$zurl = $s . (($num_slashes >= 3) ? '' : '/') . $achar . 'zid=' . urlencode($myaddr);
else
$zurl = $s;
@@ -109,6 +109,7 @@ function clean_query_string($s = '') {
$x = strip_zids(($s) ? $s : \App::$query_string);
$x = strip_owt($x);
$x = strip_zats($x);
+ $x = strip_query_param($x,'sort');
return strip_query_param($x,'f');
}
@@ -346,4 +347,4 @@ function owt_init($token) {
info(sprintf( t('OpenWebAuth: %1$s welcomes %2$s'),\App::get_hostname(), $hubloc['xchan_name']));
logger('OpenWebAuth: auth success from ' . $hubloc['xchan_addr']);
-} \ No newline at end of file
+}