proto/ipv6: emit a validation error if 6in4 username is still an md5sum
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
3ebb519411
commit
e1e6b675fc
1 changed files with 12 additions and 3 deletions
|
@ -66,13 +66,22 @@ tunnelid:depends("_update", update.enabled)
|
||||||
|
|
||||||
|
|
||||||
username = section:taboption("general", Value, "username",
|
username = section:taboption("general", Value, "username",
|
||||||
translate("HE.net user ID"),
|
translate("HE.net username"),
|
||||||
translate("This is the 32 byte hex encoded user ID, not the login name"))
|
translate("This is the plain username for logging into the account"))
|
||||||
|
|
||||||
username:depends("_update", update.enabled)
|
username:depends("_update", update.enabled)
|
||||||
|
username.validate = function(self, val, sid)
|
||||||
|
if type(val) == "string" and #val == 32 and val:match("^[a-fA-F0-9]+$") then
|
||||||
|
return nil, translate("The HE.net endpoint update configuration changed, you must now use the plain username instead of the user ID!")
|
||||||
|
end
|
||||||
|
return val
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
password = section:taboption("general", Value, "password", translate("HE.net password"))
|
password = section:taboption("general", Value, "password",
|
||||||
|
translate("HE.net password"),
|
||||||
|
translate("This is either the \"Update Key\" configured for the tunnel or the account password if no update key has been configured"))
|
||||||
|
|
||||||
password.password = true
|
password.password = true
|
||||||
password:depends("_update", update.enabled)
|
password:depends("_update", update.enabled)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue