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

Mvolz created this task.Jun 21 2018, 10:20 AM
Restricted Application added a project: VisualEditor. · View Herald TranscriptJun 21 2018, 10:20 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Mvolz updated the task description. (Show Details)Jun 21 2018, 10:21 AM
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)
Mvolz updated the task description. (Show Details)Jun 21 2018, 10:35 AM

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

mobrovac moved this task from Backlog to Waiting on Deploy on the Citoid board.Jun 21 2018, 1:02 PM

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)

Vvjjkkii renamed this task from Trailing single quote in DOIs breaks citoid to ejaaaaaaaa.Jul 1 2018, 1:02 AM
Vvjjkkii removed Mvolz as the assignee of this task.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
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.
Mvolz added a subscriber: gerritbot.EditedJul 1 2018, 8:53 AM

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?

Mvolz moved this task from Waiting on Deploy to Production on the Citoid board.Jul 2 2018, 12:14 PM
CommunityTechBot updated the task description. (Show Details)