diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-02-28 22:47:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 22:47:50 +0100 |
commit | be98ea3e63d1a70615f251abfabe281c7788986d (patch) | |
tree | 4c8bf1e1f1f520f265975cd699a6fafe393e7f55 /apps | |
parent | 281c8a49a78c70e19bb88b01f9c13a97472053d2 (diff) | |
parent | 1017f4f34acd75a7a22b9667b60356c43d773496 (diff) | |
download | nextcloud-server-be98ea3e63d1a70615f251abfabe281c7788986d.tar.gz nextcloud-server-be98ea3e63d1a70615f251abfabe281c7788986d.zip |
Merge pull request #43775 from nextcloud/enforce/forbidden_chars
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Capabilities.php | 5 | ||||
-rw-r--r-- | apps/files/openapi.json | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/apps/files/lib/Capabilities.php b/apps/files/lib/Capabilities.php index dc2aae6acfc..0fc95d67226 100644 --- a/apps/files/lib/Capabilities.php +++ b/apps/files/lib/Capabilities.php @@ -39,13 +39,14 @@ class Capabilities implements ICapability { /** * Return this classes capabilities * - * @return array{files: array{bigfilechunking: bool, blacklisted_files: array<mixed>}} + * @return array{files: array{bigfilechunking: bool, blacklisted_files: array<mixed>, forbidden_filename_characters: array<string>}} */ public function getCapabilities() { return [ 'files' => [ 'bigfilechunking' => true, - 'blacklisted_files' => (array)$this->config->getSystemValue('blacklisted_files', ['.htaccess']) + 'blacklisted_files' => (array)$this->config->getSystemValue('blacklisted_files', ['.htaccess']), + 'forbidden_filename_characters' => \OCP\Util::getForbiddenFileNameChars(), ], ]; } diff --git a/apps/files/openapi.json b/apps/files/openapi.json index f9432f6c57c..f9cdb67783d 100644 --- a/apps/files/openapi.json +++ b/apps/files/openapi.json @@ -31,6 +31,7 @@ "required": [ "bigfilechunking", "blacklisted_files", + "forbidden_filename_characters", "directEditing" ], "properties": { @@ -43,6 +44,12 @@ "type": "object" } }, + "forbidden_filename_characters": { + "type": "array", + "items": { + "type": "string" + } + }, "directEditing": { "type": "object", "required": [ |