From: Charles du Jeu Date: Sun, 22 Nov 2009 13:02:48 +0000 (+0000) Subject: Fix empty password sending updateUserPassword query, set fields in valid/invalid... X-Git-Tag: argeo-commons-2.1.30~1704 X-Git-Url: http://git.argeo.org/?p=lgpl%2Fargeo-commons.git;a=commitdiff_plain;h=81ad0fe524583322157b193ed1115c319f356bcd Fix empty password sending updateUserPassword query, set fields in valid/invalid states (0.8.3) git-svn-id: https://svn.argeo.org/commons/trunk@3142 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/PasswordCredentialImpl.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/PasswordCredentialImpl.js index 238cc7ef1..a7b648b23 100644 --- a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/PasswordCredentialImpl.js +++ b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/components/PasswordCredentialImpl.js @@ -37,7 +37,7 @@ qx.Class.define("org.argeo.security.ria.components.PasswordCredentialImpl", { }, getData : function(format){ var encoded = null; - if(this.pass1.getValue() != ""){ + if(this.pass1.getValue() != null && this.pass1.getValue() != ""){ var encoder = this.getEncoderCallback(); encoded = encoder(this.pass1.getValue()); } @@ -48,12 +48,13 @@ qx.Class.define("org.argeo.security.ria.components.PasswordCredentialImpl", { this.pass2.setValue(""); }, validate : function(){ - if(this.pass1.getValue() != this.pass2.getValue() || this.pass1.getValue() == ""){ - // TODO WHEN TESTING 0.8.3 - //this.pass1.setValid(false); - //this.pass2.setValid(false); + if(this.pass1.getValue() != this.pass2.getValue()){ + this.pass1.setValid(false); + this.pass2.setValid(false); this.setValid(false); }else{ + this.pass1.setValid(true); + this.pass2.setValid(true); this.setValid(true); } return this.getValid();