security/core#14 Validate "context" inputs
[civicrm-core.git] / CRM / Pledge / Page / Tab.php
index 5f6a30592c6821f60ae4dd6a0f5dfacc66accf75..649963c8f7d35b9b47151c90704b60c8eddf8838 100644 (file)
@@ -94,7 +94,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
   }
 
   public function preProcess() {
-    $context = CRM_Utils_Request::retrieve('context', 'String', $this);
+    $context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this);
     $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse');
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
 
@@ -156,7 +156,7 @@ class CRM_Pledge_Page_Tab extends CRM_Core_Page {
    * @param $form
    */
   public static function setContext(&$form) {
-    $context = CRM_Utils_Request::retrieve('context', 'String', $form, FALSE, 'search');
+    $context = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $form, FALSE, 'search');
 
     $qfKey = CRM_Utils_Request::retrieve('key', 'String', $form);
     // validate the qfKey