From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Soham Gumaste Newsgroups: gmane.emacs.devel Subject: Re: Potential bug/inconsistency in auth-source netrc vs plstore backends Date: Fri, 15 Nov 2024 10:54:07 -0600 Message-ID: References: <87h68idspm.fsf@gmx.de> <87fro1s7ds.fsf@debian-hx90.lan> <87ttceljzi.fsf@debian-hx90.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15545"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , emacs-devel To: Xiyue Deng Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 15 17:55:30 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tBzbV-0003rU-QP for ged-emacs-devel@m.gmane-mx.org; Fri, 15 Nov 2024 17:55:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBzar-0001uw-VQ; Fri, 15 Nov 2024 11:54:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBzap-0001uo-Vm for emacs-devel@gnu.org; Fri, 15 Nov 2024 11:54:48 -0500 Original-Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBzao-0003x9-95 for emacs-devel@gnu.org; Fri, 15 Nov 2024 11:54:47 -0500 Original-Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-7ee36621734so254634a12.3 for ; Fri, 15 Nov 2024 08:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731689684; x=1732294484; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RyWTPJB9Eq9rLzYhTNjTWrIf6ubBDhSeWGMFzQSt72o=; b=TAn6Gq9SzH14qzQUiELlzMNnevnQOpQEi9x1+KFDD3QQrmVgXQojrnbdrjJNELXTTf Zk7D3Jh+chffSCJ6QNWT8+jEPlQh4QZkqOq+a+qfm78/lsjAOxHJpx4j5imiCkkY6xvu yArN/KcE/fX9XAt+Yg98CVv9Lqf5p0ZXysuDG01ibPWPPPEXhVnNUrsFUpsA+kltDPrg tj1QqjY6/qCgPJiI6ltR1gUziRvRcEkRarQiFhtoGFjQrm3yLgo+GKrV3bWq36tF1mOI Yfr1RCGtaCuWQMMeaa8jPDh4ydAHSwn+Z1Krdw8lgAPq3z6Yn4SbmZtcA76hdrD1zQIU UwVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731689684; x=1732294484; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RyWTPJB9Eq9rLzYhTNjTWrIf6ubBDhSeWGMFzQSt72o=; b=h2ipsolX91XTMT9+ee6Rvzr043/vYIxkcvvkoHQuLIe5QtDgJd1Ow3Q/NTcI5ajtET dC2/WJo/9Xy+Jvyy2dV7Q0CN3swiuxF9Qe0wwAHLoZEMglITvpsnoBWHjmzbrsEcqq3x 6YrqeXVhzgyATFxAyzv6z1qQxifw6gTuMCK3PU83F3oLzW0R86raK3tNe4Wma/jVa2oV fR3thxsbsJYFFGxZMnxez9JDD2fElF2MILy6Fm5FeCWtNzldcchO3SKpCJIyvC3Oskjf 2tIBl3kKbStyLktsUgdPsf6ibOEWrgusNlMo2vLdUSe2WYwQ4DWtjClR3R9iGRxQrkl3 JIFg== X-Forwarded-Encrypted: i=1; AJvYcCWfGrWaKfVcVrGi3zthIBZTmFEOXkwhssTcZvzOwyzfhQsdkuDGjilaNNfxKMWaW0h9s0a+6m5E1+L3Nw==@gnu.org X-Gm-Message-State: AOJu0YzUzD00rejr1/3eBiKGnoN5eoRi4x+YnlnO07ZvV/UyMeASlG5T Mf+KKZSoN8rtIieGygzu+4piEmcan7z+GRpzLSCiIpmFl0fOPR2XdhxvmPT+LRz5FWqgfAuwCUD 7F+Ll04fPDBRUM++oPrCzxzDoRr+YykaO X-Google-Smtp-Source: AGHT+IEP0YimDsD4n2xsROrVMK1JlCaoKSw1QFO8S4EKJV8J3frhWN6cCmY/a9jFiDVRNHiWvo3Nd3em4U0GXec4650= X-Received: by 2002:a05:6a21:6daa:b0:1cf:3a64:cd5c with SMTP id adf61e73a8af0-1dc90b12878mr2008419637.1.1731689684186; Fri, 15 Nov 2024 08:54:44 -0800 (PST) In-Reply-To: <87ttceljzi.fsf@debian-hx90.lan> Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=sohamg2@gmail.com; helo=mail-pg1-x535.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325465 Archived-At: > 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