Skip to content

Commit

Permalink
CRM-20906 - Fix regex for validating extension key
Browse files Browse the repository at this point in the history
  • Loading branch information
seancolsen committed Sep 19, 2017
1 parent 2442448 commit 1019d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Admin/Form/Extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1019d25

Please sign in to comment.