aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-03 23:08:04 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-03 23:08:04 +0100
commita899ce1c22386b9ff882048cba35d46f560ee654 (patch)
tree892c93a0a3e434b6e8ff8c04d3d7107cf1e12750 /include
parent0ce7358f0f00cb000562dc34be13459eb5779c18 (diff)
parentfae9c236371ba70b2ac7624d6020c76a77c1944d (diff)
downloadvolse-hubzilla-a899ce1c22386b9ff882048cba35d46f560ee654.tar.gz
volse-hubzilla-a899ce1c22386b9ff882048cba35d46f560ee654.tar.bz2
volse-hubzilla-a899ce1c22386b9ff882048cba35d46f560ee654.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include')
-rw-r--r--include/photos.php3
-rw-r--r--include/zid.php25
2 files changed, 28 insertions, 0 deletions
diff --git a/include/photos.php b/include/photos.php
index 5de68f162..503a725cd 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -75,6 +75,9 @@ function photo_upload($channel, $observer, $args) {
$imagedata = @file_get_contents($tmp_name);
@unlink($tmp_name);
}
+ else {
+ $imagedata = @file_get_contents($args['os_syspath']);
+ }
}
else {
$imagedata = @file_get_contents($args['os_syspath']);
diff --git a/include/zid.php b/include/zid.php
index ce9f70385..5ade6b0f8 100644
--- a/include/zid.php
+++ b/include/zid.php
@@ -89,10 +89,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