25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

trusted_proxies option not parsed correctly (#860)

This commit is contained in:
Badlop 2015-12-04 13:14:39 +01:00
parent ba916c3162
commit daad71bc7e

View File

@ -481,7 +481,8 @@ analyze_ip_xff({IPLast, Port}, XFF, Host) ->
[jlib:ip_to_list(IPLast)],
TrustedProxies = ejabberd_config:get_option(
{trusted_proxies, Host},
fun(TPs) ->
fun(all) -> all;
(TPs) ->
[iolist_to_binary(TP) || TP <- TPs]
end, []),
IPClient = case is_ipchain_trusted(ProxiesIPs,
@ -879,5 +880,6 @@ transform_listen_option(Opt, Opts) ->
[Opt|Opts].
opt_type(trusted_proxies) ->
fun (TPs) -> [iolist_to_binary(TP) || TP <- TPs] end;
fun (all) -> all;
(TPs) -> [iolist_to_binary(TP) || TP <- TPs] end;
opt_type(_) -> [trusted_proxies].