Skip to content
Snippets Groups Projects
Commit f3426e38 authored by Red Oak's avatar Red Oak
Browse files

fix uncaught exception for empty form field

        i don't know why or how, but there were journalctl entries for
        an error in which .trim() was being called on an undefined
        value, on (old) line 144 where linkify() was being called.

        now we're catching and logging these cases, at least.
parent 4e568894
Branches
No related tags found
No related merge requests found
......@@ -141,7 +141,11 @@ app.post('/registration', (req, res) => {
return (err) => submitlog.info(`$message: `, err);
}
req.body['oc-user'] = linkify(req.body['oc-user'], 'opencollective.com')
try {
req.body['oc-user'] = linkify(req.body['oc-user'], 'opencollective.com');
} catch(err) {
submitlog.info("no OpenCollective entered for: " + JSON.stringify(req.body));
}
// This function logs spamtrap hits, we just need to drop spam.
// Previously we sent a false ack email to spam requests, but
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment