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

IDN conversion fails with domains containing multiple hyphens #2640

Closed
Rudloff opened this issue May 14, 2020 · 4 comments
Closed

IDN conversion fails with domains containing multiple hyphens #2640

Rudloff opened this issue May 14, 2020 · 4 comments
Milestone

Comments

@Rudloff
Copy link

Rudloff commented May 14, 2020

Guzzle version(s) affected: 6.5.3
PHP version: 7.3.14
cURL version: 7.64.0

Description
With some domains containing multiple hyphens, IDN conversion fails with this error:

PHP Fatal error:  Uncaught GuzzleHttp\Exception\InvalidArgumentException: IDN conversion failed (errors: IDNA_ERROR_HYPHEN_3_4) in /home/pierre/www/alltube/vendor/guzzlehttp/guzzle/src/Utils.php:56

How to reproduce

<?php

use GuzzleHttp\Client;

require_once __DIR__ . '/vendor/autoload.php';

$client = new Client();
$client->get('https://r3---sn-25glene6.example.com/');

Possible Solution
The workaround I am using:

$client = new Client(['idn_conversion' => false]);
@GrahamCampbell
Copy link
Member

I think #2626 should fix your problem. Can you confirm please?

@Rudloff
Copy link
Author

Rudloff commented May 14, 2020

I am using symfony/polyfill-intl-idn 1.17.0.

6606165 does indeed fix the issue.

@GrahamCampbell
Copy link
Member

Great, thanks for confirming.

@gmponos gmponos added this to the 6.5.4 milestone May 20, 2020
@Nyholm
Copy link
Member

Nyholm commented May 23, 2020

Thank you.

#2626 has been merged.

@Nyholm Nyholm closed this as completed May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants