Fixed issue where userpass not existing

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-13 18:16:08 +01:00
parent ed38c213ac
commit c3e982ee8a
3 changed files with 4 additions and 2 deletions

View File

@@ -561,7 +561,7 @@ router.route('/api/list/:channel_name/__np__').post(function(req, res) {
if(conf.length == 0) {
res.status(404).send(JSON.stringify(error.not_found.list));
return;
} else if(conf[0].userpass != userpass && conf[0].userpass != "") {
} else if(conf[0].userpass != userpass && conf[0].userpass != "" && conf[0].userpass != undefined) {
res.status(403).send(JSON.stringify(error.not_authenticated));
return;
}
@@ -1020,7 +1020,7 @@ router.route('/api/list/:channel_name').post(function(req, res) {
if(conf.length == 0) {
res.status(404).send(JSON.stringify(error.not_found.list));
return;
} else if(conf[0].userpass != userpass && conf[0].userpass != "") {
} else if(conf[0].userpass != userpass && conf[0].userpass != "" && conf[0].userpass != undefined) {
res.status(403).send(JSON.stringify(error.not_authenticated));
return;
}