mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 08:13:50 +00:00
The rule metadata is JSON inside a Sieve bracket comment, so a `*/` in a rule name, a value or the vacation text ended the comment early and broke the script. A line break in a rule name escaped the `# Rule:` comment line. And a header name outside `[A-Za-z0-9_-]` made Stalwart (0.16 and 1.0) refuse the whole script, every other rule with it. - `*/` in the metadata JSON is written as `*\/`, which `JSON.parse` reads back as `/`, so older versions still parse it. - Line breaks in a rule name are flattened on the `# Rule:` line, and the parser matches its own blocks the same way. - The rule editor refuses to save an invalid header name, with a translated message. The generator skips such a rule (it stays in the metadata, so it can be fixed) instead of writing a script the server refuses.