Page MenuHomePhabricator

Some input to Citoid extension, may already be URL encoded, and the Citoid extension encodes it again, resulting in double-encoded input to citoid.
Closed, ResolvedPublic0 Story Points

Description

  1. Go to this url (I have tested with Firefox 48 and Chromium 52).
  2. Some special chars are displayed in address bar. Copy the URL in your clipboard. Special chars are URI encoded (with percent signs).
  3. Edit a page with VisualEditor.
  4. Add a ref clicking Cite button.
  5. Paste the URL and click on Generate button.

Actual result: this links to this URL, because percent signs are re-encoded with %25 code.

Expected result: link to good URL. Do not encode percent sign because recent browsers well auto encode and decode URLs.

  • Fix in extension

Details

Related Gerrit Patches:
mediawiki/extensions/Citoid : masterDecode input before sending to citoid

Event Timeline

Pols12 created this task.Sep 24 2016, 1:50 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 24 2016, 1:50 PM
Izno moved this task from Unsorted backlog to External on the Cite board.Sep 24 2016, 2:27 PM

Change 313428 had a related patch set uploaded (by DLynch):
Decode likely URLs before sending them to citoid

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

DLynch added a subscriber: DLynch.Sep 29 2016, 4:52 PM

I noticed that it was clearly fetching the wrong page as well, since it was showing "mauvais titre" rather than the actual article title. Therefore, the patch decodes URLs before sending them to the citoid service.

Mvolz added a subscriber: Mvolz.

This is should really be done in the backend (citoid). (But probably no harm in duplicating it on front end).

Mvolz removed a project: Cite.Sep 30 2016, 12:21 PM
Mvolz renamed this task from Cite tool should not encode percent char in URI to Some input to citoid may already be URL encoded, and the Citoid extension encodes it again, resulting in double-encoded input. .Sep 30 2016, 1:59 PM
Mvolz renamed this task from Some input to citoid may already be URL encoded, and the Citoid extension encodes it again, resulting in double-encoded input. to Some input to Citoid extension, may already be URL encoded, and the Citoid extension encodes it again, resulting in double-encoded input to citoid..

Change 313428 merged by jenkins-bot:
Decode input before sending to citoid

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

Mvolz updated the task description. (Show Details)
Mvolz closed this task as Resolved.Oct 10 2016, 2:24 PM
Mvolz updated the task description. (Show Details)
Mvolz added a comment.Oct 15 2016, 6:15 AM

Dlynch did this one actually :)

Mvolz reassigned this task from Mvolz to DLynch.Oct 15 2016, 6:15 AM