mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-29 16:55:32 +00:00
Merge pull request #99 from horazont/fix-preauth
Fix issues if authentication is done by web server
This commit is contained in:
commit
f7c7746643
1 changed files with 5 additions and 1 deletions
|
@ -275,7 +275,11 @@ class Application(object):
|
||||||
user, password = self.decode(base64.b64decode(
|
user, password = self.decode(base64.b64decode(
|
||||||
authorization.encode("ascii")), environ).split(":", 1)
|
authorization.encode("ascii")), environ).split(":", 1)
|
||||||
else:
|
else:
|
||||||
user = password = None
|
password = None
|
||||||
|
try:
|
||||||
|
user = environ["REMOTE_USER"]
|
||||||
|
except KeyError:
|
||||||
|
user = None
|
||||||
|
|
||||||
is_authenticated = auth.is_authenticated(user, password)
|
is_authenticated = auth.is_authenticated(user, password)
|
||||||
is_valid_user = is_authenticated or not user
|
is_valid_user = is_authenticated or not user
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue