From 7b1731d5ceeb67012942d872ab8d9ebb048b04c1 Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Wed, 2 Oct 2002 18:57:23 +0000 Subject: Bug 20122 - Bugzilla requires new login if IP changes r=joel x2 --- defparams.pl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'defparams.pl') diff --git a/defparams.pl b/defparams.pl index 8e931006f..232b6c346 100644 --- a/defparams.pl +++ b/defparams.pl @@ -111,6 +111,21 @@ sub check_webdotbase { return ""; } +sub check_netmask { + my ($mask) = @_; + my $res = check_numeric($mask); + return $res if $res; + if ($mask < 0 || $mask > 32) { + return "an IPv4 netmask must be between 0 and 32 bits"; + } + # Note that if we changed the netmask from anything apart from 32, then + # existing logincookies which aren't for a single IP won't work + # any more. We can't know which ones they are, though, so they'll just + # take space until they're preiodically cleared, later. + + return ""; +} + # OK, here are the parameter definitions themselves. # # Each definition is a hash with keys: @@ -845,6 +860,17 @@ Reason: %reason% type => 't', default => '' }, + + { + name => 'loginnetmask', + desc => 'The number of bits for the netmask used if a user chooses to ' . + 'allow a login to be valid for more than a single IP. Setting ' . + 'this to 32 disables this feature.
' . + 'Note that enabling this may decrease the security of your system.', + type => 't', + default => '32', + checker => \&check_netmask + }, ); 1; -- cgit v1.2.3-24-g4f1b