Yaron Koren has uploaded a new change for review.
https://gerrit.wikimedia.org/r/221633
Change subject: Fied escaping of "order by" parameter
......................................................................
Fied escaping of "order by" parameter
Change-Id: I6b3839dbef6f96e241dec88ef774c159e33062c2
---
M CargoSQLQuery.php
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo
refs/changes/33/221633/1
diff --git a/CargoSQLQuery.php b/CargoSQLQuery.php
index 282419c..8107322 100644
--- a/CargoSQLQuery.php
+++ b/CargoSQLQuery.php
@@ -916,7 +916,10 @@
if ( $this->mHavingStr != '' ) {
$selectOptions['HAVING'] = $this->mHavingStr;
}
- $selectOptions['ORDER BY'] = $this->mOrderByStr;
+ // For some reason, we need to put quotes around the "ORDER By"
+ // value specifically, so that non-ASCII characters are
+ // handled correctly.
+ $selectOptions['ORDER BY'] = '"' . $this->mOrderByStr . '"';
$selectOptions['LIMIT'] = $this->mQueryLimit;
// Aliases need to be surrounded by quotes when we actually
--
To view, visit https://gerrit.wikimedia.org/r/221633
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b3839dbef6f96e241dec88ef774c159e33062c2
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