Software /
code /
prosody-modules
Changeset
1941:2a5a44d5b935
mod_limit_auth: Only apply limit to normal c2s sessions (thanks cuc)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 30 Oct 2015 17:47:48 +0100 |
parents | 1940:453eee191e18 |
children | 1942:ff95d983940c |
files | mod_limit_auth/mod_limit_auth.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_limit_auth/mod_limit_auth.lua Wed Oct 28 16:16:59 2015 +0100 +++ b/mod_limit_auth/mod_limit_auth.lua Fri Oct 30 17:47:48 2015 +0100 @@ -34,6 +34,7 @@ module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:auth", function (event) local origin = event.origin; + if origin.type ~= "c2s_unauthed" then return end if not get_throttle(origin.ip):peek(1) then origin.log("warn", "Too many authentication attepmts for ip %s", origin.ip); tarpit_delay();