Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
Fixes check_password in luks_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
karasu committed Sep 27, 2018
1 parent 6c1419a commit a91a76c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You are viewing the `0.16.x` branch (stable).

|Development Stage|Branch|Version| Code Status|
----------------- | -------------- | -------------- | -------- |
|Cnchi Stable|0.16.x|![0.16.6](https://img.shields.io/github/release/antergos/cnchi.svg)|Frozen|
|Cnchi Stable|0.16.x|![0.16.7](https://img.shields.io/github/release/antergos/cnchi.svg)|Frozen|
|Cnchi Development|0.17.x|![0.17.1](https://img.shields.io/github/release/antergos/cnchi/all.svg)|Development|
|Cnchi Next (UI agnostic)|master|master|Development|

Expand Down
2 changes: 1 addition & 1 deletion src/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

""" Set some Cnchi global constants """

CNCHI_VERSION = "0.16.6"
CNCHI_VERSION = "0.16.7"
""" Cnchi version """

CNCHI_WEBSITE = "http://www.antergos.com"
Expand Down
12 changes: 10 additions & 2 deletions src/misc/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,19 @@ def human_password_strength(password):

def check_password(password, verified_password, allow_empty=False):
""" Check user password
This function expects dicts with Gtk widgets as parameters """
This function expects Gtk widgets as parameters
password['entry']: password entry
password['image']: password image (status)
password['label']: password label (status)
password['strength']: password strength
verified_password: password confirm entry
"""

complete = True
passw = password['entry'].get_text()
vpassw = verified_password['entry'].get_text()
vpassw = verified_password.get_text()
if passw != vpassw:
complete = False
password['image'].hide()
Expand Down
10 changes: 4 additions & 6 deletions src/pages/dialogs/luks_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,10 @@ def password_changed(self, _widget=None):
""" User has introduced new information. Check it here. """
password = {}
password['entry'] = self.gui.get_object('password_entry')
password['confirm'] = self.gui.get_object('password_confirm_entry')
password['image'] = self.gui.get_object('password_confirm_image')
password['status'] = self.gui.get_object('password_status_label')
password['label'] = self.gui.get_object('password_status_label')
password['strength'] = self.gui.get_object('password_strength')

validation.check_password(
password['entry'], password['confirm'],
password['image'], password['status'],
password['strength'])
verified_password = self.gui.get_object('password_confirm_entry')

validation.check_password(password, verified_password)
2 changes: 1 addition & 1 deletion src/pages/user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def validate_password(self):
""" Validates changed password entry """
validation.check_password(
self.widgets['password'],
self.widgets['verified_password'])
self.widgets['verified_password']['entry'])

def get_prev_page(self):
""" Gets previous page """
Expand Down
2 changes: 1 addition & 1 deletion update.info
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{"version":"0.16.6","files":[
{"version":"0.16.7","files":[
]}

0 comments on commit a91a76c

Please sign in to comment.