dovecot-2.2-pigeonhole: managesieve: Storage quota was not alway...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Wed May 13 17:53:16 UTC 2015
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/ce4709c0ee63
changeset: 2062:ce4709c0ee63
user: Stephan Bosch <stephan at rename-it.nl>
date: Wed May 13 19:52:51 2015 +0200
description:
managesieve: Storage quota was not always enforced properly for scripts uploaded as quoted string.
Nobody does that, but we support it.
diffstat:
src/managesieve/cmd-putscript.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r cf1513460334 -r ce4709c0ee63 src/managesieve/cmd-putscript.c
--- a/src/managesieve/cmd-putscript.c Wed May 13 19:52:43 2015 +0200
+++ b/src/managesieve/cmd-putscript.c Wed May 13 19:52:51 2015 +0200
@@ -183,6 +183,11 @@
/* If quoted string, the size was not known until now */
if ( ctx->script_size == 0 ) {
+ if (sieve_script_get_size(script, &ctx->script_size) < 0) {
+ client_send_storage_error(client, ctx->storage);
+ cmd_putscript_finish(ctx);
+ return TRUE;
+ }
/* Check quota; max size is already checked */
if ( ctx->scriptname != NULL && !managesieve_quota_check_all
(client, ctx->scriptname, ctx->script_size) ) {
More information about the dovecot-cvs
mailing list