From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api 1/2] api: quarantine: fix wrong backward-compatibility action
Date: Mon, 13 Oct 2025 13:06:18 +0200 [thread overview]
Message-ID: <20251013110719.18486-2-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20251013110719.18486-1-s.ivanov@proxmox.com>
While renaming to blocklist/welcomelist we kept the old
methods in the API for backward compatibilty, and added
both options as equivalent actions.
However it seems I substituted the backward compatibility name, as
well at some point and did not notice it.
Additionally the commits of renaming and re-adding the old names for
backward compatibility were not separated cleanly (thus this
patch fixes 2 commits).
Reported in our German community forum:
https://forum.proxmox.com/threads/.173910/
Tested by reproducing with a spamreport template with the old actions,
and verified that the welcomelist action works with this patch.
Fixes: ba7a7855 ("api: quarantine: re-add black- whitelist api methods for compatibilty")
Fixes: 85981ebd ("api: quarantine: rename to block/welcomelist")
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PMG/API2/Quarantine.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PMG/API2/Quarantine.pm b/src/PMG/API2/Quarantine.pm
index 3887a741..e38d3ab2 100644
--- a/src/PMG/API2/Quarantine.pm
+++ b/src/PMG/API2/Quarantine.pm
@@ -1433,7 +1433,7 @@ __PACKAGE__->register_method({
my $pmail = try_decode_utf8($ref->{pmail});
my $receiver = try_decode_utf8($ref->{receiver} // $ref->{pmail});
- if ($action eq 'welcomelist' || $action eq 'welcomelist') {
+ if ($action eq 'welcomelist' || $action eq 'whitelist') {
PMG::Quarantine::add_to_blockwelcome($dbh, $pmail, 'WL', [$sender]);
PMG::Quarantine::deliver_quarantined_mail($dbh, $ref, $receiver);
} elsif ($action eq 'blocklist' || $action eq 'blacklist') {
--
2.47.3
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
next prev parent reply other threads:[~2025-10-13 11:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 11:06 [pmg-devel] [PATCH pmg-api 0/2] fix 2 issues with spamreports and quarantine Stoiko Ivanov
2025-10-13 11:06 ` Stoiko Ivanov [this message]
2025-10-13 11:06 ` [pmg-devel] [PATCH pmg-api 2/2] utils: finalize_report: change order of plain and html parts Stoiko Ivanov
2025-10-13 14:24 ` [pmg-devel] [PATCH pmg-api 0/2] fix 2 issues with spamreports and quarantine Dominik Csapak
2025-10-13 15:09 ` [pmg-devel] applied-series: " Stoiko Ivanov
2025-10-13 16:36 ` [pmg-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251013110719.18486-2-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.