jenkins-bot has submitted this change and it was merged.

Change subject: Bypass max query length if query contains incategory operator.
......................................................................


Bypass max query length if query contains incategory operator.

See associated task for rationale and discussion.

Bug: T111694
Change-Id: Iec6cbf84bf34c9e91b5e07c59b13666dc5e4709c
---
M includes/Searcher.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  Tjones: Looks good to me, approved
  DCausse: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/Searcher.php b/includes/Searcher.php
index 0acb2c1..34e45fc 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -1990,7 +1990,7 @@
                if (
                        $requestLength > self::MAX_TEXT_SEARCH &&
                        // allow category intersections longer than the maximum
-                       !preg_match( '/^incategory:[^ ]+$/', $search )
+                       strpos( $search, 'incategory:' ) === false
                ) {
                        return Status::newFatal( 'cirrussearch-query-too-long', 
$this->language->formatNum( $requestLength ), $this->language->formatNum( 
self::MAX_TEXT_SEARCH ) );
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec6cbf84bf34c9e91b5e07c59b13666dc5e4709c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Deskana <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Cindy-the-browser-test-bot <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
Gerrit-Reviewer: Tjones <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to