* [PATCH 1/3] net_reader: fix NNTP credential use
2024-01-10 11:18 6% [PATCH 0/3] lei NNTP + error handling fixes Eric Wong
@ 2024-01-10 11:18 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2024-01-10 11:18 UTC (permalink / raw)
To: meta
Clearly this was never tested until now, as passwords being
retrieved by git-credential got completely ignored and unused.
This enables users to connect to NNTP(S) servers requiring a
password.
---
lib/PublicInbox/NetReader.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index e3e5d596..751043e9 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -291,7 +291,10 @@ sub nn_for ($$$$) { # nn = Net::NNTP
return if $self->{quit};
$nn // die "E: <$uri> new: $@".onion_hint($lei, $uri);
if ($cred) {
- $cred->fill($lei) unless defined($p); # may prompt user here
+ $p //= do {
+ $cred->fill($lei); # may prompt user here
+ $cred->{password};
+ };
if ($nn->authinfo($u, $p)) {
push @{$nntp_cfg->{-postconn}}, [ 'authinfo', $u, $p ];
} else {
^ permalink raw reply related [relevance 7%]
* [PATCH 0/3] lei NNTP + error handling fixes
@ 2024-01-10 11:18 6% Eric Wong
2024-01-10 11:18 7% ` [PATCH 1/3] net_reader: fix NNTP credential use Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2024-01-10 11:18 UTC (permalink / raw)
To: meta
These apply to public-inbox-watch, too, actually. I also
just noticed 3/3 while testing something after 2/3.
Eric Wong (3):
net_reader: fix NNTP credential use
lei+net_reader: show NNTP message in more failures
lei_to_mail: show supported mbox formats on error
lib/PublicInbox/LeiLsMailSource.pm | 6 +++++-
lib/PublicInbox/LeiToMail.pm | 4 +++-
lib/PublicInbox/NetReader.pm | 24 +++++++++++++++---------
3 files changed, 23 insertions(+), 11 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2024-01-10 11:18 6% [PATCH 0/3] lei NNTP + error handling fixes Eric Wong
2024-01-10 11:18 7% ` [PATCH 1/3] net_reader: fix NNTP credential use Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.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).