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

PeerTube cannot follow PeerTube instances using an Internationalized Domain Name (IDN) #5142

Open
pietsch opened this issue Jul 24, 2022 · 1 comment

Comments

@pietsch
Copy link

pietsch commented Jul 24, 2022

Describe the current behavior

I want my instance to follow the PeerTube instance tube.bawü.social. When I click the Follow button and paste this hostname into the text area, I get the error message Hosts or handles are invalid. tube.bawü.social is not valid., and the submit button is greyed out.

As you can see, there is an ü umlaut in its domain name. This is called an Internationalized Domain Name (IDN).

Workaround: Currently, to follow an instance that uses an IDN, users have to find out the corresponding Punycode or ACE string (in this case: tube.xn--baw-joa.social) and enter that instead.

Recommendation: This conversion should be done by PeerTube. There are Ruby libraries for this task.

Steps to reproduce

  1. Go to /admin/follows/following-list on your PeerTube instance.
  2. Click the Follow button.
  3. Enter a PeerTube hostname containing an IDN, e.g. tube.bawü.social.

Describe the expected behavior

I should now be able to submit this form by clicking the other Follow button below.

IDNs should be accepted and automatically converted if necessary.

Additional information

  • PeerTube instance: digitalcourage.video

  • Browser name, version and platforms on which you could reproduce the bug: Firefox 102.0.1 on Debian GNU/Linux

@Axeltherabbit
Copy link

I have also noticed looking at the source code that no host validation is done if a handle is provided, so peertube@tube.bawü.social is "fine" but obviously fails when it sends the request

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

3 participants