Cosmetics

This commit is contained in:
Guillaume Ayoub
2016-08-01 12:50:51 +02:00
parent 711ecf5df2
commit 6bfdcbafec
7 changed files with 8 additions and 7 deletions

View File

@ -104,7 +104,7 @@ class Rights(BaseRights):
self.rights_type = configuration.get("rights", "type").lower()
def authorized(self, user, collection, permission):
user = user or ''
user = user or ""
if user and not storage.is_safe_path_component(user):
# Prevent usernames like "user/calendar.ics"
raise ValueError("Unsafe username")