Software /
code /
prosody
Comparison
plugins/mod_component.lua @ 8146:5c91fb62338e
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 17 May 2017 01:06:20 +0200 |
parent | 7887:93fd15b5ec1b |
parent | 8134:b87e281a7d59 |
child | 8235:7d9a2c200736 |
comparison
equal
deleted
inserted
replaced
8133:102e1ec8bee1 | 8146:5c91fb62338e |
---|---|
64 (session.log or log)("warn", "Invalid component handshake for host: %s", session.host); | 64 (session.log or log)("warn", "Invalid component handshake for host: %s", session.host); |
65 session:close("not-authorized"); | 65 session:close("not-authorized"); |
66 return true; | 66 return true; |
67 end | 67 end |
68 | 68 |
69 local secret = module:get_option("component_secret"); | 69 local secret = module:get_option_string("component_secret"); |
70 if not secret then | 70 if not secret then |
71 (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host); | 71 (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host); |
72 session:close("not-authorized"); | 72 session:close("not-authorized"); |
73 return true; | 73 return true; |
74 end | 74 end |