Skip to content

About

A Janeway plugin that checks a submission's references against Crossref, DataCite and doi.org.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CiteStamp reference check for Janeway

A Janeway plugin that lets a journal's editors check a submission's reference list from inside the editorial workflow. Each reference gets one of four answers from CiteStamp, and every answer names the source it came from:

  • Found: a registry returned the work's record (with its DOI link).
  • Confirm: something matched, but not cleanly. The reason says what to look at: a DOI registered to a different title, several works sharing the title, a cited journal issue whose pages hold a different work.
  • Not found in the named sources: Crossref, DataCite and doi.org don't hold it on the date checked. That isn't proof the work was never published, and the answer says so.
  • Couldn't check: a source didn't answer, or the check couldn't run. Nothing is concluded about the reference.

When the publisher has registered a notice for a cited work in Crossref (a retraction or a correction, for example), the answer says so on its own line. Server checks also say when the Retraction Watch database lists the work as retracted.

A failure is never reported as a finding. If a registry or CiteStamp can't be reached, refuses a request, hits a rate limit or sends an answer the plugin can't read, the reference reads "couldn't check", with the reason.

It's a registry lookup with named sources and dates. Use it beside your own checks.

Two levels

The free check (no key, nothing to buy). An editor opens a submission's reference check, pulls the list from the manuscript or pastes it, and presses Check references. The check runs in the editor's own browser with CiteStamp's checking engine, which ships with the plugin. Each reference goes from that browser to Crossref, DataCite and doi.org (and PubMed, by ID, for a PubMed ID given without a DOI). Nothing goes to CiteStamp. It's free, now and as a standing commitment.

Automatic checks (paid, bought inside the plugin). Each new submission's references are checked by CiteStamp's server shortly after the author submits, in the journals that turn it on, and the answers wait on the submission for its editors. Staff turn it on from the plugin's Automatic checks page: pay by card at Stripe and come straight back with it on. There's no key to copy and no one to write to. Manage billing opens Stripe's billing portal to change the card, see invoices or cancel.

What is sent, and what is kept

The free check:

  • The browser sends each reference's DOI, PubMed ID or title (and, when that doesn't settle it, more of the reference, such as its journal, volume, pages and year) to api.crossref.org, api.datacite.org, doi.org and, for a PubMed ID only, eutils.ncbi.nlm.nih.gov. No other part of the submission is sent, and nothing at all goes to CiteStamp. A PubMed request also carries the engine's name (tool=citestamp) and CiteStamp's contact address, info@citestamp.com; nothing that identifies the editor goes with it.
  • The engine is a copy of the file citestamp.com serves at /check.js, kept in the plugin's static files and loaded with a Subresource Integrity value, so the page runs only code that came with the plugin.
  • Pressing Check references first sends the list to this Janeway site, which splits it into references and keeps nothing. The plugin saves nothing about a free check. Results stay on the editor's page until they leave it, and the page is sent with Cache-Control: no-store. Copy results as text puts them on the clipboard.

Automatic checks, and a key issued by agreement:

  • A key bought with Turn on automatic checks is used only in journals that turn automatic checks on. In those journals an editor's Check references also runs on CiteStamp's server, against the same daily limit. Every other journal keeps the free check.
  • This Janeway server sends only the reference list to https://citestamp.com/api/v1/check, in batches of 10, with the installation's key. It reads the list from the manuscript: the paragraphs after its last References heading, up to the next heading or a closing section such as author information, declarations or ethics, leaving out lines that look like contact details (an email address, a phone number, an ORCID iD). The rest of the manuscript, and the submission's title, abstract, authors, reviewers, editors and journal, aren't sent.
  • CiteStamp looks each reference up in Crossref, DataCite and doi.org (and PubMed for a PubMed ID given without a DOI). It doesn't keep the references; it counts how many each key checked. See citestamp.com/privacy.
  • The answers are stored on this Janeway, with the submission, and only its editors can see them. Deleting the submission deletes them.
  • To buy automatic checks, the installation registers with CiteStamp using a secret it makes and keeps sealed. CiteStamp keeps a one-way hash of that secret, this site's address and press name, the plugin and Janeway versions it reports, the plan, Stripe's ids for the subscription, and its status and dates. Stripe takes the payment and holds the payer's name, email and card; CiteStamp keeps none of those. CiteStamp deletes what it keeps within a year of the subscription ending, and the site registers again if it buys later.
  • For a library's IT, privacy or procurement review, citestamp.com/janeway/data lists what each level sends, to whom, and how long each record is kept.

Pulling the list from a file happens on the Janeway server and only fills the text box. Nothing leaves the server until the editor reads the list and presses Check.

Who can use it

The check is off for every journal until an editor turns it on.

Page Who
Settings (Manager, Plugins, CiteStamp) the journal's editors, journal managers and staff
Reference check list (staff menu) the same
A submission's check page and its automatic results the same, plus section editors assigned to that submission
Automatic checks (buy, Manage billing) staff

An editor who is an author of a submission can't open its check page, and it isn't listed for them, staff included, in line with Janeway's own conflict rule for review pages. Every page looks the submission up within the current journal only.

Install

Requires Janeway 1.8 or later. Tested on Janeway 1.8.4 (Django 4.2, Python 3.11). Check the version before installing: Janeway refuses to load a site whose plugins ask for a newer Janeway than it runs, so on 1.7 or earlier the whole site, not only the plugin, stops loading until the plugin is removed.

cd /path/to/janeway/src/plugins
git clone <this repository> citestamp
cd /path/to/janeway
python src/manage.py install_plugins citestamp
python src/manage.py migrate citestamp
python src/manage.py collectstatic --noinput

Then restart Janeway's application server.

