Yaron Koren has uploaded a new change for review.
https://gerrit.wikimedia.org/r/254393
Change subject: Improved regexp used to find SQL functions
......................................................................
Improved regexp used to find SQL functions
Change-Id: I7590f7a364968816c4bc57a4617ff476984a511d
---
M CargoSQLQuery.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo
refs/changes/93/254393/1
diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php
index a9d6fc9..c68dfd9 100644
--- a/CargoSQLQuery.php
+++ b/CargoSQLQuery.php
@@ -335,7 +335,7 @@
global $wgCargoAllowedSQLFunctions;
$sqlFunctionMatches = array();
- $sqlFunctionRegex = '/(\b|=|>|<)(\S*?)\s?\(/';
+ $sqlFunctionRegex = '/(\b|\W)(\w*?)\s?\(/';
preg_match_all( $sqlFunctionRegex, $str, $sqlFunctionMatches );
$sqlFunctions = array_map( 'strtoupper', $sqlFunctionMatches[2]
);
// Throw an error if any of these functions
--
To view, visit https://gerrit.wikimedia.org/r/254393
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7590f7a364968816c4bc57a4617ff476984a511d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits