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

Change subject: Guard against no valid IPs being provided to 
GlobalBlocking::checkIpsForBlock
......................................................................


Guard against no valid IPs being provided to GlobalBlocking::checkIpsForBlock

Bug: 59705
Change-Id: Iafa4f77e4aef241c4f7bd41e4f74276d818eb113
---
M GlobalBlocking.class.php
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  CSteipp: Looks good to me, approved
  Skizzerz: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/GlobalBlocking.class.php b/GlobalBlocking.class.php
index bba1f0c..a7b5dab 100644
--- a/GlobalBlocking.class.php
+++ b/GlobalBlocking.class.php
@@ -170,6 +170,11 @@
                                $conds[] = $dbr->makeList( 
self::getRangeCondition( $ip ), LIST_AND );
                        }
                }
+
+               if ( !$conds ) {
+                       // No valid IPs provided so don't even make the query. 
Bug 59705
+                       return array();
+               }
                $conds = array( $dbr->makeList( $conds, LIST_OR ) );
 
                if ( !$anon ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafa4f77e4aef241c4f7bd41e4f74276d818eb113
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Skizzerz <[email protected]>
Gerrit-Reviewer: Werdna <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to