-
Notifications
You must be signed in to change notification settings - Fork 4.1k
server: error checking in session API is incorrect #76288
Copy link
Copy link
Closed
Labels
A-error-handlingError messages, error propagations/annotationsError messages, error propagations/annotationsA-server-architectureRelates to the internal APIs and src org for server codeRelates 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.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
Describe the problem
This code in server/status.go, getLocalSessions:
errViewActivity ≔ b.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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-error-handlingError messages, error propagations/annotationsError messages, error propagations/annotationsA-server-architectureRelates to the internal APIs and src org for server codeRelates 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.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.