diff options
author | Georg Ehrke <developer@georgehrke.com> | 2015-03-13 17:23:02 +0100 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2015-03-16 10:57:01 +0100 |
commit | 09b05373edc48849dc1be43dece326aec0f9cd07 (patch) | |
tree | e6c92e05d65c067c0e52e987ba2f8d860ab1dfab /lib/private/image.php | |
parent | 0d9f149dd93997085b85e2b174f5989a1b996263 (diff) | |
download | nextcloud-server-09b05373edc48849dc1be43dece326aec0f9cd07.tar.gz nextcloud-server-09b05373edc48849dc1be43dece326aec0f9cd07.zip |
validate resource's integrity before using it
Diffstat (limited to 'lib/private/image.php')
-rw-r--r-- | lib/private/image.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/image.php b/lib/private/image.php index 317b6fde160..2484aeecc63 100644 --- a/lib/private/image.php +++ b/lib/private/image.php @@ -283,9 +283,12 @@ class OC_Image { } /** - * @return string Returns the raw image data. + * @return null|string Returns the raw image data. */ function data() { + if (!$this->valid()) { + return null; + } ob_start(); switch ($this->mimeType) { case "image/png": |