mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-07 18:30:54 +00:00
assert sanitized and stripped paths
This commit is contained in:
parent
c08754cf92
commit
5429f5c1a9
19 changed files with 108 additions and 72 deletions
|
@ -30,7 +30,7 @@ class Rights(rights.BaseRights):
|
|||
|
||||
def authorized(self, user, path, permissions):
|
||||
user = user or ""
|
||||
sane_path = pathutils.sanitize_path(path).strip("/")
|
||||
sane_path = pathutils.strip_path(path)
|
||||
# Prevent "regex injection"
|
||||
user_escaped = re.escape(user)
|
||||
sane_path_escaped = re.escape(sane_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue