Page MenuHomePhabricator

SecurePoll: Mobile redirection on votewiki gives "not logged in" error
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
Niharika
Aug 16 2021, 10:34 PM
Referenced Files
F34598592: IMG_1153B52A0B0F-1.jpeg
Aug 17 2021, 7:48 PM
F34598595: Screen Shot 2021-08-17 at 3.27.46 PM.png
Aug 17 2021, 7:48 PM
F34598587: IMG_D29E4EFC7032-1.jpeg
Aug 17 2021, 7:48 PM
F34598590: IMG_669CDAC1EF84-1.jpeg
Aug 17 2021, 7:48 PM
F34598597: Screen Shot 2021-08-17 at 3.31.09 PM.png
Aug 17 2021, 7:48 PM
F34597867: IMG_5393.PNG
Aug 16 2021, 10:34 PM
F34597868: IMG_5391.PNG
Aug 16 2021, 10:34 PM
F34597866: IMG_5392.PNG
Aug 16 2021, 10:34 PM

Description

What's the problem?

On a mobile phone, when I jump from my local wiki to votewiki to vote in an election I see the "You're not logged in" error, however when I switch to the "Desktop" view using the Footer link, I can vote just fine.

I am not logged in on votewiki at any point.

IMG_5391.PNG (1×828 px, 456 KB)
IMG_5392.PNG (1×828 px, 241 KB)
IMG_5393.PNG (1×828 px, 406 KB)
switch to voting server from local wikiError seen on votewiki mobile siteDesktop version of votewiki on mobile

Event Timeline

Niharika created this task.
Niharika changed the subtype of this task from "Task" to "Bug Report".

I think the jump button has to go to the right server in the first place. I'm not very familiar with MobileFrontend -- I'm trying to figure out the best way to detect a mobile request and derive the right server name.

Changing subscribers after looking at the git blame.

I think it will be something like

$context = MobileContext::singleton();
if ( $context->usingMobileDomain() ) {
     $url = $context->getMobileUrl( $url );
}

I would also like to take this opportunity to plug T214998. A domain is an origin -- if you put user options there, you create an unnecessary security boundary.

Change 713379 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/extensions/SecurePoll@master] Add property mobile-jump-url

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

Change 713379 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Add property mobile-jump-url

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

Change 713352 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/extensions/SecurePoll@wmf/1.37.0-wmf.18] Add property mobile-jump-url

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

Change 713352 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@wmf/1.37.0-wmf.18] Add property mobile-jump-url

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

Change 713354 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/extensions/SecurePoll@wmf/1.37.0-wmf.19] Add property mobile-jump-url

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

Change 713354 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@wmf/1.37.0-wmf.19] Add property mobile-jump-url

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

tstarling claimed this task.

This should be fixed. I pushed out the patch and did

foreachwikiindblist securepollglobal mysql.php --write -- -e 'insert into securepoll_properties (pr_entity,pr_key,pr_value) select el_entity,'\''mobile-jump-url'\'','\''https://vote.m.wikimedia.org/wiki/Special:SecurePoll'\'' from securepoll_elections where el_title='\''Wikimedia Foundation Board Elections 2021'\'' limit 1;'

And the same for the two open test elections. I tested it on enwiki, I was able to see the voting page.

Open while we finish up QA.

The issue is resolved, below is screenshot for iphone and andriod

IMG_D29E4EFC7032-1.jpeg (2×1 px, 452 KB)
IMG_669CDAC1EF84-1.jpeg (2×1 px, 533 KB)

IMG_1153B52A0B0F-1.jpeg (2×1 px, 756 KB)

Screen Shot 2021-08-17 at 3.27.46 PM.png (1×1 px, 372 KB)

Screen Shot 2021-08-17 at 3.31.09 PM.png (1×992 px, 429 KB)