IdentityPython / pysaml2

Python implementation of SAML2
Apache License 2.0
548 stars 422 forks source link

Set error log message as : incorrectly_signed_response, when assertion signature verification fails #926

Closed amit12297 closed 9 months ago

amit12297 commented 11 months ago

Description

closes: #927

When assertion signature verification fails, the current code logs a wrong error message at response.py (line number - 794)

Currently it logs: logger.error("correctly_signed_response: %s", exc)

Ideally it should log: logger.error("incorrectly_signed_response: %s", exc)

The feature or problem addressed by this PR
What your changes do and why you chose this solution

Changed the error message when assertion signature verification fails to : logger.error("incorrectly_signed_response: %s", exc)

Checklist

amit12297 commented 11 months ago

I agree that this logline is unclear. correctly_signed_response is the method that is called. The intention was to show the result of the call - this probably belongs to a debug log.

I think the error message should be more descriptive and properly phrased. Here is a suggestion, but feel free to suggest more info.

Ohh, I thought it was mistakenly logged as "correctly" instead of "incorrectly". But I agree that the error message should be more descriptive and the result of the function call should be of debug level. I have made the changes and updated the PR. Kindly re-review.