From mboxrd@z Thu Jan 1 00:00:00 1970 From: rmccabe@sourceware.org Date: 5 Feb 2008 20:59:39 -0000 Subject: [Cluster-devel] conga/luci/site/luci/Extensions homebase_adapt ... Message-ID: <20080205205939.30042.qmail@sourceware.org> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit CVSROOT: /cvs/cluster Module name: conga Changes by: rmccabe at sourceware.org 2008-02-05 20:59:38 Modified files: luci/site/luci/Extensions: homebase_adapters.py Log message: Enforce password minimum length on the backend. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/homebase_adapters.py.diff?cvsroot=cluster&r1=1.57&r2=1.58 --- conga/luci/site/luci/Extensions/homebase_adapters.py 2008/01/23 04:34:09 1.57 +++ conga/luci/site/luci/Extensions/homebase_adapters.py 2008/02/05 20:59:38 1.58 @@ -133,6 +133,9 @@ passwd = request.form['newPassword'] pwconfirm = request.form['newPasswordConfirm'] + if len(passwd) < 6: + return (False, { 'errors': [ 'Passwords must be@least six characters long.' ] }) + if passwd != pwconfirm: return (False, { 'errors': [ 'The passwords given do not match' ]}) @@ -203,12 +206,6 @@ except: cur_host_trusted = not check_certs - trust_shown = False - try: - trust_shown = request.form.has_key('trust_shown') - except: - trust_shown = False - cur_host_fp = None try: cur_host_fp = request.form['host_fingerprint'].strip() @@ -402,12 +399,6 @@ % (e, str(e))) errors.append('The number of systems entered could not be determined.') - trust_shown = False - try: - trust_shown = request.form.has_key('trust_shown') - except: - trust_shown = False - incomplete = False i = 0 while i < num_storage: