Added defusedxml to parse untrusted XML data#3636
Merged
fmassa merged 5 commits intopytorch:masterfrom Apr 8, 2021
Merged
Conversation
84df7f4 to
5f75e06
Compare
fmassa
reviewed
Apr 7, 2021
Member
|
One possible solution to the type checking is to disable it for defusedxml, as was done for some other libraries like Lines 63 to 65 in 9e5edbd |
Contributor
Author
|
Thank you @fmassa for your reviews and for merging the previous PRs. I have added the mypy type check disable for the |
facebook-github-bot
pushed a commit
that referenced
this pull request
Apr 13, 2021
Summary: * Added defusedxml to parse untrusted XML data * Added typecheck disable for defusedxml Reviewed By: NicolasHug Differential Revision: D27706948 fbshipit-source-id: 4334745d939c83e763ea5508b6284275c5c7bc32 Co-authored-by: Nicolas Hug <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes an issue pointed out by Bandit w.r.t. using the
xmllibrary to parse untrusted data, by usingdefusedxmlinstead.Bandit output: