Accept "user <name> on|off" ACL rule
Author: tjovicicCreated Sep 11, 2026Updated Sep 11, 2026
Labelsbug
Describe the bug
Dragonfly's ACL file parser rejects lines with fewer than 4 whitespace-separated tokens, including minimal lines like user default off that Redis and Valkey accept.
To Reproduce Create an ACL file containing:
user default offStart Dragonfly with --aclfile=/path/to/file or run ACL LOAD.
Expected behavior Matching Redis/Valkey, the file loads successfully, creating/updating the default user with no additional category/key/pubsub changes beyond.
Actual behavior
ERR Error loading: /path/users.acl Error materializing acl fileRoot cause In acl_family.cc, MaterializeFileContents requires at least 4 tokens per line:
std::vector<std::string_view> cmds = absl::StrSplit(command, ' ', absl::SkipEmpty());
if (!absl::EqualsIgnoreCase(cmds[0], "USER") || cmds.size() < 4) {
return {};
}user default off produces only 3 tokens (USER, default, off), so it's rejected outright.
Source: dragonflydb/dragonfly