aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Template/JSConfigHelper.php
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-05-16 16:38:12 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-05-16 16:38:37 +0200
commitdd4901d68962a3139663e1ce156f9a4e604f9903 (patch)
tree034aed5008988fac62181a3cffb1ec7daedb9999 /lib/private/Template/JSConfigHelper.php
parent0e4aa4704404da056d5cd095a95f9bf57844c646 (diff)
downloadnextcloud-server-dd4901d68962a3139663e1ce156f9a4e604f9903.tar.gz
nextcloud-server-dd4901d68962a3139663e1ce156f9a4e604f9903.zip
feat: Add `forbidden_filename_characters` to JSConfig for use in frontend libraries
Add the filename restrictions to our JS config so we can create a common frontend library function to check filename validity (de-duplicate code). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib/private/Template/JSConfigHelper.php')
-rw-r--r--lib/private/Template/JSConfigHelper.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Template/JSConfigHelper.php b/lib/private/Template/JSConfigHelper.php
index d2cd536fa9f..88d09355bde 100644
--- a/lib/private/Template/JSConfigHelper.php
+++ b/lib/private/Template/JSConfigHelper.php
@@ -169,6 +169,7 @@ class JSConfigHelper {
$config = [
'auto_logout' => $this->config->getSystemValue('auto_logout', false),
'blacklist_files_regex' => FileInfo::BLACKLIST_FILES_REGEX,
+ 'forbidden_filename_characters' => Util::getForbiddenFileNameChars(),
'loglevel' => $this->config->getSystemValue('loglevel_frontend',
$this->config->getSystemValue('loglevel', ILogger::WARN)
),