Skip to content

Commit

Permalink
plugins: imapsieve: Make sure responses are never sent.
Browse files Browse the repository at this point in the history
Use the new SIEVE_EXECUTE_FLAG_SKIP_RESPONSES flag to prevent any unforseen
mishaps.
  • Loading branch information
stephanbosch committed May 14, 2018
1 parent d1fb7fd commit 84c4f5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plugins/imapsieve/imap-sieve.c
Expand Up @@ -581,7 +581,8 @@ static int imap_sieve_run_scripts
struct sieve_binary *sbin = scripts[i].binary;

cpflags = 0;
exflags = SIEVE_EXECUTE_FLAG_NO_ENVELOPE;
exflags = SIEVE_EXECUTE_FLAG_NO_ENVELOPE |
SIEVE_EXECUTE_FLAG_SKIP_RESPONSES;

user_script = ( script == isrun->user_script );
last_script = script;
Expand Down Expand Up @@ -660,7 +661,8 @@ static int imap_sieve_run_scripts
}

/* Finish execution */
exflags = SIEVE_EXECUTE_FLAG_NO_ENVELOPE;
exflags = SIEVE_EXECUTE_FLAG_NO_ENVELOPE |
SIEVE_EXECUTE_FLAG_SKIP_RESPONSES;
ehandler = (isrun->user_ehandler != NULL ?
isrun->user_ehandler : isieve->master_ehandler);
if ( compile_error == SIEVE_ERROR_TEMP_FAILURE ) {
Expand Down

0 comments on commit 84c4f5f

Please sign in to comment.