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
Call ApiContext::create(...) where $permittedIps = ['*'];
What should happen:
Since * is a valid IP according to the API, the SDK should accept it and create a context with a wildcard IP-address.
What happens:
A BunqException('Invalid ip address "*"') is thrown. Upon calling ApiContext::create() the list of IP addresses is checked with InstallationUtil::assetAllIpIsValid(), which only accepts actual IP addresses, not a wildcard.
I'm assuming the API will also validate the list of IPs so I see no reason for the SDK to do this as well. I have checked other SDKs to see if not allowing a wildcard is an intended "feature", but in the Java and C# SDK I do not see such a check. It might be a remnant of when wildcard IPs were not allowed. I do not currently have a workaround that doesn't involve reimplementing ApiContext entirely, because a lot of the required functionality is in either static methods or private methods that my hacky hands can't get to.
The text was updated successfully, but these errors were encountered:
Removing the error would be as simple as making REGEX_IP (found here) accept *, however I am not sure whether that would cause any problems elsewhere in the code.
Steps to reproduce:
ApiContext::create(...)
where$permittedIps = ['*'];
What should happen:
*
is a valid IP according to the API, the SDK should accept it and create a context with a wildcard IP-address.What happens:
BunqException('Invalid ip address "*"')
is thrown. Upon callingApiContext::create()
the list of IP addresses is checked withInstallationUtil::assetAllIpIsValid()
, which only accepts actual IP addresses, not a wildcard.Traceback
SDK version and environment
Response id
Extra info:
I'm assuming the API will also validate the list of IPs so I see no reason for the SDK to do this as well. I have checked other SDKs to see if not allowing a wildcard is an intended "feature", but in the Java and C# SDK I do not see such a check. It might be a remnant of when wildcard IPs were not allowed. I do not currently have a workaround that doesn't involve reimplementing
ApiContext
entirely, because a lot of the required functionality is in either static methods or private methods that my hacky hands can't get to.The text was updated successfully, but these errors were encountered: