Skip to content
Snippets Groups Projects
Commit 42223b14 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

lib-sieve: editheader: fixed implicit keep after runtime error.

It did not use the original message in this case.
parent a700efef
No related branches found
No related tags found
No related merge requests found
...@@ -467,7 +467,7 @@ static bool act_store_execute ...@@ -467,7 +467,7 @@ static bool act_store_execute
struct act_store_transaction *trans = struct act_store_transaction *trans =
(struct act_store_transaction *) tr_context; (struct act_store_transaction *) tr_context;
struct mail *mail = ( action->mail != NULL ? struct mail *mail = ( action->mail != NULL ?
action->mail : sieve_message_get_mail(aenv->msgctx) ); action->mail : aenv->msgdata->mail );
struct mail_save_context *save_ctx; struct mail_save_context *save_ctx;
struct mail_keywords *keywords = NULL; struct mail_keywords *keywords = NULL;
bool result = TRUE; bool result = TRUE;
......
...@@ -66,3 +66,34 @@ test "Invalid field value" { ...@@ -66,3 +66,34 @@ test "Invalid field value" {
} }
} }
test_set "message" text:
From: stephan@example.com
To: tss@example.com
Subject: Frop
Frop!
.
;
test "Implicit keep at runtime error" {
if not test_script_compile "errors/runtime-error.sieve" {
test_fail "compile failed";
}
if not test_script_run {
test_fail "run failed";
}
if test_result_execute {
test_fail "result execution should have failed";
}
if not test_message :folder "INBOX" 0 {
test_fail "message not stored (no implicit keep)";
}
if exists "X-Frop" {
test_fail "implicit keep message has editheader changes";
}
}
require "editheader";
require "fileinto";
addheader "X-Frop" "Friep";
fileinto "Rediculous.non-existent.folder";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.