Subject: Re: bug#18842: 24.4; gnus not handling passwords with double quotes in .authinfo

From: Ted Zlatanov <[email-masked]>
Date: Sun, 02 Nov 2014 15:58:35 -0500

On Mon, 27 Oct 2014 20:28:32 +0100 David Spångberg <[email-masked]> wrote: 

DS> Andreas Schwab <[email-masked]> writes:
>> Katsumi Yamaoka <[email-masked]> writes:
>> 
>>> IBM says[1]:
>>> If the password phrase itself contains a quotation mark, use
>>> the other style of quotation mark to enclose the password phrase.
>>> 
>>> I.e.: 'test"password'
>>> 
>>> The rule is enough to handle such a case, isn't it?

DS> This solves the problem for me at least.

>> Until you start using both. :-)

DS> IBM further bans using both forms at the same time so I guess it's a
DS> problem with the specification rather than the implementation in
DS> "auth-source.el".

I've explained the situation in the auth.texi manual with this commit to
gnus.git, which will be synchronized into Emacs as well:

commit 01c75b7c8e4ecbdaea6dda97b113a76c60458620
Author: Ted Zlatanov <[email-masked]>
Date:   Sun Nov 2 15:45:34 2014 -0500

    * auth.texi (Help for users): Explain quoting rules better.

Background: the original netrc.el parser just used the Lisp reader. But
that reader doesn't support single-quoted strings, which is the standard
netrc format, so I modified the parser accordingly in gnus.git:

commit 1474b920b7471e4bdb4f983b98fb767d61f8037b
Author: Ted Zlatanov <[email-masked]>
Date:   Sat Jun 15 04:03:04 2013 -0400

    auth-source netrc backend: Support single-quoted strings, multiline entries.

I've never seen passwords or other tokens with both single and double
quotes, so IMO the current parser in `auth-source-netrc-parse-one' is
sufficient.  But I'm happy to take patches or demands for it to support
some other style.  Marking this bug as done, in any case.

Ted