From 43ac64370f5e8d53ecf874048c27d493c5bc01b4 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sun, 24 Jan 2016 22:24:30 +0000 Subject: Add password.listlockevents/unlockuser/unlockip actions to acf-util password.status now reports locked status for each user Modified session lib to add list_events/delete_events Changed session.record_event/count_events to take IP rather than hash --- app/acf_www-controller.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/acf_www-controller.lua') diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua index 614cd75..61dac76 100644 --- a/app/acf_www-controller.lua +++ b/app/acf_www-controller.lua @@ -277,13 +277,12 @@ mymodule.mvc.on_load = function (self, parent) self.clientdata.sessionid) if timestamp == nil then -- invalid session id, report event and create new one - sessionlib.record_event(self.conf.sessiondir, nil, - sessionlib.hash_ip_addr(self.conf.clientip)) + sessionlib.record_event(self.conf.sessiondir, nil, self.conf.clientip) --self.logevent("Didn't find session") else --self.logevent("Found session") -- We read in a valid session, check if it's ok - if self.sessiondata.userinfo and self.sessiondata.userinfo.userid and sessionlib.count_events(self.conf.sessiondir, self.sessiondata.userinfo.userid, sessionlib.hash_ip_addr(self.conf.clientip), self.conf.lockouttime, self.conf.lockouteventlimit) then + if self.sessiondata.userinfo and self.sessiondata.userinfo.userid and sessionlib.count_events(self.conf.sessiondir, self.sessiondata.userinfo.userid, self.conf.clientip, self.conf.lockouttime, self.conf.lockouteventlimit) then --self.logevent("Bad session, erasing") -- Too many events on this id / ip, kill the session sessionlib.unlink_session(self.conf.sessiondir, self.clientdata.sessionid) -- cgit v1.2.3