Skip to content

Commit

Permalink
Merge pull request #6251 from Laerte/master
Browse files Browse the repository at this point in the history
Use defusedxml.xmlrpc
  • Loading branch information
wRAR committed Feb 28, 2024
2 parents 2d46b4a + 008ebb6 commit 415c474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scrapy/http/request/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
import xmlrpc.client as xmlrpclib
from typing import Any, Optional

import defusedxml.xmlrpc

from scrapy.http.request import Request
from scrapy.utils.python import get_func_args

defusedxml.xmlrpc.monkey_patch()

DUMPS_ARGS = get_func_args(xmlrpclib.dumps)


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"packaging",
"tldextract",
"lxml>=4.4.1",
"defusedxml>=0.7.1",
]
extras_require = {
':platform_python_implementation == "CPython"': ["PyDispatcher>=2.0.5"],
Expand Down

0 comments on commit 415c474

Please sign in to comment.