Mercurial > prosody-modules
comparison mod_disable_tls/mod_disable_tls.lua @ 1482:25be5fde250f
mod_disable_tls: Default to empty set if disable_tls_ports not present in config (fixes traceback)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 10 Aug 2014 13:08:56 +0100 |
| parents | e10e74583b5f |
| children |
comparison
equal
deleted
inserted
replaced
| 1481:e10e74583b5f | 1482:25be5fde250f |
|---|---|
| 1 local disable_tls_ports = module:get_option_set("disable_tls_ports"); | 1 local disable_tls_ports = module:get_option_set("disable_tls_ports", {}); |
| 2 | 2 |
| 3 module:hook("stream-features", function (event) | 3 module:hook("stream-features", function (event) |
| 4 if disable_tls_ports:contains(event.origin.conn:serverport()) then | 4 if disable_tls_ports:contains(event.origin.conn:serverport()) then |
| 5 module:log("error", "Disabling TLS for client on port %d", event.origin.conn:serverport()); | 5 module:log("error", "Disabling TLS for client on port %d", event.origin.conn:serverport()); |
| 6 event.origin.conn.starttls = false; | 6 event.origin.conn.starttls = false; |
