[ProfileAPI]: When sending RemoteAddress value, returns wrong country

Found in

EPiServer.Profiles.Client 1.5.0

Fixed in

EPiServer.Profiles.Client 1.7.0

Created

Aug 07, 2018

Updated

Nov 29, 2018

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Send a trackevent with information like this: /api/v1.0/Track
{
"user":

{ "name": "user55", "email": "user55@e.se" }

,
"RemoteAddress": "45.77.140.180",
"deviceId": "d255",
"eventType": "test1",
"value": "test1"
}
The value of RemoteAddress belongs to Germany (Using this page to find country of a IP address: https://www.iplocation.net/).

2. Use ProfileAPI to get trackevent: /api/v1.0/trackevents.

Expected:
Returns CountryCode: DE

Actual:
Returns CountryCode: US

Note: I have the same bug with IPv6 address, example:
RemoteAddress: 2401:58c0::5 -> Expected: Country Code is GU (Guam), but Actual: Country Code is null