mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
...and more UserProps
This commit is contained in:
parent
d11aca571e
commit
f80e07fcf9
4 changed files with 20 additions and 14 deletions
10
core/user.js
10
core/user.js
|
@ -203,8 +203,8 @@ module.exports = class User {
|
|||
},
|
||||
function getDkWithSalt(props, callback) {
|
||||
// get DK from stored salt and password provided
|
||||
User.generatePasswordDerivedKey(password, props.pw_pbkdf2_salt, (err, dk) => {
|
||||
return callback(err, dk, props.pw_pbkdf2_dk);
|
||||
User.generatePasswordDerivedKey(password, props[UserProps.PassPbkdf2Salt], (err, dk) => {
|
||||
return callback(err, dk, props[UserProps.PassPbkdf2Dk]);
|
||||
});
|
||||
},
|
||||
function validateAuth(passDk, propsDk, callback) {
|
||||
|
@ -516,8 +516,8 @@ module.exports = class User {
|
|||
}
|
||||
|
||||
const newProperties = {
|
||||
pw_pbkdf2_salt : info.salt,
|
||||
pw_pbkdf2_dk : info.dk,
|
||||
[ UserProps.PassPbkdf2Salt ] : info.salt,
|
||||
[ UserProps.PassPbkdf2Dk ] : info.dk,
|
||||
};
|
||||
|
||||
this.persistProperties(newProperties, err => {
|
||||
|
@ -596,7 +596,7 @@ module.exports = class User {
|
|||
WHERE id = (
|
||||
SELECT user_id
|
||||
FROM user_property
|
||||
WHERE prop_name='real_name' AND prop_value LIKE ?
|
||||
WHERE prop_name='${UserProps.RealName}' AND prop_value LIKE ?
|
||||
);`,
|
||||
[ realName ],
|
||||
(err, row) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue