Skip to content

Add IDN support - #986

Open
cicku wants to merge 5 commits into
RsyncProject:masterfrom
cicku:master
Open

Add IDN support#986
cicku wants to merge 5 commits into
RsyncProject:masterfrom
cicku:master

Conversation

@cicku

@cicku cicku commented Jun 7, 2026

Copy link
Copy Markdown

rsync can now connect to IDN (internationalized domain name) hosts, and IDN names are recognized in a daemon's hosts allow/deny.

Closes #851.

rsync can now connect to IDN (internationalized domain name) hosts, and
IDN names are recognized in a daemon's hosts allow/deny.
@cicku

cicku commented Jul 6, 2026

Copy link
Copy Markdown
Author

@tridge requesting a review

@steadytao steadytao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, I have been attending to some personal matters recently. This needs careful review against IDNA/punycode behaviour and daemon allow/deny matching semantics before merge. I would want tests covering Unicode input, punycode input, mixed-case hostnames, invalid IDNs and allow/deny matching to make sure this does not widen host access unexpectedly.

cicku and others added 2 commits July 31, 2026 22:03
The IDNA mapping folds some non-ASCII characters onto ASCII ones, so
running a whole hosts allow/deny token through idn2_to_ascii_8z() could
hand back a pattern the admin never wrote: a "*" (U+FF0A FULLWIDTH
ASTERISK) entry came back as "*" and let every host in.

Convert label by label instead, keeping an ASCII label byte for byte and
using a converted label only when it comes back as a bare A-label. An
ASCII-only config now behaves as it did before there was IDN support, and
a token that cannot be converted is left alone and so matches nothing. The
client side shares the same helper, and neither side truncates a name at
its 1024-byte buffer any more. strlower() folds only ASCII now, since its
one caller is the hosts allow/deny list, which can hold UTF-8.

Adds testsuite/daemon-access-idn and extends testsuite/idn to cover
Unicode, punycode, mixed-case and invalid input on both sides.
@cicku

cicku commented Aug 10, 2026

Copy link
Copy Markdown
Author

Tests added

@cicku
cicku requested a review from steadytao August 10, 2026 04:37
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

Successfully merging this pull request may close these issues.

Feature Request: Support for IDN (Internationalized Domain Names)

2 participants