mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-13 06:02:39 +01:00
🐛 fix login
This commit is contained in:
parent
5f3cea845d
commit
73aeca20de
4
package-lock.json
generated
4
package-lock.json
generated
@ -4614,7 +4614,7 @@
|
|||||||
},
|
},
|
||||||
"node_modules/fosscord-server-util": {
|
"node_modules/fosscord-server-util": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#e5f408be0889562f6fa36ac1bb1730e50bf1951f",
|
"resolved": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#770b07400e282c5e06fe0638d791139e3984f50f",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
@ -16151,7 +16151,7 @@
|
|||||||
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
||||||
},
|
},
|
||||||
"fosscord-server-util": {
|
"fosscord-server-util": {
|
||||||
"version": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#e5f408be0889562f6fa36ac1bb1730e50bf1951f",
|
"version": "git+ssh://git@github.com/fosscord/fosscord-server-util.git#770b07400e282c5e06fe0638d791139e3984f50f",
|
||||||
"from": "fosscord-server-util@github:fosscord/fosscord-server-util",
|
"from": "fosscord-server-util@github:fosscord/fosscord-server-util",
|
||||||
"requires": {
|
"requires": {
|
||||||
"jsonwebtoken": "^8.5.1",
|
"jsonwebtoken": "^8.5.1",
|
||||||
|
@ -40,7 +40,7 @@ router.post(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// the salt is saved in the password refer to bcrypt docs
|
// the salt is saved in the password refer to bcrypt docs
|
||||||
const same_password = await bcrypt.compare(password, user.hash);
|
const same_password = await bcrypt.compare(password, user.user_data.hash);
|
||||||
if (!same_password) {
|
if (!same_password) {
|
||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
password: { message: req.t("auth:login.INVALID_PASSWORD"), code: "INVALID_PASSWORD" },
|
password: { message: req.t("auth:login.INVALID_PASSWORD"), code: "INVALID_PASSWORD" },
|
||||||
|
Loading…
Reference in New Issue
Block a user