Page MenuHomePhabricator

ApiSandbox incorrectly converts spaces from URL parameters
Closed, ResolvedPublic

Description

It seems to only convert the first one; someone missed a g flag somewhere?

Steps to reproduce:

  1. Visit this URL
  2. Press make request, and notice that the request succeeds. Note that spaces in the titles parameter in the URL have been correctly converted to pluses
  3. Reload the page, press make request again, and notice that the request fails due to all but the first plus not being converted back to a space.

Details

Event Timeline

Majr created this task.Feb 25 2016, 6:19 AM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald TranscriptFeb 25 2016, 6:19 AM
Majr claimed this task.Feb 25 2016, 7:08 AM

Change 273208 had a related patch set uploaded (by Anomie):
ApiSandbox: Fix String.replace call

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

Anomie moved this task from Unsorted to Needs Review on the MediaWiki-API board.Feb 25 2016, 1:03 PM
Majr added a comment.Feb 25 2016, 1:15 PM

I already submitted a patch for this when I claimed it, but the bot obviously ignored it for some reason...

https://gerrit.wikimedia.org/r/#/c/273186/

Change 273186 had a related patch set uploaded (by Anomie):
ApiSandbox: Convert all pluses in URL to spaces, not just the first one

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

Change 273208 abandoned by Anomie:
ApiSandbox: Fix String.replace call

Reason:
I45607c1e already exists.

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

Anomie added a subscriber: Anomie.Feb 25 2016, 1:30 PM

I already submitted a patch for this when I claimed it, but the bot obviously ignored it for some reason...

The footer is "Bug:", not "Task:". You can see the bot picked it up when I adjusted that (and misattributed it to me since it goes by "uploader" rather than "author").

Change 273186 merged by jenkins-bot:
ApiSandbox: Convert all pluses in URL to spaces, not just the first one

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

Anomie closed this task as Resolved.Feb 25 2016, 3:14 PM