From ece3a7ec4685b281efee69286a4dbdeb44971661 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 8 May 2006 03:13:47 +0000 Subject: Bug 332598: Move ValidatePassword() and DBNameToIdAndCheck() from globals.pl into User.pm - Patch by Frédéric Buclin r=mkanat a=myk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bugzilla/Constants.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Bugzilla/Constants.pm') diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 0b612cbba..8e245d0b6 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -44,6 +44,9 @@ use base qw(Exporter); AUTH_LOGINFAILED AUTH_DISABLED + USER_PASSWORD_MIN_LENGTH + USER_PASSWORD_MAX_LENGTH + LOGIN_OPTIONAL LOGIN_NORMAL LOGIN_REQUIRED @@ -71,6 +74,7 @@ use base qw(Exporter); COMMENT_COLS UNLOCK_ABORT + THROW_ERROR RELATIONSHIPS REL_ASSIGNEE REL_QA REL_REPORTER REL_CC REL_VOTER @@ -141,6 +145,10 @@ use constant AUTH_ERROR => 2; use constant AUTH_LOGINFAILED => 3; use constant AUTH_DISABLED => 4; +# The minimum and maximum lengths a password must have. +use constant USER_PASSWORD_MIN_LENGTH => 3; +use constant USER_PASSWORD_MAX_LENGTH => 16; + use constant LOGIN_OPTIONAL => 0; use constant LOGIN_NORMAL => 1; use constant LOGIN_REQUIRED => 2; @@ -192,6 +200,10 @@ use constant COMMENT_COLS => 80; # because of error use constant UNLOCK_ABORT => 1; +# Determine whether a validation routine should return 0 or throw +# an error when the validation fails. +use constant THROW_ERROR => 1; + use constant REL_ASSIGNEE => 0; use constant REL_QA => 1; use constant REL_REPORTER => 2; -- cgit v1.2.3-24-g4f1b