From ad03f101c411312d20b918713b12482ae6df8ee8 Mon Sep 17 00:00:00 2001 From: John Prescott Date: Thu, 2 Oct 2014 16:52:03 +0100 Subject: [PATCH] CRM-15251 - Contact details revealed when certain URLs indexed by search engines Added No Follow and No Index to: Petition Confirmation pages Mailing Optouts & Unsubscribe pages Mailing Subscription Confirmation pages --- CRM/Campaign/Page/Petition/Confirm.php | 2 ++ CRM/Mailing/Form/Optout.php | 6 ++---- CRM/Mailing/Form/Unsubscribe.php | 2 +- CRM/Mailing/Page/Confirm.php | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CRM/Campaign/Page/Petition/Confirm.php b/CRM/Campaign/Page/Petition/Confirm.php index 665fad7c41..dd4c5cf785 100644 --- a/CRM/Campaign/Page/Petition/Confirm.php +++ b/CRM/Campaign/Page/Petition/Confirm.php @@ -38,6 +38,8 @@ class CRM_Campaign_Page_Petition_Confirm extends CRM_Core_Page { * @throws Exception */ function run() { + CRM_Utils_System::addHTMLHead(''); + $contact_id = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject); $subscribe_id = CRM_Utils_Request::retrieve('sid', 'Integer', CRM_Core_DAO::$_nullObject); $hash = CRM_Utils_Request::retrieve('h', 'String', CRM_Core_DAO::$_nullObject); diff --git a/CRM/Mailing/Form/Optout.php b/CRM/Mailing/Form/Optout.php index 998efb734c..69b1bd05c1 100644 --- a/CRM/Mailing/Form/Optout.php +++ b/CRM/Mailing/Form/Optout.php @@ -64,7 +64,7 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form { } function buildQuickForm() { - + CRM_Utils_System::addHTMLHead(''); CRM_Utils_System::setTitle(ts('Please Confirm Your Opt Out')); $this->add('text', 'email_confirm', ts('Verify email address to opt out:')); @@ -92,7 +92,6 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form { // check if EmailTyped matches Email address $result = CRM_Utils_String::compareStr($this->_email, $values['email_confirm'], TRUE); - $job_id = $this->_job_id; $queue_id = $this->_queue_id; $hash = $this->_hash; @@ -121,8 +120,7 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form { array(1 => $values['email_confirm']) ); - CRM_Core_Session::setStatus( $statusMsg, '', 'fail' ); - + CRM_Core_Session::setStatus( $statusMsg, '', 'fail' ); } } diff --git a/CRM/Mailing/Form/Unsubscribe.php b/CRM/Mailing/Form/Unsubscribe.php index 0896b7897d..e19e5581b1 100644 --- a/CRM/Mailing/Form/Unsubscribe.php +++ b/CRM/Mailing/Form/Unsubscribe.php @@ -75,7 +75,7 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form { } function buildQuickForm() { - + CRM_Utils_System::addHTMLHead(''); CRM_Utils_System::setTitle(ts('Please Confirm Your Unsubscribe from this Mailing/Group')); $this->add('text', 'email_confirm', ts('Verify email address to unsubscribe:')); diff --git a/CRM/Mailing/Page/Confirm.php b/CRM/Mailing/Page/Confirm.php index 57842bf7f1..e8e9f9d7a4 100644 --- a/CRM/Mailing/Page/Confirm.php +++ b/CRM/Mailing/Page/Confirm.php @@ -38,6 +38,8 @@ class CRM_Mailing_Page_Confirm extends CRM_Core_Page { * @throws Exception */ function run() { + CRM_Utils_System::addHTMLHead(''); + $contact_id = CRM_Utils_Request::retrieve('cid', 'Integer', CRM_Core_DAO::$_nullObject); $subscribe_id = CRM_Utils_Request::retrieve('sid', 'Integer', CRM_Core_DAO::$_nullObject); $hash = CRM_Utils_Request::retrieve('h', 'String', CRM_Core_DAO::$_nullObject); -- 2.25.1