Ticket #908 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

CPSPasswordWidget shouldn't try to validate empty passwords

Reported by: bastide@… Owned by: fguillaume
Priority: P2 Milestone: CPS 3.3.7
Component: CPSSchemas Version: 3.3.5
Severity: normal Keywords:


CPSPasswordWidget knows that an empty password means "no change". But it still tries to check it for length, character sets, etc.

--- cps-3.3.5-orig/CPSSchemas/BasicWidgets.py   2005-07-18 16:55:00.000000000 +0200
+++ cps-3.3.5/CPSSchemas/BasicWidgets.py        2005-09-04 16:45:14.000000000 +0200
@@ -645,6 +645,8 @@
                     datamodel = datastructure.getDataModel()
                     if not datamodel[self.fields[0]]:
                         err = 'cpsschemas_err_required'
+                elif not v:
+                    pass
                     # checking pw consistancy
                     len_v = len(v)

(OK, "elif not v: pass; else" may not be the shortest expression possible :)

Change History

comment:1 Changed 14 years ago by fguillaume

  • Priority changed from P1 to P2
  • Version changed from TRUNK to 3.3.5
  • Milestone changed from unspecified to CPS 3.4.0

comment:2 Changed 14 years ago by lregebro

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in in revision [28508].

Note: See TracTickets for help on using tickets.