Skip to content

Commit

Permalink
{...}: some minor fixes...
Browse files Browse the repository at this point in the history
- Correct parent host patternization in mod_muc_limits
- Make http_file_delete_secret option required only if http_file_external_delete_url is defined
  • Loading branch information
maranda committed Oct 28, 2018
1 parent 20ad4f5 commit 0cf95f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion plugins/http_upload_external/mod_http_upload_external.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ local file_cleanup_whitelist = module:get_option_set("http_file_no_expire_whitel
local base_url = assert(module:get_option_string("http_file_external_url"), "http_file_external_url is a required option");
local delete_base_url = module:get_option_string("http_file_external_delete_url");
local secret = assert(module:get_option_string("http_file_secret"), "http_file_secret is a required option");
local delete_secret = assert(module:get_option_string("http_file_delete_secret"), "http_file_delete_secret is a required option");
local delete_secret = delete_base_url and assert(
module:get_option_string("http_file_delete_secret"), "http_file_delete_secret is a required option if deletion is enabled");

-- namespace
local legacy_namespace = "urn:xmpp:http:upload";
Expand Down
2 changes: 1 addition & 1 deletion plugins/mod_muc_limits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ local xmlns_muc = "http://jabber.org/protocol/muc";
local period = math.max(module:get_option_number("muc_event_rate", 0.5), 0);
local burst = math.max(module:get_option_number("muc_burst_factor", 6), 1);
local exclusion_list = module:get_option_set("muc_throttle_host_exclusion");
local parent_host = module:get_option_boolean("muc_whitelist_parent_peers") == true and module.host:match("%.(.*)");
local parent_host = module:get_option_boolean("muc_whitelist_parent_peers") == true and module.host:match("%.([^%.].*)");
local disconnect_after = module:get_option_number("muc_disconnect_after_throttles", 20);
local use_gate_guard = module:get_option_boolean("muc_use_gate_guard", true);
local gate_guard_hits = module:get_option_number("muc_gate_guard_max_hits", 150);
Expand Down

0 comments on commit 0cf95f9

Please sign in to comment.