redict/tests/unit
Huang Zhw 3b74b55084
Fix "default" and overwritten / reset users will not have pubsub channels permissions by default. (#8723)
Background:
Redis 6.2 added ACL control for pubsub channels (#7993), which were supposed
to be permissive by default to retain compatibility with redis 6.0 ACL. 
But due to a bug, only newly created users got this `acl-pubsub-default` applied,
while overwritten (updated) users got reset to `resetchannels` (denied).

Since the "default" user exists before loading the config file,
any ACL change to it, results in an update / overwrite.

So when a "default" user is loaded from config file or include ACL
file with no channels related rules, the user will not have any
permissions to any channels. But other users will have default
permissions to any channels.

When upgraded from 6.0 with config rewrite, this will lead to
"default" user channels permissions lost.
When users are loaded from include file, then call "acl load", users
will also lost channels permissions.

Similarly, the `reset` ACL rule, would have reset the user to be denied
access to any channels, ignoring `acl-pubsub-default` and breaking
compatibility with redis 6.0.

The implication of this fix is that it regains compatibility with redis 6.0,
but breaks compatibility with redis 6.2.0 and 2.0.1. e.g. after the upgrade,
the default user will regain access to pubsub channels.

Other changes:
Additionally this commit rename server.acl_pubusub_default to
server.acl_pubsub_default and fix typo in acl tests.
2021-04-05 23:13:20 +03:00
..
moduleapi Missing EXEC on modules propagation after failed EVAL execution (#8654) 2021-03-15 21:19:57 +02:00
type Fix XAUTOCLAIM response to return the next available id as the cursor (#8725) 2021-04-01 12:13:55 +03:00
acl.tcl Fix "default" and overwritten / reset users will not have pubsub channels permissions by default. (#8723) 2021-04-05 23:13:20 +03:00
aofrw.tcl AOF: run tests with preamble off when it makes sense. 2018-03-25 13:03:38 +02:00
auth.tcl Handle binary safe string for REQUIREPASS and MASTERAUTH directives (#8200) 2020-12-17 09:26:33 -08:00
bitfield.tcl Fix BITFIELD_RO test. 2020-03-23 12:02:12 +01:00
bitops.tcl Regression test for #3282. 2016-06-15 11:49:49 +02:00
dump.tcl Fix recent test failures (#8386) 2021-01-23 21:53:58 +02:00
expire.tcl EXPIRE, EXPIREAT, SETEX, GETEX: Return error when expire time overflows (#8287) 2021-02-21 09:09:54 +02:00
geo.tcl Fix GEOSEARCH tcl test error (#8451) 2021-02-04 19:39:07 +02:00
hyperloglog.tcl Squash merging 125 typo/grammar/comment/doc PRs (#7773) 2020-09-10 13:43:38 +03:00
info.tcl Use addReplyErrorObject with shared.noscripterr (#8544) 2021-02-24 08:45:13 -08:00
introspection-2.tcl EXISTS should not alter LRU, OBJECT should not reveal expired keys on replica (#8016) 2020-11-18 11:16:21 +02:00
introspection.tcl re-fix config rewrite for empty save directive (#8722) 2021-03-30 22:49:06 +03:00
keyspace.tcl Improve dbid range check for SELECT, MOVE, COPY (#8085) 2020-12-01 21:41:26 +02:00
latency-monitor.tcl Add a --no-latency tests flag. (#7939) 2020-10-22 11:10:53 +03:00
lazyfree.tcl Test: basic lazyfree unit test. 2015-10-09 09:47:17 +02:00
limits.tcl Add io-thread daily CI tests. (#8232) 2021-01-17 15:48:48 +02:00
maxmemory.tcl Fix flaky unit/maxmemory test on MacOS/BSD. (#8619) 2021-03-08 20:53:53 +02:00
memefficiency.tcl Skip defrag tests on systems with bigger page sizes (#8294) 2021-01-08 10:03:21 +02:00
multi.tcl Swapdb should make transaction fail if there is any client watching keys (#8239) 2021-01-04 14:48:28 +02:00
networking.tcl fix new networking tests to work when the test suite is used in tls mode (#8582) 2021-03-01 20:53:02 +02:00
obuf-limits.tcl Fix new obuf-limits tests to work with TLS (#7848) 2020-09-27 17:13:33 +03:00
oom-score-adj.tcl Fix timing error oom-score-adj test (#8513) 2021-02-19 13:01:25 +02:00
other.tcl Remove cron saving during BGSAVE test. (#8688) 2021-03-24 15:14:47 +02:00
pause.tcl Add io-thread daily CI tests. (#8232) 2021-01-17 15:48:48 +02:00
pendingquerybuf.tcl Slave removal: remove slave from top-level tests descriptions. 2018-09-11 15:32:28 +02:00
printver.tcl Print version info before running the test 2011-05-20 11:44:54 +02:00
protocol.tcl Add io-thread daily CI tests. (#8232) 2021-01-17 15:48:48 +02:00
pubsub.tcl Add io-thread daily CI tests. (#8232) 2021-01-17 15:48:48 +02:00
quit.tcl Add tests for OK on QUIT 2010-10-15 12:54:53 +02:00
scan.tcl Add io-thread daily CI tests. (#8232) 2021-01-17 15:48:48 +02:00
scripting.tcl Restore old client 'processCommandAndResetClient' to fix false dead client indicator (#8715) 2021-03-29 13:34:16 +03:00
shutdown.tcl Fix new obuf-limits tests to work with TLS (#7848) 2020-09-27 17:13:33 +03:00
slowlog.tcl Fix SLOWLOG for blocked commands (#8632) 2021-03-25 10:20:27 +02:00
sort.tcl Config: Add quicklist, remove old list options 2015-01-02 11:16:10 -05:00
tls.tcl Add support for reading encrypted keyfiles. (#8644) 2021-03-22 13:27:46 +02:00
tracking.tcl Client tracking tracking-redir-broken push len is 2 not 3 (#8456) 2021-02-21 09:34:46 +02:00
wait.tcl Add io-thread daily CI tests. (#8232) 2021-01-17 15:48:48 +02:00