Report failed IDENTIFY against a password-less account to the auth feed
All checks were successful
CI / check (push) Successful in 4m10s

This commit is contained in:
Jean Chevronnet 2026-07-19 05:00:12 +00:00
parent 876bc55e2b
commit 1ecb76affb
No known key found for this signature in database
3 changed files with 38 additions and 0 deletions

View file

@ -49,8 +49,11 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
match db.scram_verifier(account_name) {
None => {
// Exists but has no verifier (e.g. cert-only) — a password can't match.
// Report it to the auth feed too, or probing a cert-only account is a
// blind spot the deferred wrong-password path doesn't have.
db.note_auth(account_name, false);
ctx.count("nickserv.identify_fail");
ctx.auth_report(false, Some(account_name), "NickServ IDENTIFY", from.uid, Some("no password set"));
ctx.fail(me, from.uid, "IDENTIFY", "INVALID_CREDENTIALS", "Invalid password. Please try again.");
}
Some((account, verifier)) => {