unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Soham Gumaste <sohamg2@gmail.com>
To: Xiyue Deng <manphiz@gmail.com>
Cc: Michael Albinus <michael.albinus@gmx.de>,
	emacs-devel <emacs-devel@gnu.org>
Subject: Re: Potential bug/inconsistency in auth-source netrc vs plstore backends
Date: Fri, 15 Nov 2024 10:54:07 -0600	[thread overview]
Message-ID: <CAAr-Hh3rySs6d=6cMR3TY_G=KzMOy9zGNuUTFLC5E+w3MWd3ow@mail.gmail.com> (raw)
In-Reply-To: <87ttceljzi.fsf@debian-hx90.lan>

> Hmm, I would expect that a password is associated with an account
> identified by some user ID.  Is there any existing usage of this
> apply-to-all kind of password?
>

The auth-info manual does mention this towards the start, and mentions
that it is a bad idea cause you will get "pwned". SO its not really a
use-case, but the fact is that netrc backend will match an entry even
if it does not have one of the fields eg port from the query.

I think this discrepancy is because the netrc backend uses a custom
netrc parser, whereas the plstore backend simply uses `plstore-find`
[1], which requires every key to be present and match, unless the key
is specified as "t".

This makes my idea harder, as now I either need to store port numbers
in the oauth2 plstore file, or patch plstore or patch gnus, and my
goal is to make minimum viable changes, so its a bit complicated. I
initially thought editing the "returned keys" binding would fix
this,but that is clearly not the case.

Will report back once I have time to hack on this more. Thank you
everyone in this thread for the feedback.

[1]: https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/auth-source.el#n2115


-- 
Soham Gumaste
sohamg2@gmail.com



      reply	other threads:[~2024-11-15 16:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07 20:34 Potential bug/inconsistency in auth-source netrc vs plstore backends Soham Gumaste
2024-11-07 20:43 ` Soham Gumaste
2024-11-07 21:34 ` Xiyue Deng
2024-11-08  2:28   ` Soham Gumaste
2024-11-08  8:40 ` Michael Albinus
2024-11-08 18:00   ` Soham Gumaste
2024-11-08 22:11     ` Xiyue Deng
2024-11-10 18:29       ` Soham Gumaste
2024-11-10 23:58         ` Xiyue Deng
2024-11-15 16:54           ` Soham Gumaste [this message]

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='CAAr-Hh3rySs6d=6cMR3TY_G=KzMOy9zGNuUTFLC5E+w3MWd3ow@mail.gmail.com' \
    --to=sohamg2@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=manphiz@gmail.com \
    --cc=michael.albinus@gmx.de \
    /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).