summaryrefslogtreecommitdiffstats
path: root/contrib/caldav
diff options
context:
space:
mode:
authorHenrik Grimler <henrik@grimler.se>2020-12-03 17:43:00 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2020-12-19 13:50:46 -0500
commite44613411a61e41ce4b1d43bd9a2460b539e366b (patch)
tree84441578476cdc6bcc82284c711e9e342a17808c /contrib/caldav
parent67068c1ac3fbda190b68215e74ceaf6b3ce8cc00 (diff)
downloadcalcurse-e44613411a61e41ce4b1d43bd9a2460b539e366b.tar.gz
calcurse-e44613411a61e41ce4b1d43bd9a2460b539e366b.zip
calcurse-caldav: allow non-ascii characters in username and password
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'contrib/caldav')
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index 7c9b89b..3644028 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -147,8 +147,8 @@ def calcurse_version():
def get_auth_headers():
if not username or not password:
return {}
- user_password = ('{}:{}'.format(username, password)).encode('ascii')
- user_password = base64.b64encode(user_password).decode('ascii')
+ user_password = ('{}:{}'.format(username, password)).encode('utf-8')
+ user_password = base64.b64encode(user_password).decode('utf-8')
headers = {'Authorization': 'Basic {}'.format(user_password)}
return headers