Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
slingamn opened this issue Oct 31, 2023 · 1 comment
Closed

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

slingamn opened this issue Oct 31, 2023 · 1 comment

Comments

@slingamn
Copy link
Member

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.

@slingamn
Copy link
Member Author

Resolved by #2128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant