diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-18 17:36:46 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-18 17:36:46 +0200 |
commit | 782117034dc44969e35e4d35663045e5658b2913 (patch) | |
tree | a89e877c6e83d9aa3b79825812361591bf12bf2e /plugins | |
parent | 5e5b45be6ea322d815872a499ba85d4584cd28fd (diff) | |
parent | f30f5f62189373fe8a2081d1117fbc2977331f26 (diff) | |
download | prosody-782117034dc44969e35e4d35663045e5658b2913.tar.gz prosody-782117034dc44969e35e4d35663045e5658b2913.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_http.lua | 3 | ||||
-rw-r--r-- | plugins/mod_register.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index 81417cad..975663a5 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -18,6 +18,9 @@ local server = require "net.http.server"; server.set_default_host(module:get_option_string("http_default_host")); +server.set_option("body_size_limit", module:get_option_number("http_max_content_size")); +server.set_option("buffer_size_limit", module:get_option_number("http_max_buffer_size")); + local function normalize_path(path) if path:sub(-1,-1) == "/" then path = path:sub(1, -2); end if path:sub(1,1) ~= "/" then path = "/"..path; end diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index fda717f7..df833cad 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -226,7 +226,7 @@ module:hook("stanza/iq/jabber:iq:register:query", function(event) session.send(st.error_reply(stanza, "cancel", "not-acceptable", "You are not allowed to register an account.")); return true; elseif min_seconds_between_registrations and not whitelisted_ips[session.ip] then - if check_throttle(session.ip) then + if not check_throttle(session.ip) then session.send(st.error_reply(stanza, "wait", "not-acceptable")); return true; end |