StopMobileRedirectCookie is rejected on some domains
Closed, ResolvedPublic

Description

When MFStopRedirectCookieHost config variable is not set MobileContext will try to find the base domain by itself.
MobileContext::getBaseDomain() will pick up only last two domain parts. Browsers will reject this cookie when last parts are public suffix. for example:

  • wmflabs.org
  • co.uk
  • com.pl

There are 2 solutions :

  • find a better way to calculate base domain
  • use the default domain, which is set automatically by WebResponse::setCookie()

Event Timeline

ovasileva moved this task from Incoming to 2016-17 Q2 on the Web-Team-Backlog board.

Change 321796 had a related patch set uploaded (by Pmiazga):
Fix MobileContenxt::getBaseDomain() method

https://gerrit.wikimedia.org/r/321796

Change 321796 merged by jenkins-bot:
Fix MobileContext::getBaseDomain() method

https://gerrit.wikimedia.org/r/321796

phuedx subscribed.

This will be tested and signed off as part of T148975.