From f968083f740c4f548f6aea16d37320e5f967b2a1 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 26 Feb 2019 19:58:03 -0800 Subject: [PATCH] added '-' to /api/filelist validation --- server/routes/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routes/index.js b/server/routes/index.js index 6ddd5d8b..066a21dc 100644 --- a/server/routes/index.js +++ b/server/routes/index.js @@ -88,8 +88,8 @@ module.exports = function(app) { ); app.get(`/api/exists/:id${ID_REGEX}`, require('./exists')); app.get(`/api/metadata/:id${ID_REGEX}`, auth.hmac, require('./metadata')); - app.get('/api/filelist/:id(\\w{16})', auth.fxa, filelist.get); - app.post('/api/filelist/:id(\\w{16})', auth.fxa, filelist.post); + app.get('/api/filelist/:id([\\w-]{16})', auth.fxa, filelist.get); + app.post('/api/filelist/:id([\\w-]{16})', auth.fxa, filelist.post); app.post('/api/upload', auth.fxa, require('./upload')); app.post(`/api/delete/:id${ID_REGEX}`, auth.owner, require('./delete')); app.post(`/api/password/:id${ID_REGEX}`, auth.owner, require('./password'));