summaryrefslogtreecommitdiffstats
path: root/lib/public/Files
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-02-09 20:15:29 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-27 13:35:09 +0100
commit8b5997483c852bcee6b44188982073c8213de25f (patch)
treedfa93059b717471deed9840c3ac86586055badab /lib/public/Files
parentd0a6368a8bc9b03cba66c4a485aa001da187b2e3 (diff)
downloadnextcloud-server-8b5997483c852bcee6b44188982073c8213de25f.tar.gz
nextcloud-server-8b5997483c852bcee6b44188982073c8213de25f.zip
Hardening of SimpleFile getContent
if file_get_contents fails remove the file. And traverse up the tree checking if the other folders are there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public/Files')
-rw-r--r--lib/public/Files/SimpleFS/ISimpleFile.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/public/Files/SimpleFS/ISimpleFile.php b/lib/public/Files/SimpleFS/ISimpleFile.php
index e9182377cb5..e03509d7abf 100644
--- a/lib/public/Files/SimpleFS/ISimpleFile.php
+++ b/lib/public/Files/SimpleFS/ISimpleFile.php
@@ -22,6 +22,7 @@
*/
namespace OCP\Files\SimpleFS;
+use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
/**
@@ -67,6 +68,8 @@ interface ISimpleFile {
/**
* Get the content
*
+ * @throws NotPermittedException
+ * @throws NotFoundException
* @return string
* @since 11.0.0
*/