Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ideascube
ARCHIVED Kiwix Hotspot
Commits
91dc08e3
Commit
91dc08e3
authored
Jul 24, 2018
by
rgaudin
Browse files
forbid admin login and password from being equal as mediawiki (wikifundi) does not allow it
parent
4fb80afa
Changes
3
Hide whitespace changes
Inline
Side-by-side
pibox-installer/backend/ansiblecube.py
View file @
91dc08e3
...
...
@@ -124,7 +124,7 @@ def build_extra_vars(name, timezone, language, language_name, wifi_pwd,
'captive_portal'
:
True
,
'custom_branding_path'
:
'/tmp'
,
'admin_account'
:
"admin"
,
'admin_password'
:
"admin"
,
'admin_password'
:
"admin
-password
"
,
}
if
wifi_pwd
:
...
...
pibox-installer/gui.py
View file @
91dc08e3
...
...
@@ -870,8 +870,8 @@ class Application:
"login"
:
self
.
component
.
admin_account_login_entry
.
get_text
(),
"pwd"
:
self
.
component
.
admin_account_pwd_entry
.
get_text
(),
}
login_condition
=
len
(
admin_account
[
"login"
])
<=
31
and
set
(
admin_account
[
"login"
])
<=
set
(
string
.
ascii_uppercase
+
string
.
ascii_lowercase
+
string
.
digits
)
pwd_condition
=
len
(
admin_account
[
"pwd"
])
<=
31
and
set
(
admin_account
[
"pwd"
])
<=
set
(
string
.
ascii_uppercase
+
string
.
ascii_lowercase
+
string
.
digits
)
login_condition
=
len
(
admin_account
[
"login"
])
<=
31
and
set
(
admin_account
[
"login"
])
<=
set
(
string
.
ascii_uppercase
+
string
.
ascii_lowercase
+
string
.
digits
+
'-'
+
'_'
)
pwd_condition
=
len
(
admin_account
[
"pwd"
])
<=
31
and
set
(
admin_account
[
"pwd"
])
<=
set
(
string
.
ascii_uppercase
+
string
.
ascii_lowercase
+
string
.
digits
+
'-'
+
'_'
)
and
(
admin_account
[
"pwd"
]
!=
admin_account
[
"login"
]
)
self
.
component
.
admin_account_login_constraints_revealer
.
set_reveal_child
(
not
login_condition
)
self
.
component
.
admin_account_pwd_constraints_revealer
.
set_reveal_child
(
not
pwd_condition
)
validate_label
(
self
.
component
.
admin_account_login_label
,
login_condition
)
...
...
ui.glade
View file @
91dc08e3
...
...
@@ -395,7 +395,7 @@
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Must contains only 1 to 31 ASCII letters 'A' to 'z'
and digits '0' to '9' and hyphen '-'
</property>
and digits '0' to '9'
, space
and hyphen '-'
</property>
<attributes>
<attribute
name=
"foreground"
value=
"#efef29292929"
/>
</attributes>
...
...
@@ -780,8 +780,8 @@ and digits '0' to '9'</property>
<object
class=
"GtkLabel"
id=
"no_id_72"
>
<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'
and
digits '0' to '9'
</property>
<property
name=
"label"
translatable=
"yes"
>
Must contains only 0 to 31 ASCII letters 'A' to 'z'
,
digits '0' to '9'
, hyphen '_' and underscore '_'
</property>
<attributes>
<attribute
name=
"foreground"
value=
"#efef29292929"
/>
</attributes>
...
...
@@ -840,8 +840,9 @@ and digits '0' to '9'</property>
<object
class=
"GtkLabel"
id=
"no_id_74"
>
<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'
and digits '0' to '9'
</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>
<attributes>
<attribute
name=
"foreground"
value=
"#efef29292929"
/>
</attributes>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment