Fix ACL SETUSER Read/Write key pattern selector (CVE-2024-31227)

The '%' rule must contain one or both of R/W
This commit is contained in:
Oran Agra 2024-10-02 20:01:14 +03:00 committed by YaacovHazan
parent 3a2669e8ae
commit 8ec5da785b
1 changed files with 1 additions and 1 deletions

View File

@ -1066,7 +1066,7 @@ int ACLSetSelector(aclSelector *selector, const char* op, size_t oplen) {
flags |= ACL_READ_PERMISSION;
} else if (toupper(op[offset]) == 'W' && !(flags & ACL_WRITE_PERMISSION)) {
flags |= ACL_WRITE_PERMISSION;
} else if (op[offset] == '~') {
} else if (op[offset] == '~' && flags) {
offset++;
break;
} else {