Page MenuHomePhabricator

Trailing single quote in DOIs breaks citoid
Open, MediumPublic

Description

https://en.wikipedia.org/api/rest_v1/data/citation/mediawiki/10.1017%2Fs0305004100013554'

gives

{

"type": "https://mediawiki.org/wiki/HyperSwitch/errors/not_found",
"title": "Not found.",
"method": "get",
"uri": "/en.wikipedia.org/v1/data/citation/mediawiki/10.1017%2Fs0305004100013554'"

}

instead of the expected error

{ Error: Unable to resolve DOI }

and

http://DOI.org/10.1007/11926078_68'

gives

[

{
  "url": "http://DOI.org/10.1007/11926078_68'",
  "itemType": "journalArticle",
  "DOI": "10.1007/11926078_68%27"
}

]

instead of the expected 404.

0.1642/0004-8038(2005)122[0673:PROAGP]2.0.CO;2

Also causes hyperswitch error instead of an expected error

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mvolz renamed this task from Unexpected hyperswitch error in production in citoid from bad input to Trailing single quote in DOIs breaks citoid.Jun 21 2018, 10:32 AM
Mvolz claimed this task.
Mvolz triaged this task as High priority.
Mvolz updated the task description. (Show Details)

Change 441383 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/services/citoid@master] Make crossref method fail

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

Change 441383 merged by jenkins-bot:
[mediawiki/services/citoid@master] Make crossref method fail

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

Mentioned in SAL (#wikimedia-operations) [2018-06-29T10:21:32Z] <mobrovac@deploy1001> Finished deploy [citoid/deploy@40cdff7]: Update citoid to fd77117 - T165105 T197853 (duration: 03m 26s)

Mvolz renamed this task from ejaaaaaaaa to Trailing single quote in DOIs breaks citoid.Jul 1 2018, 8:50 AM
Mvolz lowered the priority of this task from High to Medium.
Mvolz updated the task description. (Show Details)
Mvolz removed a subscriber: Stashbot.

Change 441383 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/services/citoid@master] Make crossref method fail

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

This patched solved this issue:

and

http://DOI.org/10.1007/11926078_68'

gives

[

{
  "url": "http://DOI.org/10.1007/11926078_68'",
  "itemType": "journalArticle",
  "DOI": "10.1007/11926078_68%27"
}

]

But not the underlying issue. That now returns a hyperswitch error as well. The underlying issue is that ' is not url encoded, and citoid is fine with treating this as a valid string, but hyperswitch seems to have a problem with it?

' usually gets encoded into %27. As the first part of the search string is url-encoded, might this be a copy/paste mistake or something similar?

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)