diff options
author | MichaIng <micha@dietpi.com> | 2022-01-26 15:28:48 +0100 |
---|---|---|
committer | MichaIng <micha@dietpi.com> | 2022-01-26 16:11:50 +0100 |
commit | ba1338e6800d20311155be5f3a5d8c5738e88a62 (patch) | |
tree | a15fa99eb1bb3a97086d17c29ab7bf37c5d6da6d /apps | |
parent | a145edd00db95135bee6f584e21301267fb5ac16 (diff) | |
download | nextcloud-server-ba1338e6800d20311155be5f3a5d8c5738e88a62.tar.gz nextcloud-server-ba1338e6800d20311155be5f3a5d8c5738e88a62.zip |
Return 404 when AJAX tries to list dir content but file given
Due to a code mistake, the expected 404 return when AJAX tries to list a directory content with a non-directory file path given, does not happen. It instead fails with another exception.
This commit restores the original intention to return 404 in the first place when passing a non-directory path with the "dir" parameter.
Signed-off-by: MichaIng <micha@dietpi.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/ajax/list.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index e43e5dd08e8..8a48d4fbe1f 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -38,7 +38,7 @@ $dir = \OC\Files\Filesystem::normalizePath($dir); try { $dirInfo = \OC\Files\Filesystem::getFileInfo($dir); - if (!$dirInfo || !$dirInfo->getType() === 'dir') { + if (!$dirInfo || $dirInfo->getType() !== 'dir') { http_response_code(404); exit(); } |