mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Use correct virtual host when consulting trusted_proxies
This commit is contained in:
parent
9c2392f6e9
commit
15dcff92e8
@ -530,7 +530,8 @@ analyze_ip_xff(IP, [], _Host) -> IP;
|
|||||||
analyze_ip_xff({IPLast, Port}, XFF, Host) ->
|
analyze_ip_xff({IPLast, Port}, XFF, Host) ->
|
||||||
[ClientIP | ProxiesIPs] = str:tokens(XFF, <<", ">>) ++
|
[ClientIP | ProxiesIPs] = str:tokens(XFF, <<", ">>) ++
|
||||||
[misc:ip_to_list(IPLast)],
|
[misc:ip_to_list(IPLast)],
|
||||||
TrustedProxies = ejabberd_option:trusted_proxies(Host),
|
ServerHost = ejabberd_router:host_of_route(Host),
|
||||||
|
TrustedProxies = ejabberd_option:trusted_proxies(ServerHost),
|
||||||
IPClient = case is_ipchain_trusted(ProxiesIPs,
|
IPClient = case is_ipchain_trusted(ProxiesIPs,
|
||||||
TrustedProxies)
|
TrustedProxies)
|
||||||
of
|
of
|
||||||
|
Loading…
Reference in New Issue
Block a user