Skip to content

[Bug]: Cant add IDN hostname to federation #53185

@willey-su

Description

@willey-su

⚠️ This issue respects the following points: ⚠️

Bug description

Impossible to add server with non-ascii name to federation.

Steps to reproduce

  1. find nextcloud server with non-ascii hostname
  2. try to add it as trusted server
  3. got error and No DNS record found for in logs

Expected behavior

Server successfully added to trusted list

Nextcloud Server version

31

Operating system

Other

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

Changing (partially reverting a907b74 )
in file
lib/private/Http/Client/DnsPinMiddleware.php

in function addDnsPinning
$targetIps = $this->dnsResolve(idn_to_utf8($hostName), 0)
to
$targetIps = $this->dnsResolve($hostName, 0)

allows to connect add server by entering "punycoded" (ascii) name.

Very brief test revealed no problems after this change.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions