summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2018-10-28 16:40:33 +0100
committerDaniil Baturin <daniil@baturin.org>2018-10-28 16:40:33 +0100
commit6daba1eb14430aa02f8f56614188a598b383c8ef (patch)
treecaf104e0fda4f23f829b2945a316c7da2a6554f7
parent35a3b849d94cfe5ade1e713f346d31f122fe7b44 (diff)
downloadvyatta-cfg-system-6daba1eb14430aa02f8f56614188a598b383c8ef.tar.gz
vyatta-cfg-system-6daba1eb14430aa02f8f56614188a598b383c8ef.zip
T720: restrict usernames to the format useradd will accept.
This reintroduces hagbard's change that has somehow gone missing.
-rw-r--r--templates/system/login/user/node.def1
1 files changed, 1 insertions, 0 deletions
diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def
index 451cc078..5f83fe54 100644
--- a/templates/system/login/user/node.def
+++ b/templates/system/login/user/node.def
@@ -3,6 +3,7 @@ type: txt
help: User account information
syntax:expression: exec "/opt/vyatta/sbin/vyatta_check_username.pl $VAR(@)"
+syntax:expression: exec "${vyos_libexec_dir}/validate-value.py --regex \'^[a-zA-Z0-9\-_]{1,100}\' --value \'$VAR(@)\'"; "illegal characters in username or longer than 100 chars"
commit:expression: $VAR(@) == "" ||
$VAR(authentication/plaintext-password) != "" ||