Merge branch 'master' into 'master'

Manually set URL for IDOR test to workaround newer urllib3/requests versions

See merge request cs3214-staff/pserv!53
This commit is contained in:
gback 2020-08-05 09:22:47 -04:00
commit 3baf28ccae

View File

@ -1419,7 +1419,11 @@ class Access_Control(Doc_Print_Test_Case):
try:
# prevent path segment normalization
req = requests.Request('GET', url)
response = self.session.send(req.prepare(), timeout=2)
prepared_req = req.prepare()
# set the URL manually in case newer requests/urllib3 normalizes URL
# in prepare() function
prepared_req.url = url
response = self.session.send(prepared_req, timeout=2)
except requests.exceptions.RequestException:
raise AssertionError("The server did not respond within 2s")