mirror of
https://github.com/Kozea/Radicale.git
synced 2025-09-30 21:12:05 +00:00
Clean many, many things
This commit is contained in:
parent
263f31c84b
commit
8ac3ce1a89
5 changed files with 240 additions and 239 deletions
|
@ -111,7 +111,7 @@ class Rights(BaseRights):
|
|||
user = user or ""
|
||||
if user and not storage.is_safe_path_component(user):
|
||||
# Prevent usernames like "user/calendar.ics"
|
||||
raise ValueError("Unsafe username")
|
||||
raise ValueError("Refused unsafe username: %s", user)
|
||||
sane_path = storage.sanitize_path(path).strip("/")
|
||||
# Prevent "regex injection"
|
||||
user_escaped = re.escape(user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue