Projet

Général

Profil

Development #56572

SystemError: <built-in function login_process_response_msg> returned a result with an error set

Ajouté par Sentry Io il y a plus de 2 ans. Mis à jour il y a plus de 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
-
Début:
01 septembre 2021
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/51913/

SystemError: <class 'RuntimeWarning'> returned a result with an error set
SystemError: <built-in function login_process_response_msg> returned a result with an error set
(5 additional frame(s) were not displayed)
...
  File "mellon/views.py", line 141, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "mellon/views.py", line 471, in get
    return self.continue_sso_artifact(request, lasso.HTTP_METHOD_ARTIFACT_GET)
  File "mellon/views.py", line 410, in continue_sso_artifact
    login.processResponseMsg(result.text)
  File "lasso.py", line 2640, in processResponseMsg
    rc = _lasso.login_process_response_msg(self._cptr, str2lasso(response_msg))
response_msg : 

'<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"><s:Body><samlp:ArtifactResponse ID="_4579549C1A4B8C36BA42628B55A416A9" InResponseTo="_C951AEC152B640FE503F6304B3E9C2B3" Version="2.0" IssueInstant="2021-09-01T09:44:33Z"><saml:Issuer>https://connexiondemarches.fontenay-sous-bois.fr/idp/saml2/metadata</saml:Issuer><Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<Canonical...'

Fichiers

Révisions associées

Révision 23035115 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 2 ans

Clear Python error indicator after logging (#56572)

Lasso log using the GLib logging API and the Python binding install a
hook to delegate logging to a Python logger named "lasso".

During the logging call the error indicator can be set to signal an
exception. The indicator will still be set when we return from the Lasso
API call, and is not handled by the Python wrapping of the C functions.
If our function returns a non-NULL value, the Python interpreter will
raise because this situation is forbidden.

To prevent it, if we detect that an exception occurred during logging
calls, we print it to stderr, clear the error indicator and return
immediately.

Historique

#1

Mis à jour par Frédéric Péters il y a plus de 2 ans

  • Projet changé de Suivi des traces à Lasso
#2

Mis à jour par Benjamin Dauvergne il y a plus de 2 ans

  • Assigné à mis à Benjamin Dauvergne

Le logger Lasso ne semble pas initialisé correctement (AttributeError: 'Logger' object has no attribute '_cache') mais surtout je dois soit remonté les erreurs soit au moins les logger dans lasso_python_log.

#3

Mis à jour par Benjamin Dauvergne il y a plus de 2 ans

#4

Mis à jour par Benjamin Dauvergne il y a plus de 2 ans

  • Statut changé de Solution proposée à Résolu (à déployer)
commit 23035115a3cdb3b54e0027e3742974e071d32ed3
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Sat Sep 4 10:44:39 2021 +0200

    Clear Python error indicator after logging (#56572)

    Lasso log using the GLib logging API and the Python binding install a
    hook to delegate logging to a Python logger named "lasso".

    During the logging call the error indicator can be set to signal an
    exception. The indicator will still be set when we return from the Lasso
    API call, and is not handled by the Python wrapping of the C functions.
    If our function returns a non-NULL value, the Python interpreter will
    raise because this situation is forbidden.

    To prevent it, if we detect that an exception occurred during logging
    calls, we print it to stderr, clear the error indicator and return
    immediately.
#5

Mis à jour par Transition automatique il y a plus d'un an

Automatic expiration

Formats disponibles : Atom PDF