From 756a0b1ad24649be26f3f8f64df4b8650411eb37 Mon Sep 17 00:00:00 2001 From: fatchan Date: Thu, 13 Jun 2019 13:11:43 +0000 Subject: [PATCH] correction to board settings form handler, fix error for missing anon name ield --- controllers/forms.js | 2 +- views/includes/footer.pug | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/forms.js b/controllers/forms.js index 2944a4f5..ce159269 100644 --- a/controllers/forms.js +++ b/controllers/forms.js @@ -255,7 +255,7 @@ router.post('/board/:board/settings', csrf, Boards.exists, checkPermsMiddleware, const errors = []; - if (req.body.default_name && req.body.default_name.length < 1 || req.body.default_name.length > 50) { + if (req.body.default_name && (req.body.default_name.length < 1 || req.body.default_name.length > 50)) { errors.push('Anon name must be 1-50 characters'); } if (typeof req.body.reply_limit === 'number' && (req.body.reply_limit < 1 || req.body.reply_limit > 1000)) { diff --git a/views/includes/footer.pug b/views/includes/footer.pug index 2f1c38a3..7de604c1 100644 --- a/views/includes/footer.pug +++ b/views/includes/footer.pug @@ -1,2 +1,2 @@ -.footer - a(href='https://github.com/fatchan/jschan/') open source +small.footer + a(href='https://github.com/fatchan/jschan/') source code