Commit 989cac3f authored by HgO's avatar HgO
Browse files

fix password min length

parent e14edd6b
This diff is collapsed.
This diff is collapsed.
...@@ -61,12 +61,13 @@ CUSTOM_SCRIPT_NAME="custom_neutrinet_specifics.sh" ...@@ -61,12 +61,13 @@ CUSTOM_SCRIPT_NAME="custom_neutrinet_specifics.sh"
CUSTOM_SCRIPT_PATH="${CUBE_RESOURCES_LOCATION}/$CUSTOM_SCRIPT_NAME" CUSTOM_SCRIPT_PATH="${CUBE_RESOURCES_LOCATION}/$CUSTOM_SCRIPT_NAME"
USER_CUSTOM_SCRIPT_ENABLED=false USER_CUSTOM_SCRIPT_ENABLED=false
# See https://github.com/YunoHost/yunohost/blob/master/data/actionsmap/yunohost.yml#L104 # See https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/actionsmap/yunohost.yml#L82
LOGIN_PATTERN='^[a-z0-9_]+$' LOGIN_PATTERN='^[a-z0-9_]+$'
# See https://github.com/YunoHost/yunohost/blob/master/data/actionsmap/yunohost.yml#L112 # See https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/actionsmap/yunohost.yml#L90
NAME_PATTERN='^([^\W\d_]{2,30}[ ,.'\''-]{0,3})+$' NAME_PATTERN='^([^\W\d_]{2,30}[ ,.'\''-]{0,3})+$'
# See https://github.com/YunoHost/yunohost/blob/debian/2.4.0.4/data/actionsmap/yunohost.yml#L138 # See https://github.com/YunoHost/yunohost/blob/stretch-unstable/src/yunohost/utils/password.py
PASSWORD_PATTERN='^.{3,}$' PASSWORD_PATTERN='^.{8,}$'
PASSWORD_PATTERN_DESCRIPTION=$"Password must have 8 symbols or more."
WIFI_SSID_PATTERN='^[\w\d\-_\.,!\? ]{1,32}$' WIFI_SSID_PATTERN='^[\w\d\-_\.,!\? ]{1,32}$'
# See https://github.com/YunoHost/issues/issues/1319 # See https://github.com/YunoHost/issues/issues/1319
WIFI_PASSWORD_PATTERN='^[^\{\}]{8,63}$' WIFI_PASSWORD_PATTERN='^[^\{\}]{8,63}$'
...@@ -576,12 +577,12 @@ function create_hypercube_file() { ...@@ -576,12 +577,12 @@ function create_hypercube_file() {
prompt_pwd user_pwd $"Please provide your user password" \ prompt_pwd user_pwd $"Please provide your user password" \
$"Use a strong password! See https://ssd.eff.org/en/module/creating-strong-passwords for advice" \ $"Use a strong password! See https://ssd.eff.org/en/module/creating-strong-passwords for advice" \
"$PASSWORD_PATTERN" \ "$PASSWORD_PATTERN" \
$"Password must have 3 symbols or more." "$PASSWORD_PATTERN_DESCRIPTION"
prompt_pwd admin_pwd $"Please provide the admin password" \ prompt_pwd admin_pwd $"Please provide the admin password" \
$"Use a strong password! See https://ssd.eff.org/en/module/creating-strong-passwords for advice\nThis will let you access the admin console of your internet cube." \ $"Use a strong password! See https://ssd.eff.org/en/module/creating-strong-passwords for advice\nThis will let you access the admin console of your internet cube." \
"$PASSWORD_PATTERN" \ "$PASSWORD_PATTERN" \
$"Password must have 3 symbols or more." "$PASSWORD_PATTERN_DESCRIPTION"
info $"You will now need to enter your Neutrinet VPN certificates and credentials" info $"You will now need to enter your Neutrinet VPN certificates and credentials"
info $"If you want to reuse certificates from a previous install, you can find everything on that cube as user.crt, user.key, ca-server.crt and credentials in /etc/openvpn/keys" info $"If you want to reuse certificates from a previous install, you can find everything on that cube as user.crt, user.key, ca-server.crt and credentials in /etc/openvpn/keys"
...@@ -594,7 +595,7 @@ function create_hypercube_file() { ...@@ -594,7 +595,7 @@ function create_hypercube_file() {
prompt_pwd vpn_pwd $"VPN password" \ prompt_pwd vpn_pwd $"VPN password" \
$"Password you choose when ordering your VPN.\nIf you have lost your password, please contact a Neutrinet admin." \ $"Password you choose when ordering your VPN.\nIf you have lost your password, please contact a Neutrinet admin." \
"$PASSWORD_PATTERN" \ "$PASSWORD_PATTERN" \
$"Password must have 3 symbols or more." "$PASSWORD_PATTERN_DESCRIPTION"
location_has_error=true location_has_error=true
while $location_has_error while $location_has_error
......
Supports Markdown
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