diff options
author | lpsolit%gmail.com <> | 2009-10-19 01:34:57 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2009-10-19 01:34:57 +0200 |
commit | a7310a522e4ac2b24d01f0cdf44e132d0db8f73b (patch) | |
tree | f6a86028d5e5db61948e4103c2c4d4ebf1ccfb7f /Bugzilla/Auth/Persist/Cookie.pm | |
parent | da262b500fba8bd50d40a358670a6ac2a88b9056 (diff) | |
download | bugzilla-a7310a522e4ac2b24d01f0cdf44e132d0db8f73b.tar.gz bugzilla-a7310a522e4ac2b24d01f0cdf44e132d0db8f73b.tar.xz |
Bug 399073: Remove the 'loginnetmask' parameter - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=mkanat
Diffstat (limited to 'Bugzilla/Auth/Persist/Cookie.pm')
-rw-r--r-- | Bugzilla/Auth/Persist/Cookie.pm | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Bugzilla/Auth/Persist/Cookie.pm b/Bugzilla/Auth/Persist/Cookie.pm index 60f90925e..4458e31b5 100644 --- a/Bugzilla/Auth/Persist/Cookie.pm +++ b/Bugzilla/Auth/Persist/Cookie.pm @@ -49,17 +49,14 @@ sub persist_login { my $dbh = Bugzilla->dbh; my $cgi = Bugzilla->cgi; - my $ip_addr = $cgi->remote_addr; - unless ($cgi->param('Bugzilla_restrictlogin') || - Bugzilla->params->{'loginnetmask'} == 32) - { - $ip_addr = get_netaddr($ip_addr); + my $ip_addr; + if ($cgi->param('Bugzilla_restrictlogin')) { + $ip_addr = $cgi->remote_addr; + # The IP address is valid, at least for comparing with itself in a + # subsequent login + trick_taint($ip_addr); } - # The IP address is valid, at least for comparing with itself in a - # subsequent login - trick_taint($ip_addr); - $dbh->bz_start_transaction(); my $login_cookie = |