GNU bug report logs - #22081
24.5; netrc.el fails parsing authinfo items spread over multiple lines

Previous Next

Package: emacs;

Reported by: Vasilij Schneidermann <v.schneidermann <at> gmail.com>

Date: Thu, 3 Dec 2015 10:21:01 UTC

Severity: normal

Merged with 12511

Found in versions 24.1, 24.5

Done: Ted Zlatanov <tzz <at> lifelogs.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 22081 <at> debbugs.gnu.org (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Vasilij Schneidermann <v.schneidermann <at> gmail.com>,
 Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 22081 <at> debbugs.gnu.org
Subject: Re: bug#22081: 24.5;
 netrc.el fails parsing authinfo items spread over multiple lines
Date: Thu, 03 Dec 2015 08:55:50 -0500
On Thu, 3 Dec 2015 11:20:29 +0100 Vasilij Schneidermann <v.schneidermann <at> gmail.com> wrote: 

VS> A .netrc or .authinfo file typically contains the credentials for a
VS> specific machine on a single line, but according to netrc(5)
VS> <http://linux.die.net/man/5/netrc> it's allowed to use newlines between
VS> the tokens as well.  Using (netrc-parse) leaves such items out which is
VS> clearly an error in the implementation.

The Emacs implementation in auth-source.el `auth-source-netrc-parse',
which is used by default for netrc files today, is not a
reimplementation of that semi-standard:

* there is no RFC for the netrc format as far as I know

* Emacs supports both single and double quotes around strings (note the
  man page doesn't indicate how tokens are quoted!)

* macdef and default are not explicitly supported

* arbitrary keywords are supported

* the "machine" keyword is not required for an entry

The last two, especially, make it hard to support multi-line entries.
Since there is no RFC to my knowledge and no functional need to spread
entries across multiple lines, I'd like to close this as a WONTFIX. Any
opinions?

(The netrc.el `netrc-parse' code is not actively used nowadays in Emacs,
as far as I know, but hasn't been removed due to my laziness. I see a
single reference to it in gnus/nntp.el. It has some deficiencies that
were improved in `auth-source-netrc-parse', for instance supporting
single-quoted strings. Any objections to removing it? CC to Lars since
he wrote it originally.)

Ted




This bug report was last modified 9 years and 212 days ago.

Previous Next


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