From 1d343fe9d2f5e5aad3a400eeecf0fc30839d93f0 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Mon, 28 Oct 2024 10:08:28 +0100 Subject: [PATCH] Update key allowed characters --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f5d6868..72e5f55 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ const app = express() require('dotenv').config() app.get('/share/:key', async (req, res) => { - if (req.params.key.match(/[^A-Za-z0-9-]/)) { + if (req.params.key.match(/[^A-Za-z0-9-_]/)) { // Invalid characters in the incoming URL res.status(404).send() } else {