diff options
-rw-r--r-- | src/leap/gui/firstrun/register.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/leap/gui/firstrun/register.py b/src/leap/gui/firstrun/register.py index b04844bf..b169f45b 100644 --- a/src/leap/gui/firstrun/register.py +++ b/src/leap/gui/firstrun/register.py @@ -101,6 +101,7 @@ class RegisterUserPage(QtGui.QWizardPage, UserFormMixIn): "Register a new user with provider %s." % provider) self.validationMsg.setText('') + self.userPassword2LineEdit.setText('') def validatePage(self): """ @@ -110,12 +111,6 @@ class RegisterUserPage(QtGui.QWizardPage, UserFormMixIn): returned we write validation error msg above the form. """ - # the slot for this signal is not doing - # what's expected. Investigate why, - # right now we're not giving any feedback - # to the user re. what's going on. The only - # thing I can see as a workaround is setting - # a low timeout. wizard = self.wizard() self.setSigningUpStatus.emit() @@ -124,7 +119,9 @@ class RegisterUserPage(QtGui.QWizardPage, UserFormMixIn): password = self.userPasswordLineEdit.text() password2 = self.userPassword2LineEdit.text() - # have some call to a password checker... + # we better have here + # some call to a password checker... + # to assess strenght and avoid silly stuff. if password != password2: self.set_validation_status('Password does not match.') @@ -161,7 +158,9 @@ class RegisterUserPage(QtGui.QWizardPage, UserFormMixIn): else: # this is the real thing signup = auth.LeapSRPRegister( - # XXX FIXME 0 Force HTTPS + # XXX FIXME FIXME FIXME FIXME + # XXX FIXME 0 Force HTTPS !!! + # XXX FIXME FIXME FIXME FIXME #schema="https", schema="http", provider=domain) @@ -191,6 +190,11 @@ class RegisterUserPage(QtGui.QWizardPage, UserFormMixIn): "Error during registration (500)") return False + if req.status_code == 404: + self.set_validation_status( + "Error during registration (404)") + return False + validation_msgs = json.loads(req.content) logger.debug('validation errors: %s' % validation_msgs) errors = validation_msgs.get('errors', None) |