From a1ef66596666355c947b8ef24d216ed7a51c8c56 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Mon, 23 Jan 2012 00:43:37 +0100 Subject: [PATCH] ManageSieve: fixed quota problem in previous change. --- src/managesieve/cmd-putscript.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/managesieve/cmd-putscript.c b/src/managesieve/cmd-putscript.c index 8eb25f306..1b2998ec6 100644 --- a/src/managesieve/cmd-putscript.c +++ b/src/managesieve/cmd-putscript.c @@ -311,7 +311,6 @@ static bool cmd_putscript_continue_parsing(struct client_command_context *cmd) return cmd_putscript_cancel(ctx, TRUE); } - ctx->max_script_size = ctx->script_size; } else { ctx->max_script_size = managesieve_quota_max_script_size(client); } @@ -343,7 +342,8 @@ static bool cmd_putscript_continue_script(struct client_command_context *cmd) if (ctx->save_ctx != NULL) { while (ctx->script_size == 0 || ctx->input->v_offset != ctx->script_size) { - if ( ctx->input->v_offset > ctx->max_script_size ) { + if ( ctx->max_script_size > 0 && + ctx->input->v_offset > ctx->max_script_size ) { (void)managesieve_quota_check_validsize(client, ctx->input->v_offset); cmd_putscript_finish(ctx); return TRUE; -- GitLab