]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Patch for bug 323627: Setting "loginnetmask" to 0 should disable IP checking; patch...
authorjocuri%softhome.net <>
Tue, 21 Feb 2006 21:46:18 +0000 (21:46 +0000)
committerjocuri%softhome.net <>
Tue, 21 Feb 2006 21:46:18 +0000 (21:46 +0000)
Bugzilla/Auth.pm

index ba32277b770e27fa18ad83d974670290d33c23f3..c33111b2faa507b8859970907460d85783e70ac0 100644 (file)
@@ -68,6 +68,9 @@ sub get_netaddr {
 
     my $maskbits = Param('loginnetmask');
 
+    # Make Bugzilla ignore the IP address if loginnetmask is set to 0
+    return "0.0.0.0" if ($maskbits == 0);
+
     $addr >>= (32-$maskbits);
     $addr <<= (32-$maskbits);
     return join(".", unpack("CCCC", pack("N", $addr)));