MCPcopy Index your code
hub / github.com/Python3WebSpider/ProxyPool / get_request_key

Function get_request_key

proxypool/processors/server.py:51–60  ·  view source on GitHub ↗

read the `key` query parameter and validate its format; reject unexpected characters to avoid redis key probing/injection :return: validated key or None

()

Source from the content-addressed store, hash-verified

49
50
51def get_request_key():
52 """
53 read the `key` query parameter and validate its format;
54 reject unexpected characters to avoid redis key probing/injection
55 :return: validated key or None
56 """
57 key = request.args.get('key')
58 if key and not VALID_KEY_PATTERN.match(key):
59 abort(400, description='invalid key parameter')
60 return key
61
62
63def filter_proxies_by_area(proxies, area):

Callers 3

get_proxyFunction · 0.85
get_proxy_allFunction · 0.85
get_countFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected