From: Tim Otten Date: Thu, 18 Jan 2024 05:51:18 +0000 (-0800) Subject: ListUnsubscribe - Ensure URL is always absolute X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=288e736f84650ef320ecfae026d9843cd15a9595;p=civicrm-core.git ListUnsubscribe - Ensure URL is always absolute When delivering via unit-test or cron job, the URL came out absolute. But when using web UI to "Send test", the URL was relative. It should be absolute. --- diff --git a/CRM/Mailing/Service/ListUnsubscribe.php b/CRM/Mailing/Service/ListUnsubscribe.php index 32d9c57643..6b5fedaf03 100644 --- a/CRM/Mailing/Service/ListUnsubscribe.php +++ b/CRM/Mailing/Service/ListUnsubscribe.php @@ -53,7 +53,7 @@ class CRM_Mailing_Service_ListUnsubscribe extends \Civi\Core\Service\AutoService $listUnsubscribe[] = $params['List-Unsubscribe']; } if (array_intersect(['http', 'oneclick'], $methods)) { - $listUnsubscribe[] = '<' . Civi::url('civicrm/mailing/unsubscribe')->addQuery([ + $listUnsubscribe[] = '<' . Civi::url('civicrm/mailing/unsubscribe', 'a')->addQuery([ 'reset' => 1, 'jid' => $m[1], 'qid' => $m[2],