]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
ACL: If any of the flag set rights were given, STORE FLAGS allowed replacing
authorTimo Sirainen <tss@iki.fi>
Sun, 4 May 2008 21:22:36 +0000 (00:22 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 May 2008 21:22:36 +0000 (00:22 +0300)
all flags (+/-FLAGS worked correctly).

--HG--
branch : HEAD

src/plugins/acl/acl-mailbox.c

index 4d649e20e1450fb2d5b50771bdb79b205773da01..3c5c831aee6eb80e939c79a52e81759daa91ea25 100644 (file)
@@ -155,7 +155,9 @@ acl_mail_update_flags(struct mail *_mail, enum modify_type modify_type,
                /* handle this by first removing the allowed flags and
                   then adding the allowed flags */
                acl_mail_update_flags(_mail, MODIFY_REMOVE, ~flags);
-               acl_mail_update_flags(_mail, MODIFY_ADD, flags);
+               if (flags != 0)
+                       acl_mail_update_flags(_mail, MODIFY_ADD, flags);
+               return;
        }
 
        amail->super.update_flags(_mail, modify_type, flags);