add "ascii+" as a special 'path-restrict' value (#4371)

This commit is contained in:
Mike Fährmann
2023-08-01 17:45:04 +02:00
parent c79359eb3a
commit 9d67655397
2 changed files with 5 additions and 2 deletions

View File

@@ -98,6 +98,8 @@ class PathFormat():
restrict = "\\\\|/<>:\"?*"
elif restrict == "ascii":
restrict = "^0-9A-Za-z_."
elif restrict == "ascii+":
restrict = "^0-9@-[\\]-{ #-)+-.;=!}~"
self.clean_segment = self._build_cleanfunc(restrict, replace)
remove = config("path-remove", "\x00-\x1f\x7f")