summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2015-12-04 13:14:39 +0100
committerBadlop <badlop@process-one.net>2015-12-04 13:14:39 +0100
commitdaad71bc7eacc4f29b77bbed3e162cf1ca838abe (patch)
tree05fe1acd658fb531dbaa36ddb368926a21f30ab0 /src
parentXEP-0198: Fix stanza counting corner case issue (diff)
trusted_proxies option not parsed correctly (#860)
Diffstat (limited to '')
-rw-r--r--src/ejabberd_http.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ejabberd_http.erl b/src/ejabberd_http.erl
index 98567777..b764ee36 100644
--- a/src/ejabberd_http.erl
+++ b/src/ejabberd_http.erl
@@ -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].