-
Notifications
You must be signed in to change notification settings - Fork 24.4k
ACL default newly created user set USER_FLAG_SANITIZE_PAYLOAD flag #11279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Starting from 6.2, after ACL SETUSER user reset, the user will carry the sanitize-payload flag. I guess it was added by mistake in redis#7807, reset means reverting to default. Added tests to make sure it won't be broken in the future, and updated the comment in ACLSetUser. Fixes redis#11278
|
now i wonder if we really need to backport this fix to 7.0 and 6.2. it doesn't have any implications on redis, but it does have on |
yes, maybe. but i don't think people will rely on it, i think people rarely use ACL SETUSER reset? even if it use it, i think this noise is not a problem. I think we can backport this fix to 7.0, and leave 6.2 as is, if we think the noise will be a problem |
|
i discussed this with Yossi now, and he feels that it's better to keep this change out of 7.0 since there's a chance it'll break some app. specifically because this flag and it's syntax is probably not handled by users who interpret ACL LIST since (this is niche flag, and because of the bug, people didn't bother to add support for it when 6.2 came out). the other alternative is to make it a tri-state flag (0,1,2), where 0 is is an implicit sanitize and 1 is an explicit one, so in essence officially supporting what we had when 6.2 release. |
so should we take this alternative? like i need to remove the change in or we postpone it until 7.2 (with a better way to solve it) |
|
thought about it again.. even with the tri-state, i can argue that there's no rush to fix it in 7.0. so the bottom line is, we'll keep the current code, and just avoid backporting it to 7.0 |
|
yeah. sounds good to me |
…edis#11279) Starting from 6.2, after ACL SETUSER user reset, the user will carry the sanitize-payload flag. It was added in redis#7807, and then ACL SETUSER reset is inconsistent with default newly created user which missing sanitize-payload flag. Same as `off` and `on` these two bits are mutually exclusive, the default created user needs to have sanitize-payload flag. Adds USER_FLAG_SANITIZE_PAYLOAD flag to ACLCreateUser. Note that the bug don't have any real implications, since the code in rdb.c (rdbLoadObject) checks for `USER_FLAG_SANITIZE_PAYLOAD_SKIP`, so the fact that `USER_FLAG_SANITIZE_PAYLOAD` is missing doesn't really matters. Added tests to make sure it won't be broken in the future, and updated the comment in ACLSetUser and redis.conf
…edis#11279) Starting from 6.2, after ACL SETUSER user reset, the user will carry the sanitize-payload flag. It was added in redis#7807, and then ACL SETUSER reset is inconsistent with default newly created user which missing sanitize-payload flag. Same as `off` and `on` these two bits are mutually exclusive, the default created user needs to have sanitize-payload flag. Adds USER_FLAG_SANITIZE_PAYLOAD flag to ACLCreateUser. Note that the bug don't have any real implications, since the code in rdb.c (rdbLoadObject) checks for `USER_FLAG_SANITIZE_PAYLOAD_SKIP`, so the fact that `USER_FLAG_SANITIZE_PAYLOAD` is missing doesn't really matters. Added tests to make sure it won't be broken in the future, and updated the comment in ACLSetUser and redis.conf
Starting from 6.2, after ACL SETUSER user reset, the user
will carry the sanitize-payload flag. It was added in #7807,
and then ACL SETUSER reset is inconsistent with default
newly created user which missing sanitize-payload flag.
Same as
offandonthese two bits are mutually exclusive,the default created user needs to have sanitize-payload flag.
Adds USER_FLAG_SANITIZE_PAYLOAD flag to ACLCreateUser.
Note that the bug don't have any real implications,
since the code in rdb.c (rdbLoadObject) checks for
USER_FLAG_SANITIZE_PAYLOAD_SKIP, so the fact thatUSER_FLAG_SANITIZE_PAYLOADis missing doesn't really matters.Added tests to make sure it won't be broken in the future,
and updated the comment in ACLSetUser and redis.conf
Fixes #11278