aboutsummaryrefslogtreecommitdiffstats
path: root/mod/attach.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2015-04-15 11:19:25 +0200
committermrjive <mrjive@mrjive.it>2015-04-15 11:19:25 +0200
commit7b467d6ca7a27bd83388627f16df96b47963c42f (patch)
tree76c7ba2286bb8cb3c031137f394cc3bd02b84c73 /mod/attach.php
parent865b602cf8b4eff5e7da00362df95e52e2fe4f77 (diff)
parent834044b15bf4cd3f436f065449cbc0ed76b4de93 (diff)
downloadvolse-hubzilla-7b467d6ca7a27bd83388627f16df96b47963c42f.tar.gz
volse-hubzilla-7b467d6ca7a27bd83388627f16df96b47963c42f.tar.bz2
volse-hubzilla-7b467d6ca7a27bd83388627f16df96b47963c42f.zip
Merge pull request #1 from redmatrix/master
2015-04-15_1
Diffstat (limited to 'mod/attach.php')
-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();
}