user/path value check: add support for no-unicode
This commit is contained in:
@@ -163,8 +163,21 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
|
||||
# Format checks
|
||||
self._validate_user_value = configuration.get("server", "validate_user_value")
|
||||
self._validate_path_value = configuration.get("server", "validate_path_value")
|
||||
logger.info("validate user value: %r", self._validate_user_value)
|
||||
logger.info("validate path value: %r", self._validate_path_value)
|
||||
if not self._storage._filesystem_root_folder_supports_unicode:
|
||||
if self._validate_user_value not in ["strict", "no-unicode"]:
|
||||
self._validate_user_value = "no-unicode"
|
||||
if self._validate_path_value not in ["strict", "no-unicode"]:
|
||||
self._validate_path_value = "no-unicode"
|
||||
if not self._storage._filesystem_root_folder_supports_problematic_chars or not self._storage._filesystem_root_folder_supports_trailing_whitespace:
|
||||
if self._validate_user_value not in ["strict"]:
|
||||
self._validate_user_value = "strict"
|
||||
if self._validate_path_value not in ["strict"]:
|
||||
self._validate_path_value = "strict"
|
||||
logger.notice("validate user value: %r (enforced by missing support of collection storage)", self._validate_user_value)
|
||||
logger.notice("validate path value: %r (enforced by missing support of collection storage)", self._validate_path_value)
|
||||
else:
|
||||
logger.info("validate user value: %r", self._validate_user_value)
|
||||
logger.info("validate path value: %r", self._validate_path_value)
|
||||
# Profiling options
|
||||
self._profiling = configuration.get("logging", "profiling")
|
||||
self._profiling_per_request_min_duration = configuration.get("logging", "profiling_per_request_min_duration")
|
||||
|
||||
Reference in New Issue
Block a user