Limit username to 30 characters for now (#7085)
This commit is contained in:
parent
0315d395bf
commit
1f56211c2f
|
@ -34,7 +34,7 @@ class DefaultAdapter(object):
|
|||
username_template = utils.get_setting(idp, 'USERNAME_TEMPLATE')
|
||||
try:
|
||||
username = unicode(username_template).format(
|
||||
realm=realm, attributes=saml_attributes, idp=idp)
|
||||
realm=realm, attributes=saml_attributes, idp=idp)[:30]
|
||||
except ValueError:
|
||||
log.error('invalid username template %r'. username_template)
|
||||
except (AttributeError, KeyError, IndexError), e:
|
||||
|
|
Loading…
Reference in New Issue