Page MenuHomePhabricator

Echo double-encodes URI 'fragment' part when removing the 'markasread' parameter
Closed, ResolvedPublic

Details

Related Gerrit Patches:

Event Timeline

matmarex created this task.Dec 27 2017, 4:54 AM
Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptDec 27 2017, 4:54 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Catrope added a subscriber: Catrope.Jan 9 2018, 6:42 PM

We're not doing anything weird in Echo:

// Remove ?markasread=XYZ from the URL
var uri = new mw.Uri();
if ( uri.query.markasread !== undefined ) {
        delete uri.query.markasread;
        window.history.replaceState( null, document.title, uri );
}

So I strongly suspect this is a bug in mw.Uri.

Change 405377 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/core@master] mediawiki.Uri: Don't double-escape fragments

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

Change 405377 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.Uri: Don't double-escape fragments

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

Checked the fix in testwiki (wmf.20) - no double-encoding in URI when markasread is removed.

Etonkovidova closed this task as Resolved.Feb 7 2018, 11:23 PM