Page MenuHomePhabricator

CentralNotice: Fix GeoIP cookie synthesis or loading to prevent repeated calls to geoiplookup for IPv6 users who can't be geolocated by their address on that protocol
Closed, ResolvedPublic2 Estimated Story Points

Description

Currently if the server is unable to set a GeoIP cookie for a user (usually because they're accessing via IPv6) we try to geolocate via a background call to an IPv4-only server, which forces dual-stack users to downgrade.

We then try to save the geo data to a new cookie, but because Varnish sets the cookie using a domain wildcard and the JS code doesn't, we end up with two GeoIP cookies. When the user comes back to the site, the JS (always? sometimes?) gets the bad cookie again, so the background call is performed again.

At least a few fixes seem possible (checking all cookies in JS, or ensuring the JS-set cookie has the exact same domain setting as the server-set one). Choose one and fix it.

Relevant Varnish code.

Event Timeline

AndyRussG raised the priority of this task from to Needs Triage.
AndyRussG updated the task description. (Show Details)
AndyRussG moved this task to Triage on the Fundraising-Backlog board.
AndyRussG subscribed.

Should should hopefully get fixed incidentally via T143271, as there will only be one source of Cookie-setting: Varnish.

BBlack claimed this task.

Fixed incidentally as above