aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-04-22 15:03:19 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2025-04-22 15:03:19 +0200
commit5fe29e2a35dccb823a2d36c5ad05dc2f4735ae35 (patch)
tree475b9d4718c2060f0ffaebf27970cd2ef06408fe /lib
parentefa2cda370fbf433dfb43235a3b271494dc31483 (diff)
downloadnextcloud-server-fix/allow-255-filenames.tar.gz
nextcloud-server-fix/allow-255-filenames.zip
fix: allow files with 255 characters in filenamefix/allow-255-filenames
Align with Linux length limit instead of arbitrary 250 characters. Migration should not be too expensive as only the metadata is updated but no table data is touched. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/FilenameValidator.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/FilenameValidator.php b/lib/private/Files/FilenameValidator.php
index b1979789ec8..e07c07a9208 100644
--- a/lib/private/Files/FilenameValidator.php
+++ b/lib/private/Files/FilenameValidator.php
@@ -180,9 +180,9 @@ class FilenameValidator implements IFilenameValidator {
throw new InvalidDirectoryException($this->l10n->t('Dot files are not allowed'));
}
- // 255 characters is the limit on common file systems (ext/xfs)
- // oc_filecache has a 250 char length limit for the filename
- if (isset($filename[250])) {
+ // 255 characters is the limit on common file systems (ext/xfs) and in general on Linux.
+ // this is also the limit of oc_filecache for the filename
+ if (isset($filename[255])) {
throw new FileNameTooLongException();
}