summaryrefslogtreecommitdiff
path: root/src/commands/zcount.json
diff options
context:
space:
mode:
authorMadelyn Olson <34459052+madolson@users.noreply.github.com>2022-01-24 23:55:30 -0800
committerGitHub <noreply@github.com>2022-01-25 09:55:30 +0200
commit823da54361b4da2769297b8749933e6f731d98f2 (patch)
tree9ff3d14fd0870648d7e71876612f04502a5caf26 /src/commands/zcount.json
parentc275010fffe03ac83c5636ed464d7e57f7d96005 (diff)
downloadredis-823da54361b4da2769297b8749933e6f731d98f2.tar.gz
Improve testing and update flags around commands without ACL keyspec flags (#10167)
This PR aims to improve the flags associated with some commands and adds various tests around these cases. Specifically, it's concerned with commands which declare keys but have no ACL flags (think `EXISTS`), the user needs either read or write permission to access this type of key. This change is primarily concerned around commands in three categories: # General keyspace commands These commands are agnostic to the underlying data outside of side channel attacks, so they are not marked as ACCESS. * TOUCH * EXISTS * TYPE * OBJECT 'all subcommands' Note that TOUCH is not a write command, it could be a side effect of either a read or a write command. # Length and cardinality commands These commands are marked as NOT marked as ACCESS since they don't return actual user strings, just metadata. * LLEN * STRLEN * SCARD * HSTRLEN # Container has member commands These commands return information about the existence or metadata about the key. These commands are NOT marked as ACCESS since the check of membership is used widely in write commands e.g. the response of HSET. * SISMEMBER * HEXISTS # Intersection cardinality commands These commands are marked as ACCESS since they process data to compute the result. * PFCOUNT * ZCOUNT * ZINTERCARD * SINTERCARD
Diffstat (limited to 'src/commands/zcount.json')
-rw-r--r--src/commands/zcount.json3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/zcount.json b/src/commands/zcount.json
index 68fcff320..6572d4a51 100644
--- a/src/commands/zcount.json
+++ b/src/commands/zcount.json
@@ -16,7 +16,8 @@
"key_specs": [
{
"flags": [
- "RO"
+ "RO",
+ "ACCESS"
],
"begin_search": {
"index": {