Commit fb9ca893 authored by rgaudin's avatar rgaudin
Browse files

Fixed #230: adjust password requirements for Wikifundi

- changed wikifundi configuration so it is less restrictive.
- removed rule preventing login and password from being identical
- fixed a revealer issue on GUI (proper error message was not displayed, only color code)
- updated contents.json to use new tarball including new MW config
- fix tar extraction command (-om) so extraction can work on exfat
parent 4b798a73
......@@ -42,20 +42,20 @@
"expanded_size": 2097152
},
"wikifundi_langpack_fr": {
"url": "{mirror}/other/wikifundi/2.0/mediawiki_data_fr_2018-06.tar.bz2",
"name": "mediawiki_data_fr_2018-06.tar.bz2",
"url": "{mirror}/other/wikifundi/2.0/mediawiki_data_fr_2018-09.tar.bz2",
"name": "mediawiki_data_fr_2018-09.tar.bz2",
"folder_name": "data",
"checksum": "078b61788e8ae4c8b9b970c415e5114b086b30c85fd5be2a9f992df9e7f2f858",
"archive_size": 2270930112,
"expanded_size": 2832760832
"checksum": "0899e6f8ce743de96b695a3cb4f9d0cfa200f7f2e42b7e6f6e573a2b266e707b",
"archive_size": 2269457998,
"expanded_size": 2962948096
},
"wikifundi_langpack_en": {
"url": "{mirror}/other/wikifundi/2.0/mediawiki_data_en_2018-06.tar.bz2",
"name": "mediawiki_data_en_2018-06.tar.bz2",
"url": "{mirror}/other/wikifundi/2.0/mediawiki_data_en_2018-09.tar.bz2",
"name": "mediawiki_data_en_2018-09.tar.bz2",
"folder_name": "data",
"checksum": "3e4e80472ae99cc83cb770bbcfaa5505b422df8faf953ea8ea80b81d4517ebb8",
"archive_size": 2277071443,
"expanded_size": 3175219200
"checksum": "40a5a0c5dceebfdc20fce610eb08ee7f46c8d74188d82af76b4c2322ae2ccd9c",
"archive_size": 2265591039,
"expanded_size": 3252125696
},
"kalite_langpack_fr": {
"url": "{mirror}/other/kalite/langpack_fr_0.17.zip",
......
......@@ -203,7 +203,8 @@ def unarchive(archive_fpath, dest_folder, logger):
command = [szip_exe, 'x', '-o{}'.format(dest_folder), archive_fpath]
else:
tar_exe = '/usr/bin/tar' if sys.platform == "darwin" else '/bin/tar'
command = [tar_exe, '-C', dest_folder, '-x', '-f', archive_fpath]
# using -o and -m as exfat dont support mod times and ownership is different
command = [tar_exe, '-C', dest_folder, '-x', '-m', '-o', '-f', archive_fpath]
subprocess_pretty_check_call(command, logger)
......
......@@ -1009,7 +1009,11 @@ class Application:
validate_label(self.component.admin_account_login_label,
valid_admin_login)
validate_label(self.component.admin_account_pwd_label, valid_admin_pwd)
all_valid = all_valid and valid_admin_login and valid_admin_login
self.component.admin_account_login_constraints_revealer.set_reveal_child(
not valid_admin_login)
self.component.admin_account_pwd_constraints_revealer.set_reveal_child(
not valid_admin_pwd)
all_valid = all_valid and valid_admin_login and valid_admin_pwd
output_size = self.get_output_size()
if self.component.output_stack.get_visible_child_name() == "sd_card":
......
......@@ -451,8 +451,7 @@ def check_user_inputs(project_name, language, timezone,
valid_admin_pwd = len(admin_pwd) <= 31 \
and set(admin_pwd) <= set(string.ascii_uppercase
+ string.ascii_lowercase
+ string.digits + '-' + '_') \
and (admin_pwd != admin_login)
+ string.digits + '-' + '_')
return valid_project_name, valid_language, valid_timezone, \
valid_wifi_pwd, valid_admin_login, valid_admin_pwd
......@@ -817,8 +817,7 @@ digits '0' to '9', hyphen '_' and underscore '_'</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Must contains only 0 to 31 ASCII letters 'A' to 'z',
digits '0' to '9', hyphen '-' and underscore '_'
Must be different than login</property>
digits '0' to '9', hyphen '-' and underscore '_'</property>
<attributes>
<attribute name="foreground" value="#efef29292929"/>
</attributes>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment