Project

General

Profile

Bug #7447

UnicodeDecodeError at /idp/saml2/sso

Added by Serghei Mihai over 4 years ago. Updated about 4 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
03 Jun 2015
Due date:
% Done:

100%

Patch proposed:
Yes
Planning:
No

Description

While trying to do SSO with a SP:

UnicodeDecodeError at /idp/saml2/sso
'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)
...
Unicode error hint

The string that could not be encoded/decoded was: erghe�� Mih

Raised in

/usr/lib/python2.7/dist-packages/authentic2/idp/saml/saml2_endpoints.py in sso
            set_saml2_response_responder_status_code(login.response,
                lasso.SAML2_STATUS_CODE_INVALID_NAME_ID_POLICY)
            logger.warning('NameID format required is not accepted')
            return finish_sso(request, login)
    else:
        logger.debug('no nameID policy format')
        nid_format = policy.default_name_id_format or 'transient'
        logger.debug('set nameID policy format %s' % nid_format)

0001-fix-user-representation-in-logs-7447.patch View (1.4 KB) Serghei Mihai, 03 Jun 2015 02:30 PM

0001-Fix-all-log-to-log-unicode-strings.patch View (12 KB) Benjamin Dauvergne, 03 Jun 2015 04:17 PM

Associated revisions

Revision 58078a9c (diff)
Added by Benjamin Dauvergne over 4 years ago

Rewrite some logging calls to be sure that arguments are unicode or ASCII strings (fixes #7447)

The rule is that log format string should be ASCII and log format
paramters can be unicode or ASCII string. UTF-8 is forbidden as it
cannot be combined with unicode.

History

#1 Updated by Serghei Mihai over 4 years ago

It's dued to user representation in the logs.

#3 Updated by Serghei Mihai over 4 years ago

Ack.
Thank you

#4 Updated by Benjamin Dauvergne over 4 years ago

  • Status changed from Nouveau to Résolu (à déployer)
  • % Done changed from 0 to 100

#5 Updated by Serghei Mihai about 4 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF