diff options
author | git-marijus <mario@mariovavti.com> | 2017-11-04 10:22:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-04 10:22:58 +0100 |
commit | cfbeb1655daba511f4843b8ba070a247e233fb29 (patch) | |
tree | 8ef7bf1e06a5d223228b370121bda97695af7d0e /include/zid.php | |
parent | 1a737be2b408135177a9e94dcffd0f68c0aca90b (diff) | |
parent | 39c194c5c32e49f461b8b42a3f4e411a3a5cde3c (diff) | |
download | volse-hubzilla-cfbeb1655daba511f4843b8ba070a247e233fb29.tar.gz volse-hubzilla-cfbeb1655daba511f4843b8ba070a247e233fb29.tar.bz2 volse-hubzilla-cfbeb1655daba511f4843b8ba070a247e233fb29.zip |
Merge branch 'dev' into docu
Diffstat (limited to 'include/zid.php')
-rw-r--r-- | include/zid.php | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/zid.php b/include/zid.php index 084188770..359b1721f 100644 --- a/include/zid.php +++ b/include/zid.php @@ -95,10 +95,35 @@ function strip_zids($s) { return preg_replace('/[\?&]zid=(.*?)(&|$)/ism','$2',$s); } +function strip_owt($s) { + return preg_replace('/[\?&]owt=(.*?)(&|$)/ism','$2',$s); +} + function strip_zats($s) { return preg_replace('/[\?&]zat=(.*?)(&|$)/ism','$2',$s); } +function strip_auth_query_params() { + + $_SERVER['QUERY_STRING'] = str_replace(array('?f=', '&f='), array('', ''), $_SERVER['QUERY_STRING']); + $_SERVER['QUERY_STRING'] = strip_zids($_SERVER['QUERY_STRING']); + $_SERVER['QUERY_STRING'] = strip_owt($_SERVER['QUERY_STRING']); + + $_SERVER['REQUEST_URI'] = str_replace(array('?f=', '&f='), array('', ''), $_SERVER['REQUEST_URI']); + $_SERVER['REQUEST_URI'] = strip_zids($_SERVER['REQUEST_URI']); + $_SERVER['REQUEST_URI'] = strip_owt($_SERVER['REQUEST_URI']); + + + $_ENV['QUERY_STRING'] = str_replace(array('?f=', '&f='), array('', ''), $_ENV['QUERY_STRING']); + $_ENV['QUERY_STRING'] = strip_zids($_ENV['QUERY_STRING']); + $_ENV['QUERY_STRING'] = strip_owt($_ENV['QUERY_STRING']); + + $_ENV['REQUEST_URI'] = str_replace(array('?f=', '&f='), array('', ''), $_ENV['REQUEST_URI']); + $_ENV['REQUEST_URI'] = strip_zids($_ENV['REQUEST_URI']); + $_ENV['REQUEST_URI'] = strip_owt($_ENV['REQUEST_URI']); + +} + /** * zidify_callback() and zidify_links() work together to turn any HTML a tags with class="zrl" into zid links |