summaryrefslogtreecommitdiffstats
path: root/defparams.pl
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-10-02 20:57:23 +0200
committerbbaetz%student.usyd.edu.au <>2002-10-02 20:57:23 +0200
commit7b1731d5ceeb67012942d872ab8d9ebb048b04c1 (patch)
treed9b2b28aad51fe11faec426f501355a5c6eab049 /defparams.pl
parent52aac68c4e1538bd169fdb66a343ab6f7cf1e455 (diff)
downloadbugzilla-7b1731d5ceeb67012942d872ab8d9ebb048b04c1.tar.gz
bugzilla-7b1731d5ceeb67012942d872ab8d9ebb048b04c1.tar.xz
Bug 20122 - Bugzilla requires new login if IP changes
r=joel x2
Diffstat (limited to 'defparams.pl')
-rw-r--r--defparams.pl26
1 files changed, 26 insertions, 0 deletions
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.<br>' .
+ 'Note that enabling this may decrease the security of your system.',
+ type => 't',
+ default => '32',
+ checker => \&check_netmask
+ },
);
1;