Skip to content

Fix ipv6 validation for addresses with brackets #653

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
merged 2 commits into from
Nov 26, 2019

Conversation

skoranda
Copy link
Contributor

@skoranda skoranda commented Nov 26, 2019

Fix ipv6 validation for addresses that include the brackets,
such as [2001:8003:5555:9999:555a:5555:c77:d5c5]. See
https://tools.ietf.org/html/rfc4038#section-5.1 regarding the inclusion
of brackets in the address. The Shibboleth IdP sends ipv6 addresses
that include the brackets.

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?

@codecov
Copy link

codecov bot commented Nov 26, 2019

Codecov Report

Merging #653 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #653      +/-   ##
==========================================
+ Coverage   65.06%   65.08%   +0.02%     
==========================================
  Files         103      103              
  Lines       25599    25602       +3     
==========================================
+ Hits        16655    16664       +9     
+ Misses       8944     8938       -6
Impacted Files Coverage Δ
src/saml2/validate.py 73.64% <100%> (+2.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad83f81...95911d9. Read the comment docs.

@c00kiemon5ter
Copy link
Member

This allows things like "[2001:8003:5555:9999:555a:5555:c77:d5c5" (no closing bracket).

@c00kiemon5ter c00kiemon5ter force-pushed the ipv6_bracket_matching branch 2 times, most recently from 2ae533f to 9a9e440 Compare November 26, 2019 10:44
skoranda and others added 2 commits November 26, 2019 13:33
Fix ipv6 validation for addresses that include the brackets,
such as [2001:8003:5555:9999:555a:5555:c77:d5c5]. See
https://tools.ietf.org/html/rfc4038#section-5.1 regarding the inclusion
of brackets in the address. The Shibboleth IdP sends ipv6 addresses
that include the brackets.
- Make sure enclosing brackets match.
- Use the built-in classes/checks for the IPv6/IPv4 address format.
- Extend tests to bad cases

Signed-off-by: Ivan Kanakarakis <[email protected]>
@c00kiemon5ter c00kiemon5ter merged commit 8379d70 into IdentityPython:master Nov 26, 2019
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