Jdlrobson edited projects, added MediaWiki-extensions-CentralAuth, 
Readers-Web-Backlog (Tracking); removed Readers-Web-Backlog.
Jdlrobson added a comment.


  This is not a MobileFrontend issue TBH.
  
  On wikidata.org (wmf-config/InitialiseSettings.php) $wgMobileUrlTemplate is 
set to m.%h1.%h2
  
                $url = MobileContext::singleton()->getMobileUrl(
                        wfAppendQuery(
                                
"//www.wikidata.org/wiki/Special:CentralAutoLogin/start",
                                []
                        )
                );
    ```gives  "//m.wikidata.org/wiki/Special:CentralAutoLogin/start" 
    
    The only way I seem to be able to get `https://www.m.wikidata.org/...%22`  
is if I pass in 
"https://m.www.wikidata.org/wiki/Special:CentralAutoLogin/start"; which is 
garbage in.
    
    Although that works fine if I call that function with other projects, I'm 
going to get bad results. For example on English Wikipedia $wgMobileUrlTemplate 
is set to '%h0.m.%h1.%h2'. so if you call getMobileUrl on a wiki with a 
different host you are going to have a bad time.
    
    The issue should be resolved in CentralNotice  (I'm not sure who maintains 
that) however I'm not quite sure how this will work.
    
    The hook in MobileFrontend `GetMobileUrl` could be used or alternatively 
CentralNotice could make use of Varnish/redirects to determine what these links 
should be.
    
    Note:
    I remember vaguely working on a similar bug several years ago with help 
from the security team that introduced the hook GetMobileUrl.  We use to have a 
GetMobileUrl hook somewhere in our codebase, [[ 
https://codesearch.wmflabs.org/search/?q=GetMobileUrl&i=nope&files=&repos= | 
but that seems to have disappeared ]] so that might provide further clues on 
how this broke.

TASK DETAIL
  https://phabricator.wikimedia.org/T225814

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: ovasileva, Jdlrobson
Cc: darthmon_wmde, Jdlrobson, aude, Krinkle, WDoranWMF, Anomie, Stryn, 
Addshore, Reedy, Jonas, Jakob_WMDE, Legoktm, hoo, csteipp, vvv, Framawiki, 
Lydia_Pintscher, WMDE-leszek, Aklapper, Pablo-WMDE, CptViraj, DannyS712, 
wildly_boy, Nandana, Lahi, Gq86, mojoaxel, GoranSMilovanovic, QZanden, 
LawExplorer, Winter, JJMC89, _jensen, rosalieper, Agabi10, Scott_WUaS, 
Wong128hk, Wikidata-bugs, Snowolf, Mbch331, Rxy, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to