Skip to content

server: error checking in session API is incorrect #76288

@knz

Description

@knz

Describe the problem

This code in server/status.go, getLocalSessions:

errViewActivityb.privilegeChecker.requireViewActivityOrViewActivityRedactedPermission(ctx)
if !isAdmin && errViewActivity != nil {
   ...

is incorrect. If a non-privilege error was encountered inside the requireViewActivity method (e.g. an internal KV error), that error should be returned to the client immediately. The current code "papers over" it.

Jira issue: CRDB-13061

Metadata

Metadata

Assignees

Labels

A-error-handlingError messages, error propagations/annotationsA-server-architectureRelates to the internal APIs and src org for server codeC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions