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

Change subject: Check for conflicting blocks after sanitizing the range
......................................................................


Check for conflicting blocks after sanitizing the range

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

Approvals:
  CSteipp: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/GlobalBlocking.class.php b/GlobalBlocking.class.php
index a7b5dab..0b30bb3 100644
--- a/GlobalBlocking.class.php
+++ b/GlobalBlocking.class.php
@@ -364,11 +364,6 @@
                        $errors[] = array( 
'globalblocking-block-expiryinvalid', $expiry );
                }
 
-               $existingBlock = GlobalBlocking::getGlobalBlockId( $ip );
-               if ( !$modify && $existingBlock ) {
-                       $errors[] = array( 
'globalblocking-block-alreadyblocked', $ip );
-               }
-
                // Check for too-big ranges.
                list( $range_start, $range_end ) = IP::parseRange( $ip );
 
@@ -382,6 +377,11 @@
                        $ip = IP::sanitizeRange( $ip );
                }
 
+               $existingBlock = GlobalBlocking::getGlobalBlockId( $ip );
+               if ( !$modify && $existingBlock ) {
+                       $errors[] = array( 
'globalblocking-block-alreadyblocked', $ip );
+               }
+
                if ( count( $errors ) > 0 ) {
                        return $errors;
                }

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

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

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

Reply via email to