whois: show client-cert fingerprint (276) to everyone, not just opers/self

This commit is contained in:
Jean Chevronnet 2026-08-24 22:25:08 +00:00
parent 009bea734a
commit f36f803d42
No known key found for this signature in database
GPG key ID: 439666D63A9477E4

View file

@ -416,15 +416,14 @@ impl Command for Whois {
&format!("{nick} :is using a secure connection{detail}"), &format!("{nick} :is using a secure connection{detail}"),
); );
} }
// client-cert fingerprint (CertFP) — shown to the user themselves and opers // client-cert fingerprint (CertFP) — visible to everyone; it's derived from
// the certificate the client presents in the handshake, not a secret.
if let Some(fp) = &certfp { if let Some(fp) = &certfp {
if is_self || asker_oper { s.numeric(
s.numeric( uid,
uid, RPL_WHOISCERTFP,
RPL_WHOISCERTFP, &format!("{nick} :has client certificate fingerprint {fp}"),
&format!("{nick} :has client certificate fingerprint {fp}"), );
);
}
} }
// 317: idle time + signon time (hidewhois may suppress it) // 317: idle time + signon time (hidewhois may suppress it)
if !(hide && crate::modules::hidewhois::hide_idle(s)) { if !(hide && crate::modules::hidewhois::hide_idle(s)) {