diff --git a/briar-gtk/briar_gtk/containers/registration.py b/briar-gtk/briar_gtk/containers/registration.py index 177b965849dee09984d1a0d1da76194d62f3a36c..c5c403261e5ce8432e23b647aae14ef662ae8f31 100644 --- a/briar-gtk/briar_gtk/containers/registration.py +++ b/briar-gtk/briar_gtk/containers/registration.py @@ -93,6 +93,9 @@ class RegistrationContainer(Container): # pylint: disable=unused-argument def on_create_account_pressed(self, button): + if self._password_is_empty(): + self._show_error_message(_("Please enter a password")) + return if not self._passwords_match(): self._show_error_message(_("The passwords do not match")) return @@ -102,6 +105,10 @@ class RegistrationContainer(Container): self._show_loading_animation() self._register() + def _password_is_empty(self): + password = self.builder.get_object("password_entry").get_text() + return len(password) == 0 + def _passwords_match(self): password = self.builder.get_object("password_entry").get_text() password_confirm = self.builder.get_object(