summaryrefslogtreecommitdiffhomepage
path: root/protocols
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2014-07-01 11:09:38 +0000
committerJo-Philipp Wich <jow@openwrt.org>2014-07-01 11:09:38 +0000
commite1e6b675fcf3569609ed4b3122c55c84c944bd92 (patch)
tree2a8ebe4bf8cdb09e854f19a2fb6b61a75eb8ba83 /protocols
parent3ebb5194116ef7c8f411f87764349072660554d0 (diff)
proto/ipv6: emit a validation error if 6in4 username is still an md5sum
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'protocols')
-rw-r--r--protocols/ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua15
1 files changed, 12 insertions, 3 deletions
diff --git a/protocols/ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua b/protocols/ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua
index b4cba5887..9b668cdda 100644
--- a/protocols/ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua
+++ b/protocols/ipv6/luasrc/model/cbi/admin_network/proto_6in4.lua
@@ -66,13 +66,22 @@ tunnelid:depends("_update", update.enabled)
username = section:taboption("general", Value, "username",
- translate("HE.net user ID"),
- translate("This is the 32 byte hex encoded user ID, not the login name"))
+ translate("HE.net username"),
+ translate("This is the plain username for logging into the account"))
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"),
+ translate("This is either the \"Update Key\" configured for the tunnel or the account password if no update key has been configured"))
-password = section:taboption("general", Value, "password", translate("HE.net password"))
password.password = true
password:depends("_update", update.enabled)