mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-13 18:50:53 +00:00
Improve handling of unsafe user names
This commit is contained in:
parent
6d39a61a51
commit
aac472960f
1 changed files with 7 additions and 1 deletions
|
@ -458,7 +458,13 @@ class Application:
|
||||||
None)
|
None)
|
||||||
if not principal:
|
if not principal:
|
||||||
with self.Collection.acquire_lock("w", user):
|
with self.Collection.acquire_lock("w", user):
|
||||||
self.Collection.create_collection(principal_path)
|
try:
|
||||||
|
self.Collection.create_collection(principal_path)
|
||||||
|
except ValueError as e:
|
||||||
|
self.logger.warning(
|
||||||
|
"Failed to create principal collection %r: %s",
|
||||||
|
principal_path, e)
|
||||||
|
is_authenticated = False
|
||||||
else:
|
else:
|
||||||
self.logger.warning("Access to principal path %r denied by "
|
self.logger.warning("Access to principal path %r denied by "
|
||||||
"rights backend", principal_path)
|
"rights backend", principal_path)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue