Skip to content

Commit

Permalink
fix user demo error.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Jun 1, 2023
1 parent a54a0ff commit 366b258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/defs/user/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = db => {
beforeCreate: function () {
var salt = crypto.pseudoRandomBytes(64);
this.salt = salt.hex();
this.password = crypto.pbkdf2(this.password, salt, 256, 64, 'sha1').hex();
this.password = crypto.pbkdf2(this.password || "", salt, 256, 64, 'sha1').hex();
}
},
viewFunctions: {
Expand Down

0 comments on commit 366b258

Please sign in to comment.