openlibhums / openlibhums/janeway

Journal codes can conflict with reserved system routes

Open
#5,255 0 comments 0 reactions 1 assignee View on GitHub

@StephDriver is already working on this.

Since Aug 17, 2026.

bug Infrastructure needs-editing Priority urgent Size M
Dominant language
Python
Stars
239
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Describe the bug
Where a journal code matches a reserved system url route, the site middleware routes the request to the journal homepage instead of the intended system view. For example, if a journal has the code cms, navigating to press.com/cms/ loads the journal homepage rather than the CMS manager.

This issue is specific to journals using path mode and does not affect domain mode directly.

Janeway version
All versions.

To Reproduce
Steps to reproduce the behavior:

  1. Create a journal with a code that matches a reserved system url route (e.g. cms, manager)
  2. Navigate to [press-url]/[code]/
  3. Observe that the journal homepage loads instead of the expected system view

Suggested fix 1: Blocklist reserved URL prefixes

Add validation on journal code creation and editing that checks the proposed code against reserved URL prefixes derived from the URL conf. If a conflict is found, the form should reject the code with a clear error message.

Suggested fix 2: Namespace all back-office URLs

Move all system routes under a common prefix (e.g. press.com/*/cms/) that is unlikely to ever be a valid journal code. This reduces the number of potential conflicts to one.

BARF notes: We are going to implement fix 1 and reconsider how we build site url paths separately

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.