forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: correctly redact sql constants in ListSessions api
Previously, there was a bug in the redaction of SQL constants for `VIEWACTIVITYREDACTED` users in the `ListSessions` api. Firstly, the range loop used to set the sql query field was manipulating the copy of the query object provided by the range. Secondly, the previous logic when redacting set the `Sql` and `LastActiveQuery` fields to empty strings. This commit sets those fields to equal `SqlNoConstants` and `LastActiveQueryNoConstants` respectively for usability on the client side. Release note (bug fix): constants in sql query fields are correctly removed for VIEWACTIVITYREDACTED users
- Loading branch information
Showing
2 changed files
with
8 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters