[pmg-devel] applied: [PATCH pmg-api] ruledb: modfield: properly handle fields spanning multiple lines

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Nov 15 15:32:18 CET 2022


Am 15/11/2022 um 13:40 schrieb Stoiko Ivanov:
> this commit fixes aa3a005a5e7e3ad69ed35e9957fa514f73315c72
> 
> MIME::Words::encode_mimewords does not deal with multiline headers
> (the warning about this being a 'quick and dirty' solution [0]
> partially tells as much).
> 
> Instead - split the replacement value after variable substition on:
> '\r?\n\s*' (to capture multi-line values like __SPAM_INFO__, but also
> already folded headers, which are separated by '\r?\n\s+') and do the
> substitution for each line seperately.
> 
> reported in our community forum:
> https://forum.proxmox.com/threads/.118001/
> 
> [0] https://metacpan.org/pod/MIME::Words#PUBLIC-INTERFACE
> 
> Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
> ---
>  src/PMG/RuleDB/ModField.pm | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
>

applied, with Dominik's T-b & R-b, thanks!




More information about the pmg-devel mailing list