From 1616d5a81ef58270911b0f3f350f1ef838896b23 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Thu, 14 Aug 2008 19:19:05 +0000 Subject: Enable more sanity checks for Password Changing page --- modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'modules/admin-full/luasrc/model/cbi') diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua b/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua index 7e766d5ebd..8ff18cb5cf 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/passwd.lua @@ -27,16 +27,15 @@ end function f.handle(self, state, data) if state == FORM_VALID then local stat = luci.sys.user.setpasswd("root", data.pw1) == 0 - local x = f:field(DummyValue, "_stat") if stat then - x.value = translate("a_s_changepw_changed") + f.message = translate("a_s_changepw_changed") else - x.value = translate("unknownerror") + f.errmessage = translate("unknownerror") end - pw1.render = function() end - pw2.render = pw1.render + data.pw1 = nil + data.pw2 = nil end return true end -- cgit v1.2.3