diff options
author | zotlabs <mike@macgirvin.com> | 2016-10-23 17:46:29 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-10-23 17:46:29 -0700 |
commit | 5c891bcfb55c662bfb5d86b0d5695bd03523e842 (patch) | |
tree | 36448f578c01a9d55f83a956a6f313a595a0303e /Zotlabs/Module | |
parent | 547c70076499010b240ec174696176a2f5de0dc8 (diff) | |
download | volse-hubzilla-5c891bcfb55c662bfb5d86b0d5695bd03523e842.tar.gz volse-hubzilla-5c891bcfb55c662bfb5d86b0d5695bd03523e842.tar.bz2 volse-hubzilla-5c891bcfb55c662bfb5d86b0d5695bd03523e842.zip |
need to perform dbunescbin on stored filenames as well as binary data - this is a no-op under mysql but could provide unpredictable data under postgres
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Cover_photo.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Photos.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Profile_photo.php | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php index 7c8e1323c..72ec1020d 100644 --- a/Zotlabs/Module/Cover_photo.php +++ b/Zotlabs/Module/Cover_photo.php @@ -88,7 +88,7 @@ class Cover_photo extends \Zotlabs\Web\Controller { if($r) { $base_image = $r[0]; - $base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents($base_image['content']) : dbunescbin($base_image['content'])); + $base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents(dbunescbin($base_image['content'])) : dbunescbin($base_image['content'])); $im = photo_factory($base_image['content'], $base_image['mimetype']); if($im->is_valid()) { @@ -320,7 +320,7 @@ class Cover_photo extends \Zotlabs\Web\Controller { } if(intval($r[0]['os_storage'])) - $data = @file_get_contents($r[0]['content']); + $data = @file_get_contents(dbunescbin($r[0]['content'])); else $data = dbunescbin($r[0]['content']); diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php index 1534dcfd6..3f0ab3ab0 100644 --- a/Zotlabs/Module/Photos.php +++ b/Zotlabs/Module/Photos.php @@ -246,7 +246,7 @@ class Photos extends \Zotlabs\Web\Controller { intval($page_owner_uid) ); if(count($r)) { - $d = (($r[0]['os_storage']) ? @file_get_contents($r[0]['content']) : dbunescbin($r[0]['content'])); + $d = (($r[0]['os_storage']) ? @file_get_contents(dbunescbin($r[0]['content'])) : dbunescbin($r[0]['content'])); $ph = photo_factory($d, $r[0]['mimetype']); if($ph->is_valid()) { $rotate_deg = ( (intval($_POST['rotate']) == 1) ? 270 : 90 ); diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php index 8a12e3799..231b80bcf 100644 --- a/Zotlabs/Module/Profile_photo.php +++ b/Zotlabs/Module/Profile_photo.php @@ -98,7 +98,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { if($r) { $base_image = $r[0]; - $base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents($base_image['content']) : dbunescbin($base_image['content'])); + $base_image['content'] = (($r[0]['os_storage']) ? @file_get_contents(dbunescbin($base_image['content'])) : dbunescbin($base_image['content'])); $im = photo_factory($base_image['content'], $base_image['mimetype']); if($im->is_valid()) { @@ -354,7 +354,7 @@ class Profile_photo extends \Zotlabs\Web\Controller { } if(intval($r[0]['os_storage'])) - $data = @file_get_contents($r[0]['content']); + $data = @file_get_contents(dbunescbin($r[0]['content'])); else $data = dbunescbin($r[0]['content']); |