correction to board settings form handler, fix error for missing anon name ield

merge-requests/208/head
fatchan 5 years ago
parent 03ef3b5bff
commit 756a0b1ad2
  1. 2
      controllers/forms.js
  2. 4
      views/includes/footer.pug

@ -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)) {

@ -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

Loading…
Cancel
Save