openlibhums / openlibhums/janeway
Journal codes can conflict with reserved system routes
@StephDriver is already working on this.
Since Aug 17, 2026.
- 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:
- Create a journal with a code that matches a reserved system url route (e.g.
cms,manager) - Navigate to
[press-url]/[code]/ - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.