Skip to content

Commit

Permalink
CRM-15251 - Contact details revealed when certain URLs indexed by sea…
Browse files Browse the repository at this point in the history
…rch engines

Added No Follow and No Index to:
Petition Confirmation pages
Mailing Optouts & Unsubscribe pages
Mailing Subscription Confirmation pages
  • Loading branch information
JohnFF committed Oct 4, 2014
1 parent 17087a4 commit ad03f10
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CRM/Campaign/Page/Petition/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class CRM_Campaign_Page_Petition_Confirm extends CRM_Core_Page {
* @throws Exception
*/
function run() {
CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');

$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);
Expand Down
6 changes: 2 additions & 4 deletions CRM/Mailing/Form/Optout.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function preProcess() {
}

function buildQuickForm() {

CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');
CRM_Utils_System::setTitle(ts('Please Confirm Your Opt Out'));

$this->add('text', 'email_confirm', ts('Verify email address to opt out:'));
Expand Down Expand Up @@ -92,7 +92,6 @@ function postProcess() {
// 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;
Expand Down Expand Up @@ -121,8 +120,7 @@ function postProcess() {
array(1 => $values['email_confirm'])
);

CRM_Core_Session::setStatus( $statusMsg, '', 'fail' );

CRM_Core_Session::setStatus( $statusMsg, '', 'fail' );
}

}
Expand Down
2 changes: 1 addition & 1 deletion CRM/Mailing/Form/Unsubscribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function preProcess() {
}

function buildQuickForm() {

CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');
CRM_Utils_System::setTitle(ts('Please Confirm Your Unsubscribe from this Mailing/Group'));

$this->add('text', 'email_confirm', ts('Verify email address to unsubscribe:'));
Expand Down
2 changes: 2 additions & 0 deletions CRM/Mailing/Page/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class CRM_Mailing_Page_Confirm extends CRM_Core_Page {
* @throws Exception
*/
function run() {
CRM_Utils_System::addHTMLHead('<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">');

$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);
Expand Down

0 comments on commit ad03f10

Please sign in to comment.