Software /
code /
prosody-modules
Diff
mod_host_guard/mod_host_guard.lua @ 685:19698c5f3ab3
mod_host_guard: prevent possible traces in case there isn't a conn object on the session by adding a dummy replacement function.
author | Marco Cirillo <maranda@lightwitch.org> |
---|---|
date | Sun, 27 May 2012 04:44:24 +0000 |
parent | 684:27529031890b |
child | 686:592cfa6cf5d9 |
line wrap: on
line diff
--- a/mod_host_guard/mod_host_guard.lua Sun May 27 02:44:06 2012 +0000 +++ b/mod_host_guard/mod_host_guard.lua Sun May 27 04:44:24 2012 +0000 @@ -29,7 +29,7 @@ end local function rr_hook (event) - local from_host, to_host, send, stanza = event.from_host, event.to_host, event.origin.send, event.stanza + local from_host, to_host, send, stanza = event.from_host, event.to_host, (event.origin and event.origin.send) or function() end, event.stanza if guard_blockall:contains(from_host) and not guard_ball_wl:contains(to_host) or guard_block_bl:contains(to_host) and guard_protect:contains(from_host) then