Skip to content

NS CERT ADD <self> <certfp> should not require privileges #2098

@slingamn

Description

@slingamn

ergo/irc/nickserv.go

Lines 368 to 374 in 5671ee2

CERT examines or modifies the SHA-256 TLS certificate fingerprints that can
be used to log into an account. Specifically, $bCERT LIST$b lists the
authorized fingerprints, $bCERT ADD <fingerprint>$b adds a new fingerprint, and
$bCERT DEL <fingerprint>$b removes a fingerprint. If you're an IRC operator
with the correct permissions, you can act on another user's account, for
example with $bCERT ADD <account> <fingerprint>$b. See the operator manual
for instructions on how to compute the fingerprint.`,

The two-argument case fails without privileges even when the user is trying to act on their own account:

ergo/irc/nickserv.go

Lines 1414 to 1418 in 5671ee2

hasPrivs := client.HasRoleCapabs("accreg")
if target != "" && !hasPrivs {
service.Notice(rb, client.t("Insufficient privileges"))
return
} else if target == "" {

We should detect that the user is acting on themself and make this succeed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions