Reject invalid identifiers early in imap_acl_identifier_parse() using
acl_id_is_valid(). This prevents CR/LF injection and rejects identifiers
that are too long, contain control characters or are not valid UTF-8.
Gbp-Pq: Name CVE-2026-40020-2.patch
allow_anyone = set->allow_anyone;
settings_free(set);
+ if (!acl_id_is_valid(id)) {
+ *client_error_r = "Invalid identifier";
+ return -1;
+ }
+
if (str_begins_with(id, IMAP_ACL_GLOBAL_PREFIX)) {
*client_error_r = t_strdup_printf(
"Global ACLs can't be modified: %s", id);