]> git.proxmox.com Git - pmg-api.git/commit
rulesystem: matchfield: match all headers not only the first
authorStoiko Ivanov <s.ivanov@proxmox.com>
Tue, 17 May 2022 10:19:50 +0000 (12:19 +0200)
committerDominik Csapak <d.csapak@proxmox.com>
Tue, 17 May 2022 11:29:50 +0000 (13:29 +0200)
commit91316d7e70e79a2c53faa66d78e4abe04878b647
tree744f68ce2d3484bb1c9162d133924b4b6767e563
parent4c093c923a2bd74186391e86d5a77c8aedd2f39a
rulesystem: matchfield: match all headers not only the first

currently the match field uses $entity->head->get in scalar context,
which only returns the first matching header (see [0])

switch over to using get_all in list context and iterating over all
headers makes it possible to match subsequent headers.

while it is uncommon in general - the Received headers are usually not
restricted to one - reported in our community forum:
https://forum.proxmox.com/threads/.109629/

[0] https://metacpan.org/pod/MIME::Head#Getting-field-contents
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/RuleDB/MatchField.pm