Yaron Koren has submitted this change and it was merged.
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(-)
Approvals:
Yaron Koren: Checked; Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I7590f7a364968816c4bc57a4617ff476984a511d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits