An SSRF-preventing wrapper around Python's requests library. Advocate is no longer maintained, please fork and rename if you would like to continue work on it.
Other
92
stars
17
forks
source link
hostname tests are skipped due to incorrect type of `canonname` #26
Hi, when I try to run the pytest, I noticed that hostname-related tests are skipped even when the nameserver supports the AI_CANONNAME flag. This was possibly due to the incorrect type of the expected result when testing for the AI_CANONNAME flag: https://github.com/JordanMilne/Advocate/blob/master/test/test_advocate.py#L55
Hi, when I try to run the
pytest
, I noticed that hostname-related tests are skipped even when the nameserver supports theAI_CANONNAME
flag. This was possibly due to the incorrect type of the expected result when testing for theAI_CANONNAME
flag: https://github.com/JordanMilne/Advocate/blob/master/test/test_advocate.py#L55The cannonname returned by
socket.getaddrinfo
is a string now. ref: https://docs.python.org/3/library/socket.html#socket.getaddrinfoWhen running hostname-related tests,
HostnameTests.test_idn
failed:Similar to the
cannoname
bug, this is also introduced by feeding bytes as thecannoname
in the_is_hostname_allowed
function: https://github.com/JordanMilne/Advocate/blob/master/test/test_advocate.py#L346I can make a PR later for a quick fix of the issues mentioned above