From 48d022c0aa4e53ef56a3936d37a5e0ed0357945a Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 12 Mar 2024 15:20:58 -0500 Subject: [PATCH] fixed: password is set in the clear on create using CLI #67 --- docs/change-log.md | 3 ++- ving/cli/user.mjs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/change-log.md b/docs/change-log.md index 1ef8f372..069b8184 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -3,4 +3,5 @@ outline: deep --- # Change Log -TODO: Once we start doing relases I'll add that here. \ No newline at end of file +## 2024-03-12 +* Fixed a security bug where passwords created via the CLI were stored incorrectly. \ No newline at end of file diff --git a/ving/cli/user.mjs b/ving/cli/user.mjs index 07bf04e6..e53d352b 100644 --- a/ving/cli/user.mjs +++ b/ving/cli/user.mjs @@ -68,10 +68,11 @@ export default defineCommand({ username: args.add, realName: args.add, email: args.email, - password: args.password, admin: args.admin, }); await user.insert(); + await user.setPassword(args.password); + await user.update(); formatList([user]); } else if (args.modify) {