From: jocuri%softhome.net <> Date: Tue, 21 Feb 2006 21:46:18 +0000 (+0000) Subject: Patch for bug 323627: Setting "loginnetmask" to 0 should disable IP checking; patch... X-Git-Tag: bugzilla-2.20.2~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1e296a411b73276e80345de68ad5e3aef690c93;p=thirdparty%2Fbugzilla.git Patch for bug 323627: Setting "loginnetmask" to 0 should disable IP checking; patch by Jesse Erlbaum , r=vladd, a=justdave. --- diff --git a/Bugzilla/Auth.pm b/Bugzilla/Auth.pm index ba32277b77..c33111b2fa 100644 --- a/Bugzilla/Auth.pm +++ b/Bugzilla/Auth.pm @@ -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)));