diff options
-rw-r--r-- | mod/attach.php | 5 | ||||
-rw-r--r-- | version.inc | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/mod/attach.php b/mod/attach.php index ad5dead07..306e39519 100644 --- a/mod/attach.php +++ b/mod/attach.php @@ -37,7 +37,10 @@ function attach_init(&$a) { header('Content-disposition: attachment; filename="' . $r['data']['filename'] . '"'); if(intval($r['data']['os_storage'])) { $fname = dbunescbin($r['data']['data']); - $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb'); + if(strpos($fname,'store') !== false) + $istream = fopen($fname,'rb'); + else + $istream = fopen('store/' . $c[0]['channel_address'] . '/' . $fname,'rb'); $ostream = fopen('php://output','wb'); if($istream && $ostream) { pipe_streams($istream,$ostream); diff --git a/version.inc b/version.inc index 30304c72c..67da5b0b8 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-11-06.1208 +2015-11-08.1210 |