summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-03-18 13:38:35 +0100
committerGitHub <noreply@github.com>2020-03-18 13:38:35 +0100
commitca54813cbb8f4c6ab6395ef921f3de3d4a834bb3 (patch)
tree89b55d45d0af1f930dab5a33fa725863863eb758 /lib
parent557c4966a02bd06d60f9896658b3cac99c091c85 (diff)
parent3443a006217229061323c655790199e8e1349875 (diff)
downloadnextcloud-server-ca54813cbb8f4c6ab6395ef921f3de3d4a834bb3.tar.gz
nextcloud-server-ca54813cbb8f4c6ab6395ef921f3de3d4a834bb3.zip
Merge pull request #19978 from nextcloud/harden/check_for_owner
Actually check if the owner is not null
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/View.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 90ac1e1988d..8ea94626a2a 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1687,6 +1687,11 @@ class View {
if (!$info) {
throw new NotFoundException($path . ' not found while trying to get owner');
}
+
+ if ($info->getOwner() === null) {
+ throw new NotFoundException($path . ' has no owner');
+ }
+
return $info->getOwner()->getUID();
}