Skip to content

Creating usernames with quotes can break ACL LOAD command after executing ACL SAVE #7329

@ullumullu

Description

@ullumullu

Through randomised testing we've stumbled on this problem. Creating a user through the ACL SETUSER command that contains a quote symbol is accepted if proper escaping is in place

ACL SETUSER 'test"user' on >redacted ~* +@all

AUTH 'test"user' redacted
OK

ACL SAVE however doesn't incorporate proper escaping when rewriting the acl file. Hence subsequent ACL LOAD commands will fail with:

/redacted/users.acl:10: unbalanced quotes in acl line. WARNING: ACL errors detected, no change to the previously active ACL rules was performed"

e.g. user.acl file

# Unbalanced quotes - ACL LOAD fails
user mXLGgUa"ls;1jW on #66992d25551e...
# Unbalanced quotes - ACL LOAD fails
user "mXLGgUa"ls;1jW" on #66992d25551e...
# ACL LOAD will work but strip out quotes at the beginning at the end of the username
user "mXLGgUa\"ls;1jW" on #66992d25551e...

Expectation would be that either username with single or double quotes are forbidden. Or some kind of escaping is in place to allow single and double quotes in usernames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions