Page MenuHomePhabricator

Citoid ignores query string parameters for non-www urls without protocol
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Use the Citoid service to get a citation for a url without leading http or https, and without leading www. For example: thomblake.com.au/qc_new/view_p_n.php?id=6674

What happens?:

  • Citoid returns citation results for the url without the query string. For example: thomblake.com.au/qc_new/view_p_n.php

What should have happened instead?:

  • Citoid should return a citation for the url WITH the query string, as content may change. This DOES happen if one adds the http or https at the beginning, or if the hostname starts with www.

The query string seems to be dropped in line 180 of CitoidService.js. (There is a comment in the code wondering why we do this, in fact).

If the search does not match either matchHTTP or matchWWW regexp, the url without the query string is used to construct the Citation object.

Event Timeline

Change 805342 had a related patch set uploaded (by Mvolz; author: Mvolz):

[mediawiki/services/citoid@master] Don't remove query params when protocol is missing

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

Mvolz triaged this task as Medium priority.

Change 805342 merged by jenkins-bot:

[mediawiki/services/citoid@master] Don't remove query params when protocol is missing

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