File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/security/safe_requests Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ description = "The security toolkit for the Python community"
1313keywords = [" security" , " appsec" ]
1414dependencies = [
1515 " requests" ,
16+ " security==1.3.1" ,
1617]
1718
1819[project .urls ]
Original file line number Diff line number Diff line change 11from urllib .parse import urlparse
22from urllib .request import urlopen as unsafe_urlopen
3-
4- from requests import get as unsafe_get
53from requests import post as unsafe_post
64
75from security .exceptions import SecurityException
86
97from .host_validators import DefaultHostValidator
8+ from security import safe_requests
109
1110DEFAULT_PROTOCOLS = frozenset (("http" , "https" ))
1211
@@ -58,7 +57,7 @@ def get(
5857 ** kwargs ,
5958):
6059 UrlParser (url ).check (allowed_protocols , host_validator )
61- return unsafe_get (url , params = params , ** kwargs )
60+ return safe_requests . get (url , params = params , ** kwargs )
6261
6362
6463def post (
You can’t perform that action at this time.
0 commit comments