]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-storage: Add support for "validated attributes"
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 24 Jul 2019 11:42:21 +0000 (14:42 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 30 Jul 2019 08:19:58 +0000 (08:19 +0000)
commitc46ae2baa354c41b7615456b751f74acf015f82c
tree5d00d7e771538b73513c175ab94fe9b387e6c010
parent0b76a8bd4a501226e4b96b64bbbb6501217ecb09
lib-storage: Add support for "validated attributes"

If an attribute is marked with MAIL_ATTRIBUTE_INTERNAL_FLAG_VALIDATED, it's
assumed to be "validated". This means that it has a set() callback that
validates the value, which at minimum means that its size isn't excessively
large.

MAIL_ATTRIBUTE_TYPE_FLAG_VALIDATED can be used with set/get/iterate to allow
access only to these validated attributes. Trying to access non-validated
attributes will result in error.
src/lib-storage/index/index-attribute.c
src/lib-storage/mailbox-attribute.c
src/lib-storage/mailbox-attribute.h