You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failed asserting that exception of type "fin1te\SafeCurl\Exception\InvalidURLException\InvalidDomainException" is thrown.
The "else" branch in the "Check if I'm being called statically" conditional is being taken. There's something wrong with the check when it's done from the context of a PHPUnit test. Perhaps this is related to the comments in https://stackoverflow.com/a/1858577 and it could happen in other PHP contexts as well?
As such, a temporary SafeCurl is being created. Since I'm passing a curlHandle to execute() the creation succeeds. Since I'm not passing an Options to execute() the creation uses a default Options object which doesn't have my explicit whitelist set.
This causes the HTTP request to succeed, when it should fail because "www.gstatic.com" is not on the whitelist.
The text was updated successfully, but these errors were encountered:
safecurl/src/fin1te/SafeCurl/SafeCurl.php
Lines 109 to 119 in a7c3d70
This "Check if called statically" check is brittle in my testing.
For example, the following PHPUnit test fails:
The "else" branch in the "Check if I'm being called statically" conditional is being taken. There's something wrong with the check when it's done from the context of a PHPUnit test. Perhaps this is related to the comments in https://stackoverflow.com/a/1858577 and it could happen in other PHP contexts as well?
As such, a temporary SafeCurl is being created. Since I'm passing a curlHandle to
execute()
the creation succeeds. Since I'm not passing an Options toexecute()
the creation uses a default Options object which doesn't have my explicit whitelist set.This causes the HTTP request to succeed, when it should fail because
"www.gstatic.com"
is not on the whitelist.The text was updated successfully, but these errors were encountered: