From 522278fa4eefe3928025cd88e0bb4100fbc477b7 Mon Sep 17 00:00:00 2001 From: Bill Church Date: Wed, 11 May 2022 10:44:07 -0400 Subject: [PATCH] refactor: app.js --- app/server/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/server/app.js b/app/server/app.js index 16cddb8..f189dbe 100644 --- a/app/server/app.js +++ b/app/server/app.js @@ -93,7 +93,7 @@ app.get('/ssh/host/:host?', (req, res) => { config.ssh.host || (validator.isIP(`${req.params.host}`) && req.params.host) || (validator.isFQDN(req.params.host) && req.params.host) || - (/^(([a-z]|[A-Z]|[0-9]|[!^(){}\-_~])+)?\w$/.test(req.params.host) && req.params.host), + (/^(([a-z]|[A-Z]|\d|[!^(){}\-_~])+)?\w$/.test(req.params.host) && req.params.host), port: (validator.isInt(`${req.query.port}`, { min: 1, max: 65535 }) && req.query.port) || config.ssh.port, @@ -108,7 +108,7 @@ app.get('/ssh/host/:host?', (req, res) => { keepaliveCountMax: config.ssh.keepaliveCountMax, allowedSubnets: config.ssh.allowedSubnets, term: - (/^(([a-z]|[A-Z]|[0-9]|[!^(){}\-_~])+)?\w$/.test(req.query.sshterm) && req.query.sshterm) || + (/^(([a-z]|[A-Z]|\d|[!^(){}\-_~])+)?\w$/.test(req.query.sshterm) && req.query.sshterm) || config.ssh.term, terminal: { cursorBlink: validator.isBoolean(`${req.query.cursorBlink}`)