mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed ajax-crash on userpass-protected lists
This commit is contained in:
@@ -581,7 +581,8 @@ router.route('/api/list/:channel_name/__np__').post(function(req, res) {
|
||||
var cookie = req.cookies._uI;
|
||||
Functions.getSessionAdminUser(cookie, channel_name, function(_u, _a) {
|
||||
if(req.body.userpass == "") {
|
||||
userpass = crypto.createHash('sha256').update(Functions.decrypt_string(_u), 'utf8').digest("base64");
|
||||
//userpass = Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(_u)))
|
||||
userpass = _u;
|
||||
}
|
||||
token_db.collection("api_token").find({token: token}, function(err, token_docs) {
|
||||
var authorized = false;
|
||||
|
||||
Reference in New Issue
Block a user