Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/145546

Change subject: Partly revert min vs. max hotfix
......................................................................

Partly revert min vs. max hotfix

Using max() was bad because it made DoS possible.
Using min() is wrong because of the weight ordering.

Change-Id: Ib68149f76d71e088974507eb285270362a14424c
---
M lib/includes/store/sql/TermSqlIndex.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/46/145546/1

diff --git a/lib/includes/store/sql/TermSqlIndex.php 
b/lib/includes/store/sql/TermSqlIndex.php
index 6902d3a..2b193a5 100644
--- a/lib/includes/store/sql/TermSqlIndex.php
+++ b/lib/includes/store/sql/TermSqlIndex.php
@@ -674,7 +674,7 @@
                        if ( $hasWeight ) {
                                // if we take the weight into account, we need 
to grab basically all hits in order
                                // to allow for the post-search sorting below.
-                               $queryOptions['LIMIT'] = min( 
$options['LIMIT'], $internalLimit );
+                               $queryOptions['LIMIT'] = $internalLimit;
                        } else {
                                $queryOptions['LIMIT'] = $options['LIMIT'];
                        }

-- 
To view, visit https://gerrit.wikimedia.org/r/145546
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib68149f76d71e088974507eb285270362a14424c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.24-wmf12
Gerrit-Owner: Hoo man <h...@online.de>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to