Page MenuHomePhabricator

Uploading a photo when not logged into commons
Closed, ResolvedPublic

Description

If you are logged into en.m.wikipedia.org but not commons the photo upload button appears and all uploads via it fail. This is very sad.


Version: unspecified
Severity: critical

Details

Reference
bz45452

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:28 AM
bzimport set Reference to bz45452.

jgonera wrote:

"Not logged into Commons" situation should not ever happen in the first place. I'd rather fix it than change the code to accommodate to it.
https://gerrit.wikimedia.org/r/#/c/51815/

I can consistently replicate this on ios 6.1.2:

  • Clear browser settings on iphone
  • Using google search search for 'wiki'
  • On wiki article click settings and opt into beta
  • click donate image
  • log in as jdlrobson 2013
  • click return to Special:DonateImage

(uploads now fail)

Looking closer at debug console, the login to commons seems to fail. This only seems to effect the first login:

https
Host commons.wikimedia.org
Path /wiki/Special:AutoLogin
Query String token=xxxx
Filename Special:AutoLogin

Token: xxxxx

Request:
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 6_1_2 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10B146 Safari/8536.25

Referrer: https://en.m.wikipedia.org/w/index.php?title=Special:UserLogin&action=submitlogin&type=login&returnto=Special:DonateImage

Response

Date: Wed, 06 Mar 2013 01:58:42 GMT
X-Content-Type-Options: nosniff
X-Cache-Lookup: MISS from cp1012.eqiad.wmnet:3128, MISS from cp1003.eqiad.wmnet:80
X-Cache: MISS from cp1012.eqiad.wmnet, MISS from cp1003.eqiad.wmnet
Connection: keep-alive
Content-Length: 825
Server: nginx/1.1.19
Content-Type: image/png

Cache-Control: private, s-maxage=0, max-age=0, must-revalidate

Set-Cookie: centralauth_User=Jdlrobson+2013; expires=Mon, 02-Sep-2013 01:58:42 GMT; path=/; domain=commons.wikimedia.org; secure; httponly, centralauth_Token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=commons.wikimedia.org; secure; httponly, centralauth_Session=8b4b3615b38bxxxxc7549c2e47b43034; path=/; domain=commons.wikimedia.org; secure; httponly

Simplified steps to reproduce:

Expected: you should be logged into commons but you are not...

Pretty sure I've worked this out. The iPhone has a default setting to not accept cookies from websites that haven't been visited.

Probably an upstream CentralAuth error but have added a workaround in the meantime..
https://gerrit.wikimedia.org/r/52354

https://gerrit.wikimedia.org/r/51080 (Gerrit Change Ie0d018de4bb8f86e2dec717a9ed4e1bd5b79119a) | change ABANDONED [by com.google.gerrit.server.events.AccountAttribute@8c05ca]

https://gerrit.wikimedia.org/r/#/c/54813/1 should take care of this as an interim solution to sorting out bigger issues with CentralAuth.