Skip to content

Explicitly forbid DTDs when parsing XML#509

Closed
jkakavas wants to merge 1 commit intoIdentityPython:masterfrom
jkakavas:forbid-dtd
Closed

Explicitly forbid DTDs when parsing XML#509
jkakavas wants to merge 1 commit intoIdentityPython:masterfrom
jkakavas:forbid-dtd

Conversation

@jkakavas
Copy link
Copy Markdown
Member

@jkakavas jkakavas commented Jun 4, 2018

Protect pysaml2 users with insecure underlying XML libraries by
explicitly forbidding DTD in incoming XML SAML messages.

Not sure if this can be reliably tested (because of dependency in
undelying xml libraries
Resolves #508

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?

Protect pysaml2 users with insecure underlying XML libraries by
explicitly forbiding DTD in incoming XML SAML messages.

Resolves IdentityPython#508
@jkakavas jkakavas requested a review from c00kiemon5ter June 4, 2018 07:27
@c00kiemon5ter
Copy link
Copy Markdown
Member

c00kiemon5ter commented Jun 4, 2018

Hi @jkakavas ,

I do not want to have every call to .fromstring pass forbid_dtd. This is very fragile, and will need us to remember that every time we do something with .fromstring in the future. Instead, what will most probably happen, is pysaml2 will define its own xml parser, instead of using the ElementTree default parser. This will be part of #498 and as a result defusedxml package may no longer be needed.

@jkakavas
Copy link
Copy Markdown
Member Author

jkakavas commented Jun 4, 2018

Awesome. My search-foo failed me on this one, I'll try to keep up with the ongoing efforts in a better way. I'll go ahead and close this in favor of #498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants