You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2025/09/05 19:16:40 UTC
(tooling-trusted-release) branch main updated: Fix a bug with checking permitted recipients for messages
This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new 7fac2ce Fix a bug with checking permitted recipients for messages
7fac2ce is described below
commit 7fac2ce5209e8ca0aacfb91da42eca1b68c6960c
Author: Sean B. Palmer <se...@miscoranda.com>
AuthorDate: Fri Sep 5 20:16:17 2025 +0100
Fix a bug with checking permitted recipients for messages
---
atr/tasks/message.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/atr/tasks/message.py b/atr/tasks/message.py
index 0c95a7c..1e9a78e 100644
--- a/atr/tasks/message.py
+++ b/atr/tasks/message.py
@@ -38,7 +38,15 @@ class SendError(Exception): ...
@checks.with_model(Send)
async def send(args: Send) -> results.Results | None:
- if args.email_recipient not in util.permitted_recipients(args.email_sender):
+ if "@" not in args.email_sender:
+ log.warning(f"Invalid email sender: {args.email_sender}")
+ sender_asf_uid = args.email_sender
+ elif args.email_sender.endswith("@apache.org"):
+ sender_asf_uid = args.email_sender.split("@")[0]
+ else:
+ raise SendError(f"Invalid email sender: {args.email_sender}")
+
+ if args.email_recipient not in util.permitted_recipients(sender_asf_uid):
raise SendError(f"You are not permitted to send announcements to {args.email_recipient}")
message = mail.Message(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org