Limit username to 30 characters for now (#7085)

This commit is contained in:
Benjamin Dauvergne 2015-04-29 17:07:14 +02:00 committed by Frédéric Péters
parent 0315d395bf
commit 1f56211c2f
1 changed files with 1 additions and 1 deletions

View File

@ -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: