Fixed IPv6 fix for trusted proxies.

This commit is contained in:
Thulinma 2016-04-29 15:44:13 +02:00
parent 760ccaa00a
commit 4c1760f5f7

View file

@ -394,7 +394,10 @@ namespace Mist {
}
}
//Make sure to also check for IPv6 addresses
return trustedProxies.count(ip) > 0 || trustedProxies.count("::ffff:"+ip) > 0;
if (ip.substr(0, 7) == "::ffff:" && trustedProxies.count(ip.substr(7))){
return true;
}
return trustedProxies.count(ip) > 0;
}
/*LTS-END*/
/*begin-roxlu*/