Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valid IP address rejected #223

Open
1 of 2 tasks
steffann opened this issue Apr 15, 2022 · 0 comments
Open
1 of 2 tasks

Valid IP address rejected #223

steffann opened this issue Apr 15, 2022 · 0 comments

Comments

@steffann
Copy link

Steps to reproduce:

  1. Run:
$environmentType = BunqEnumApiEnvironmentType::PRODUCTION();
$apiKey = 'xxx';
$deviceDescription = 'yyy';
$permittedIps = ['185.54.92.3', '2a00:8642:1000:1::3'];

$apiContext = ApiContext::create(
    $environmentType,
    $apiKey,
    $deviceDescription,
    $permittedIps
);

What should happen:

  1. This should succeed, as the addresses are the correct addresses for this device

What happens:

  1. We get this error message:
PHP Fatal error:  Uncaught bunq\Exception\BunqException: Invalid ip address "2a00:8642:1000:1::3" in /var/www/xxx/bunq/vendor/bunq/sdk_php/src/Util/InstallationUtil.php:216

Traceback

Stack trace:
#0 /var/www/xxx/bunq/vendor/bunq/sdk_php/src/Util/InstallationUtil.php(228): bunq\Util\InstallationUtil::assertIpIsValid()
#1 /var/www/xxx/bunq/vendor/bunq/sdk_php/src/Context/ApiContext.php(113): bunq\Util\InstallationUtil::assertAllIpIsValid()
#2 /var/www/xxx/bunq/context.php(15): bunq\Context\ApiContext::create()
#3 {main}
thrown in /var/www/xxx/bunq/vendor/bunq/sdk_php/src/Util/InstallationUtil.php on line 216

SDK version and environment

Response id

  • Response id:

Extra info:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant