diff options
author | Max Kostikov <max@kostikov.co> | 2018-12-18 15:10:58 +0100 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2018-12-18 15:10:58 +0100 |
commit | fe80f8179c81a17b3cb429f410b2da1cbd357ae5 (patch) | |
tree | 4832a325e8374f5fd744662c87757687126a7474 | |
parent | 6fc8c174f911b09382b3e106243128096cef9f49 (diff) | |
parent | bc6d384ca91bf754c10ead1d787bf1452c20e9d4 (diff) | |
download | volse-hubzilla-fe80f8179c81a17b3cb429f410b2da1cbd357ae5.tar.gz volse-hubzilla-fe80f8179c81a17b3cb429f410b2da1cbd357ae5.tar.bz2 volse-hubzilla-fe80f8179c81a17b3cb429f410b2da1cbd357ae5.zip |
Merge branch 'channel_b64_enc_mid' into 'dev'
make mod channel deal with b64 encoded mid's
See merge request hubzilla/core!1443
-rw-r--r-- | Zotlabs/Module/Channel.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php index 12d87885f..5fdefd805 100644 --- a/Zotlabs/Module/Channel.php +++ b/Zotlabs/Module/Channel.php @@ -124,6 +124,11 @@ class Channel extends Controller { $mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : ''); + if(strpos($mid,'b64.') === 0) + $decoded = @base64url_decode(substr($mid,4)); + if($decoded) + $mid = $decoded; + $datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : ''); $datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : ''); @@ -375,6 +380,9 @@ class Channel extends Controller { if((! $update) && (! $load)) { + if($decoded) + $mid = 'b64.' . base64url_encode($mid); + // This is ugly, but we can't pass the profile_uid through the session to the ajax updater, // because browser prefetching might change it on us. We have to deliver it with the page. |