Sieve: include statements ignore capitalisation of sub-script names (fixes #1643)

This commit is contained in:
Maurus Decimus
2026-06-19 12:22:32 +02:00
parent 0e004b5b56
commit cd6cd04b40
4 changed files with 50 additions and 1 deletions

View File

@@ -38,6 +38,7 @@ If you are upgrading from v0.16.x, replace the binary (or run `docker pull`). If
- `VacationResponse/set`: incorrect singleton handling.
- OIDC: Add default domain name to groups that are not email addresses.
- RocksDB: Enable blob garbage collection to reclaim disk space from deleted blobs.
- Sieve: `include` statements ignore capitalisation of sub-script names (#1643)
## [0.16.9] - 2026-06-15

View File

@@ -611,7 +611,7 @@ impl SieveScriptIngest for Server {
account_id,
Collection::SieveScript,
SieveField::Name,
name.as_bytes(),
name.to_lowercase().as_bytes(),
)
.await
.caused_by(trc::location!())?

View File

@@ -0,0 +1,5 @@
require ["include", "ihave"];
include :personal "Test Script";
error "'stop' within included script ignored or mixed-case include failed.";

View File

@@ -339,6 +339,49 @@ pub async fn test(test: &TestServer) {
)
.await;
client
.sieve_script_create(
"Test Script",
concat!(
"require \"reject\";\n",
"reject \"Rejected from a mixed-case included script.\";\n",
"stop;\n"
)
.as_bytes()
.to_vec(),
false,
)
.await
.unwrap();
client
.sieve_script_create("test_include_case", get_script("test_include_case"), true)
.await
.unwrap();
lmtp.ingest(
"bill@remote.org",
&["jdoe@example.com"],
concat!(
"From: bill@remote.org\r\n",
"Bcc: Undisclosed recipients;\r\n",
"Message-ID: <5678@example.com>\r\n",
"Subject: Holidays\r\n",
"\r\n",
"Remember to file your T.P.S. reports before ",
"going on holidays."
),
)
.await;
assert_message_delivery(
&mut smtp_rx,
MockMessage::new(
"<>",
["<bill@remote.org>"],
"@Rejected from a mixed-case included script",
),
)
.await;
// Run include global tests
client
.sieve_script_create(