aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-02-28 22:47:50 +0100
committerGitHub <noreply@github.com>2024-02-28 22:47:50 +0100
commitbe98ea3e63d1a70615f251abfabe281c7788986d (patch)
tree4c8bf1e1f1f520f265975cd699a6fafe393e7f55 /apps
parent281c8a49a78c70e19bb88b01f9c13a97472053d2 (diff)
parent1017f4f34acd75a7a22b9667b60356c43d773496 (diff)
downloadnextcloud-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.php5
-rw-r--r--apps/files/openapi.json7
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": [