summaryrefslogtreecommitdiffstats
path: root/app/acf_www-controller.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2016-01-24 22:24:30 +0000
committerTed Trask <ttrask01@yahoo.com>2016-01-24 22:24:30 +0000
commit43ac64370f5e8d53ecf874048c27d493c5bc01b4 (patch)
treea560b46ea47a32929e4cfa894309997cb35b2cfe /app/acf_www-controller.lua
parentb42210d80281189875c652909b971fcb514ec8b2 (diff)
downloadacf-core-43ac64370f5e8d53ecf874048c27d493c5bc01b4.tar.bz2
acf-core-43ac64370f5e8d53ecf874048c27d493c5bc01b4.tar.xz
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
Diffstat (limited to 'app/acf_www-controller.lua')
-rw-r--r--app/acf_www-controller.lua5
1 files changed, 2 insertions, 3 deletions
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)