1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-11 11:51:27 +00:00

encode("iso-8859-1") for shibboleth login (#4667)

Co-authored-by: lian <lian@seafile.com>
This commit is contained in:
lian
2020-09-09 10:36:27 +08:00
committed by GitHub
parent 1d85acbc07
commit 949bdce5c1

View File

@@ -156,10 +156,11 @@ class ShibbolethRemoteUserMiddleware(RemoteUserMiddleware):
p = Profile(user=user.username)
if nickname.strip(): # set nickname when it's not empty
p.nickname = nickname
p.nickname = nickname.encode("iso-8859-1").decode('utf8')
if institution:
p.institution = institution
if contact_email:
p.contact_email = contact_email