CRM-15251 - Contact details revealed when certain URLs indexed by search engines
authorJohn Prescott <john@futurefirst.org.uk>
Thu, 2 Oct 2014 15:52:03 +0000 (16:52 +0100)
committerJohn Prescott <john@futurefirst.org.uk>
Sat, 4 Oct 2014 11:34:32 +0000 (12:34 +0100)
Added No Follow and No Index to:
Petition Confirmation pages
Mailing Optouts & Unsubscribe pages
Mailing Subscription Confirmation pages

CRM/Campaign/Page/Petition/Confirm.php
CRM/Mailing/Form/Optout.php
CRM/Mailing/Form/Unsubscribe.php
CRM/Mailing/Page/Confirm.php

index 665fad7c414a346213aa6154d8f4aabbf8c26358..dd4c5cf7857260120f44228dc5b27cbd16753d75 100644 (file)
@@ -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);
index 998efb734c4fe2a7bbbc0fc2a72cf72283a76e3e..69b1bd05c1073b4aa7ee7093e84db1e342fb323c 100644 (file)
@@ -64,7 +64,7 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form {
   }
 
   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:'));
@@ -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' );
     }
 
   }
index 0896b7897de9cc3308398f9c10338141d5588c20..e19e5581b1a47f1b4f1019e8527688dee6690ff1 100644 (file)
@@ -75,7 +75,7 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
   }
 
   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:'));
index 57842bf7f1a68666dd841861953e3e16fd27cd8e..e8e9f9d7a417f02f7afd67cb0d3b3ae40d87fdda 100644 (file)
@@ -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);