You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Code execution continues when it should stop in POST action #407
Hello.
If you try to post empty data via API, not React client application, the application will crash. The particular line in problem is in post.controller.js file, where you check if name, title or content are empty. The line:
res.status(403).end();
should abort execution. Possible solution could be:
Activity
belmirp commentedon Dec 20, 2018
The problem can be avoided by putting return on the next line:
res.status(403).end(); return;And I am not sure whether 403 (unauthorized) is appropriate here, shouldn't be 400 when invalid data is sent?