diff --git a/CRM/Admin/Form/Extensions.php b/CRM/Admin/Form/Extensions.php index 4b93cc02a0d..09e78f8ff2f 100644 --- a/CRM/Admin/Form/Extensions.php +++ b/CRM/Admin/Form/Extensions.php @@ -45,7 +45,7 @@ public function preProcess() { $this->_key = CRM_Utils_Request::retrieve('key', 'String', $this, FALSE, 0 ); - if (!preg_match('/[0-9a-zA-Z._-]+/', $this->_key)) { + if (!preg_match('/^[0-9a-zA-Z._-]+$/', $this->_key)) { throw new CRM_Core_Exception('Extension Key does not match expected standard'); } $session = CRM_Core_Session::singleton();