Skip to content

Commit df685b2

Browse files
authored
Merge pull request #5 from seanmadsen/CRM-20906
CRM-20906 - Fix regex for validating extension key
2 parents 2442448 + 1019d25 commit df685b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CRM/Admin/Form/Extensions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function preProcess() {
4545
$this->_key = CRM_Utils_Request::retrieve('key', 'String',
4646
$this, FALSE, 0
4747
);
48-
if (!preg_match('/[0-9a-zA-Z._-]+/', $this->_key)) {
48+
if (!preg_match('/^[0-9a-zA-Z._-]+$/', $this->_key)) {
4949
throw new CRM_Core_Exception('Extension Key does not match expected standard');
5050
}
5151
$session = CRM_Core_Session::singleton();

0 commit comments

Comments
 (0)