Skip to content

Bug: Files Route validation can lead to breakage due to missing reserved route #985

@zoeyronain

Description

@zoeyronain

Bug description

I was trying to change my generated upload URLs from /u to /r and thought that was the place where I would change it. When you try to click save with it set to /raw it says "Provided route is reserved" but it happily let me save with it set to /r. Zipline continued to work fine until I had to restart the container it lives in and it failed. Going into the Postgresql database and setting filesRoute back to /u thankfully fixed it.

Shouldn't /r also be added to the protected paths due to this?

(I wound up adding a sed command in my upload script to switch the route out before the URL copies to my clipboard in the end. Also I build from source because Docker containers in Proxmox are a bit touchy)

How is Zipline being run?

Built from source (running it through pnpm start or node, etc.)

Zipline Version

4.4.1 commit acbbb7d

If applicable, what browsers are you seeing this issue on?

No response

Relevant Logs

`[2026-02-08T15:07:41 INFO server] starting zipline mode="production" version="4.4.1" argv=[]
[2026-02-08T15:07:41 DEBUG migrations] running migrations...
[2026-02-08T15:07:41 DEBUG migrations] ensuring database exists...
[2026-02-08T15:07:41 DEBUG migrations] applying migrations...
[2026-02-08T15:07:41 DEBUG migrations] no migrations applied
[2026-02-08T15:07:41 INFO server] reading settings...
[2026-02-08T15:07:41 DEBUG config::validate] reloaded config
[2026-02-08T15:07:41 DEBUG server] creating server port=3001 hostname="0.0.0.0" trustProxy=true

/root/zipline-old/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/route.js:359
throw new FST_ERR_DUPLICATED_ROUTE(opts.method, opts.url)
^
FastifyError: Method 'GET' already declared for route '/r/:id'
at Object.addNewRoute (/root/zipline-old/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/route.js:359:19)
at Object.route (/root/zipline-old/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/route.js:263:19)
at Object.prepareRoute (/root/zipline-old/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/route.js:163:18)
at Object._get [as get] (/root/zipline-old/node_modules/.pnpm/[email protected]/node_modules/fastify/fastify.js:181:34)
at main (/root/zipline-old/build/server/index.js:178:12)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
code: 'FST_ERR_DUPLICATED_ROUTE',
statusCode: 500
}

Node.js v22.21.1
 ELIFECYCLE  Command failed with exit code 1.`

Steps to Reproduce

change the Files route to /r in the administration tab, restart zipline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions