darcs

Issue 2694 IDNs work in HTTP URIs, not in SSH ones

Title IDNs work in HTTP URIs, not in SSH ones
Priority Status unknown
Milestone Resolved in
Superseder Nosy List gpiero
Assigned To
Topics

Created on 2022-12-18.10:41:23 by gpiero, last changed 2023-01-14.19:26:37 by bfrk.

Files
File name Uploaded Type Edit Remove
OpenPGP_0xD36E45316E58CC97.asc bfrk, 2023-01-14.16:09:42 application/pgp-keys
Messages
msg23054 (view) Author: gpiero Date: 2022-12-18.10:41:22
You can use IDNs (Internationalized Domain Names) with an http/https 
scheme, but when using them with the ssh scheme you get something like:

> $ darcs clone ìdn.example.org:repo
> 
> darcs failed:  Not a repository: ìdn.example.org:repo (The program 
> "scp -- ìdn.example.org:repo/_darcs/inventory ./darcs2722-2" failed 
> with error: "ssh: Could not resolve hostname \303\254dn.example.org: 
> Name or service not known
> scp: Connection closed
> ".)
> 
> HINT: Do you have the right URI for the repository?

This is because curl (used with http/https scheme) supports IDNA, but 
OpenSSH (the ssh implementation you'd likely use at least on *nix) 
doesn't. I don't know the outcome on Windows. I couldn't find any hints 
whether OpenSSH will support IDNA on a future version, if it already 
does on a version different from the ones I've tested, or if there's a 
configuration (compile time) switch for it.

For the record, git - being dependent on the same software - has the 
same issue.

FWIW, my take is that IDNs are a possible source of a lot of issues, so 
I will not complain they don't work with ssh schemes. On the contrary, 
I'm not particularly fond of them being accepted with http(s) schemes.

This is most likely a wontfix bug, I'm just filing it for documentation 
purposes.
msg23078 (view) Author: bfrk Date: 2023-01-14.16:09:42
Am 18.12.22 um 11:41 schrieb Gian Piero Carrubba:

> This is because curl (used with http/https scheme) supports IDNA, but

> OpenSSH (the ssh implementation you'd likely use at least on *nix)

> doesn't. I don't know the outcome on Windows. I couldn't find any hints

> whether OpenSSH will support IDNA on a future version, if it already

> does on a version different from the ones I've tested, or if there's a

> configuration (compile time) switch for it.

Also mostly for the record, we do not use any ssh library (Haskell, C or 

otherwise), at least not directly. Instead, accessing remote repos via 

ssh works by running the 'ssh', 'scp', or 'sftp' commands. The 

environment variables DARCS_SSH, DARCS_SCP, and DARCS_SFTP can be used 

to override the standard tools of your distro with other (command line 

compatible) implementations.
Attachments
msg23081 (view) Author: bfrk Date: 2023-01-14.19:26:37
Somehow, replying to bugs@darcs.net via email has messed up the 
formatting of my last message. Sorry about that.
History
Date User Action Args
2022-12-18 10:41:23gpierocreate
2023-01-14 16:09:45bfrksetfiles: + OpenPGP_0xD36E45316E58CC97.asc
messages: + msg23078
2023-01-14 19:26:37bfrksetmessages: + msg23081