Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion edumanage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2778,7 +2778,11 @@ def lookupShibAttr(attrmap, requestMeta):
for attr in attrmap:
if (attr in requestMeta.keys()):
if len(requestMeta[attr]) > 0:
return requestMeta[attr]
# HTTP headers are encoded in latin1 (RFC2616). However, by default
# Shibboleth SP ignores this and puts UTF-8 encoded values into its
# request headers with ShibUseHeaders. So we need to fix up the
# resulting misencoding of accented characters
return bytearray(requestMeta[attr], "iso-8859-1").decode("utf-8")
return ''

# def get_i18n_name(i18n_name, lang, default_lang='en', default_name='unknown'):
Expand Down