unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: 41951@debbugs.gnu.org
Subject: bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap?
Date: Sun, 19 Jul 2020 05:17:18 +0200	[thread overview]
Message-ID: <87blkctcqp.fsf@gnus.org> (raw)
In-Reply-To: <87a6zwci2m.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 18 Jul 2020 20:14:09 -0700")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I think if we did it this way:
>
> (if (or (eq nnimap-authenticator 'anonymous)
> 	(and (null nnimap-authenticator)
> 	     (nnimap-capability "AUTH=ANONYMOUS")))
>     (list "anonymous"
> 	  (message-make-address))
>   ;; normal log in process
>   )
>
> Then we only fall back on anonymous if the user hasn't specified
> anything explicitly. I haven't yet verified that (null
> nnimap-authenticator) does the right thing in this case, though.

The code now is:

	      (if (not (setq credentials
			     (if (eq nnimap-authenticator 'anonymous)
				 (list "anonymous"
				       (message-make-address))
                               ;; Look for the credentials based on
                               ;; the virtual server name and the address
                               (nnimap-credentials
				(gnus-delete-duplicates
				 (list server nnimap-address))
                                ports
                                nnimap-user))))

That call to nnimap-credentials looks into the .authinfo file, and if
the password is present there, it uses it.

So at the very least, the auto-anonymous thing would have to be reversed
in priority -- after the call to nnimap-credentials.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-07-19  3:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 17:41 bug#41951: 28.0.50; Automatically detect AUTH=ANONYMOUS in Gnus nnimap? Eric Abrahamsen
2020-07-19  1:07 ` Lars Ingebrigtsen
2020-07-19  3:14   ` Eric Abrahamsen
2020-07-19  3:17     ` Lars Ingebrigtsen [this message]
2020-07-19  3:20       ` Eric Abrahamsen
2020-07-19  3:21         ` Lars Ingebrigtsen
2020-07-19  4:01           ` Eric Abrahamsen
2020-07-19  4:03             ` Lars Ingebrigtsen
2020-07-19  4:12               ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blkctcqp.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=41951@debbugs.gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).