Skip to content

Commit d791316

Browse files
committed
fix query check with single line SELECT. fixes #3
1 parent 22cb60d commit d791316

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getPDO($dsn = null, $user = null, $pass = null)
6969
*/
7070
public function executeQuery($query, $dsnalias = null)
7171
{
72-
if (!preg_match('/^select /i', trim($query))) {
72+
if (!preg_match('/^select(\s|$)/i', trim($query))) {
7373
throw new \Exception('For security reasons only SELECT statements are allowed in dbquery');
7474
}
7575

0 commit comments

Comments
 (0)