ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: emanuele on June 16, 2014, 04:30:35 am

Title: [1.0 - blocker] expandIPv6 fails
Post by: emanuele on June 16, 2014, 04:30:35 am
Just in the error log...

expandIPv6 is not able to properly expand the following:
Code: [Select]
'::ffff:179.43.134.165'

According to for example http://www.find-ipv6.com/ipv6-expand/ the correct expansion would be:
Code: [Select]
0000:0000:0000:0000:0000:FFFF:B32B:86A5
what we obtain, instead, is:
Code: [Select]
0000:0000:0000:0000:0000:0000:ffff:179.43.134.165
so the IPv4 part is not converted to IPv6.
Title: Re: [1.0 - blocker] expandIPv6 fails
Post by: emanuele on June 16, 2014, 06:01:41 am
https://github.com/elkarte/Elkarte/pull/1633

Should fix it, though I'm not entirely sure about all the combinations... :-\
I was looking for some set of IPs to do testing, but I didn't find anything.
Title: Re: [1.0 - blocker] expandIPv6 fails
Post by: Spuds on June 16, 2014, 08:40:19 am
Good catch!  Was that in the error log?
Title: Re: [1.0 - blocker] expandIPv6 fails
Post by: emanuele on June 16, 2014, 08:41:58 am
Yep, one of the query in Security.php using constructBanQueryIP was failing due to nothing being set in the return of convertIPv6toInts.