diff options
author | friendica <redmatrix@redmatrix.me> | 2015-04-14 01:13:38 -0700 |
---|---|---|
committer | friendica <redmatrix@redmatrix.me> | 2015-04-14 01:13:38 -0700 |
commit | 584e9233d4a95e3f8cbc33eaedcc59d3210a66b9 (patch) | |
tree | b6ba8574520d00bdea17fee4de43e7c6082ca0fc /mod | |
parent | 338b80560f12eb54d8d52d4fb42ff4c1507d7574 (diff) | |
parent | 213ca7f8b584c9b75f25aa560b1f3eda1e415f54 (diff) | |
download | volse-hubzilla-584e9233d4a95e3f8cbc33eaedcc59d3210a66b9.tar.gz volse-hubzilla-584e9233d4a95e3f8cbc33eaedcc59d3210a66b9.tar.bz2 volse-hubzilla-584e9233d4a95e3f8cbc33eaedcc59d3210a66b9.zip |
Merge https://github.com/redmatrix/redmatrix into pending_merge
Diffstat (limited to 'mod')
-rw-r--r-- | mod/attach.php | 5 |
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(); } |