GNU bug report logs - #46342
28.0.50; socks-send-command munges IP address bytes to UTF-8

Previous Next

Package: emacs;

Reported by: "J.P." <jp <at> neverwas.me>

Date: Sat, 6 Feb 2021 11:47:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: "J.P." <jp <at> neverwas.me>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: "J.P." <jp <at> neverwas.me>
Cc: 46342 <at> debbugs.gnu.org
Subject: bug#46342: 28.0.50; socks-send-command munges IP address bytes to UTF-8
Date: Tue, 09 Feb 2021 18:14:29 +0200
> From: "J.P." <jp <at> neverwas.me>
> Cc: 46342 <at> debbugs.gnu.org
> Date: Tue, 09 Feb 2021 07:17:29 -0800
> 
> 
> [1:text/plain Hide]
> 
> Eli,
> 
> Apologies for my previous rambling reply. Your time is supremely
> valuable, and I should've been more mindful of that. I'm hoping you'll
> allow me this mulligan (ahem):
> 
> > That depends on what the other end expects.  Does it expect latin-1 in
> > this case?
> 
> Yes.
> 
> > Does emitting the single byte \330 produce the correct result in this
> > case?
> 
> Yes.
> 
> > Then by all means please use
> >
> >    (encode-coding-string address 'latin-1)
> 
> I have updated my changes to reflect this.
> 
> > And those [tor/ssh] expect Latin-1 encoding in this case?
> 
> Yes.
> 
> When you've got a sec, please instruct me on how best to proceed (even
> if that means buggering off 'til I've learned more about Emacs!). :)

(I'd really prefer that someone who knows more than I do about SOCKS
review this.)

If I must do that, I have a question: what kind of string can this
ADDRESS be?  My reading of RFC 1928 is that it normally is an IP
address, in which case encoding is not relevant, as it's an ASCII
string.  But it can also be a domain, right?  If so, what form can
this domain take?  If the domain has non-ASCII characters, shouldn't
it be hex-encoded, or run through IDNA?  I mean, are non-ASCII
characters in that place at all allowed?




This bug report was last modified 4 years and 87 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.