Skip to content

Response with unvalued AudienceRestriction (Condition) Handling #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

peppelinux
Copy link
Member

This PR prevents this exception

saml2/response.py", line 219, in for_me
    if audience.text.strip() == myself:
AttributeError: 'NoneType' object has no attribute 'strip'

When a SP get a Response with an unvalued AudienceRestriction (Condition) like this:

        <saml:Conditions NotBefore="2021-01-24T13:57:51Z" NotOnOrAfter="2021-01-24T14:02:44Z">
            <saml:AudienceRestriction>
                <saml:Audience/>
            </saml:AudienceRestriction>
        </saml:Conditions>

All Submissions:

  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what problem you are trying to solve with this PR?
  • Have you added information on what your changes do and why you chose this as your solution?
  • Have you written new tests for your changes?
  • Does your submission pass tests?
  • This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?

@peppelinux peppelinux force-pushed the unhandled_audience_restr branch from 4a7b000 to f8615e9 Compare January 24, 2021 14:18
@c00kiemon5ter c00kiemon5ter merged commit 569c64f into IdentityPython:master Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants