Page MenuHomePhabricator

Desktop view link on private wiki login required pages is broken
Open, LowPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
You end up on Special:Badtitle on the desktop site

What should have happened instead?:
You end up on the same page on the desktop site

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

I think this has been broken since the beginning - we set the title to Special:BadTitle on read permission errors; the code was added in 2011.

Not sure there's an easy way to fix it. You could pass something like wfExpandUrl( WebRequest::getRequestUrl() ) to MobileContext::getMobileUrl(), instead of Title::getFullUrl(), but I'm not 100% sure of the security implications

Per IRC dicussion, the way to go is probably to copy/share the logic in SkinComponentUtils::getReturnToParam() which handles this edge case.