For automatic checks, add the plugin's command to the server's crontab, beside Janeway's own jobs:

*/5 * * * * cd /path/to/janeway/src && /path/to/python manage.py citestamp_run_checks

Updating

Janeway doesn't update plugins by itself. When a newer version is out, the plugin's automatic checks page says so. To update, from Janeway's directory:

cd src/plugins/citestamp
git pull
cd ../../..
python src/manage.py install_plugins citestamp
python src/manage.py migrate citestamp
python src/manage.py collectstatic --noinput

Then restart Janeway's application server.

Sites with a Content-Security-Policy

Janeway sends no Content-Security-Policy by default. If your site adds one, the free check needs these in connect-src:

https://api.crossref.org https://api.datacite.org https://doi.org https://eutils.ncbi.nlm.nih.gov

The engine loads from your own static files, so script-src 'self' covers it. If the policy blocks the lookups, every reference reads "couldn't check" and the page says which host the policy stopped.

Set it up for a journal

In the journal, go to Manager, Plugins, CiteStamp:

  1. Tick Show the reference check to this journal's editors for the free check.
  2. Tick Check each new submission's references automatically if the installation has automatic checks.

Staff turn on automatic checks for the whole installation on the plugin's Automatic checks page (/plugins/citestamp/billing/).

Settings for hosts

  • CITESTAMP_SITE_ORIGIN: this site's public address (for example https://journals.example.org), when a proxy in front of Janeway hides https from Django. Without it, buying and billing use the address the site first registered from, whichever hostname staff are on, so a Janeway that serves journals on several hostnames stays one installation with one subscription.
  • CITESTAMP_BASE_URL: CiteStamp's address, https://citestamp.com unless set.
  • A journal can also hold a key issued by agreement (on the settings page, or python src/manage.py citestamp_set_key --journal CODE --enable < keyfile, which reads the key from standard input), and CITESTAMP_API_KEY in Janeway's settings gives every journal without a key of its own one key. Which key is used: the journal's own first, then the installation's automatic checks key, then the setting.

Keys and the installation's secret are stored sealed (encrypted with a key derived from the site's SECRET_KEY), so a database copy alone doesn't reveal them, as long as the site has changed SECRET_KEY from the value Janeway ships with. They're never shown; pages show only a key's handle (chk_ and 12 characters, the same handle CiteStamp uses in its answers). To rotate SECRET_KEY, put the old value in Django's SECRET_KEY_FALLBACKS: the plugin keeps reading what it sealed, and seals each value again under the new key the first time it reads it. If SECRET_KEY changes with no fallback, nothing sealed can be read. A journal's own key is entered again on its settings page. The Automatic checks page says what happened and offers no second purchase, so a subscription already paid for isn't doubled: put the old value in SECRET_KEY_FALLBACKS, or write to info@citestamp.com.

Use it

  • On a submission's Peer Review page, the editor actions list has Check references (CiteStamp).
  • The staff menu has Reference check, listing active submissions, for checking before review starts.

On the check page, paste the reference list (one reference per line, or separate references with a blank line if they're wrapped across lines), or pull it from the submission's Word (.docx) manuscript or a JATS XML galley. Read the list, then press Check references. With automatic checks, the stored answers sit at the top of the same page, with Run the automatic check again.

Limits

  • 2,000 characters per reference. A longer entry is marked "couldn't check" and not sent; it's usually two references run together.
  • 400 references per check.
  • The free check uses each registry's public limits from the editor's own connection, so a 50-reference list takes about a minute. Several editors behind one campus address share those limits; a lookup the registry turns away reads "couldn't check".
  • Automatic checks have a daily reference limit per installation, set by the plan. When it's reached, or CiteStamp's own daily budget runs out, the check keeps the answers it has and waits: the check page says how many references are left and when they go, and at that time only those are sent. After five such waits the rest read "couldn't check", with the reason. Run the automatic check again starts it over.
  • Pulling from a file reads .docx and JATS XML only, up to 30 MB. For PDF, RTF or ODT, paste the list. An automatic check on a submission with no readable manuscript says so and doesn't run.

Security notes

  • Server calls go only to an https address and never follow a redirect. The address isn't a journal setting.
  • Answers are size-capped and checked field by field; anything unexpected becomes "couldn't check". Links are built only from values shaped like DOIs and always point to https://doi.org/. Every value goes on the page as text, never as HTML.
  • The purchase sends the browser only to a Stripe Checkout or Stripe billing address. Its key arrives server to server, with a code that works for ten minutes, only with this installation's secret and only for the browser session that started the purchase. If the first answer is lost on the way, using the code again within those ten minutes issues a fresh key and retires the first.
  • Uploaded files are parsed with entity expansion, DTD loading and network access turned off.
  • The JSON endpoints require Janeway's login, the role checks above and Django's CSRF token. Every view marks its variables as sensitive, so Django's error reports leave out keys, secrets and reference text.
  • Queuing an automatic check only writes one row in the author's submit request. It never calls out and never raises, so a CiteStamp problem can't touch a submission.

Tests

From Janeway's src directory:

python manage.py test plugins/citestamp -t .

The tests run the real HTTP client against a local stand-in for the API and check that every failure (refused key, lapsed subscription, rate limit, server error, timeout, redirect, unreadable or oversized answer, missing answer) comes back as "couldn't check" and never as a finding. With Node installed, they also run the plugin's copy of the engine with the network replaced (unreachable, rate-limited and failing registries, and an unregistered DOI as the one case that may read "not found").

To refresh the engine copy from citestamp.com, or check that it still matches: python tools/vendor_engine.py or python tools/vendor_engine.py --check.

Licence

MIT. See LICENSE.

About

A Janeway plugin that checks a submission's references against Crossref, DataCite and doi.org.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages