aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2015-04-13 16:18:11 -0700
committerHabeas Codice <habeascodice@federated.social>2015-04-13 16:18:11 -0700
commit213ca7f8b584c9b75f25aa560b1f3eda1e415f54 (patch)
treeff8a7c626f60e962024eb26520d2d9a804ac33fb
parentd3bc721138433b3d4940f0c8ade7ebd39fff9b6e (diff)
downloadvolse-hubzilla-213ca7f8b584c9b75f25aa560b1f3eda1e415f54.tar.gz
volse-hubzilla-213ca7f8b584c9b75f25aa560b1f3eda1e415f54.tar.bz2
volse-hubzilla-213ca7f8b584c9b75f25aa560b1f3eda1e415f54.zip
unquote binary
-rw-r--r--mod/attach.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/attach.php b/mod/attach.php
index cf72d09c6..118c67dd5 100644
--- a/mod/attach.php
+++ b/mod/attach.php
@@ -36,7 +36,8 @@ function attach_init(&$a) {
header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"');
if($r['data']['flags'] & ATTACH_FLAG_OS ) {
- $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $r['data']['data'],'rb');
+ $fname = dbunescbin($r['data']['data']);
+ $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb');
$ostream = fopen('php://output','wb');
if($istream && $ostream) {
pipe_streams($istream,$ostream);
@@ -45,7 +46,7 @@ function attach_init(&$a) {
}
}
else
- echo $r['data']['data'];
+ echo dbunescbin($r['data']['data']);
killme();
}