From 886cc576d743a8744006c9c009e8d82c53f1e4f9 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 29 Jul 2020 16:02:50 +0200 Subject: [PATCH 1/4] Fix account identity list display when empty --- views/account.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/account.njk b/views/account.njk index 4aa80d8..31cf255 100644 --- a/views/account.njk +++ b/views/account.njk @@ -110,7 +110,7 @@ {% else %} - No recovery email address. + No identity (yet). {% endfor %} From a6872cda806dd0a73c9abeda7609fc3990ccbb9b Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 29 Jul 2020 16:19:41 +0200 Subject: [PATCH 2/4] PasswordAuthProof: invalidate when user is deleted from DB --- src/models/UserPasswordComponent.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/models/UserPasswordComponent.ts b/src/models/UserPasswordComponent.ts index 0525309..26aeac3 100644 --- a/src/models/UserPasswordComponent.ts +++ b/src/models/UserPasswordComponent.ts @@ -75,7 +75,11 @@ export class PasswordAuthProof implements AuthProof { } public async isValid(): Promise { - return await this.isAuthorized() || typeof this.userID === 'number'; + if (typeof this.userID === 'number') { + return Boolean(await this.getResource()); + } else { + return await this.isAuthorized(); + } } public async revoke(): Promise { From 5b1cc2931d201a8506e923b599790c9f6d953584 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 29 Jul 2020 16:21:15 +0200 Subject: [PATCH 3/4] Upgrade wms-core --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index a8d11b9..681fbbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9886,9 +9886,9 @@ widest-line@^3.1.0: string-width "^4.0.0" wms-core@^0: - version "0.20.0" - resolved "https://registry.toot.party/wms-core/-/wms-core-0.20.0.tgz#679c0a1076a96d4a03cc4eeafba900e6a5a9b30f" - integrity sha512-UplsZCR4Dm85Qy22JbDPBkOhp+nUN8KYtbpMipqmo/F9t3M+qtLNGktoy/at0dBc6vR+/8WCuR1aRBeuMINR5A== + version "0.20.1" + resolved "https://registry.toot.party/wms-core/-/wms-core-0.20.1.tgz#c63a1b6b5cd4669e97fa0b651cd5fa6496f6305c" + integrity sha512-JZkrLgxoPBSOf8P5KB9Fc5IoEoWyw6qMoSukpCIi14iue/rm/rW5M9D0Y3dy6tio3w7ZRsrcQdYbIkXW228lzQ== dependencies: argon2 "^0.26.2" compression "^1.7.4" From db09ec75f8338d1623f4fd55c985e5781e4a7d54 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 29 Jul 2020 16:21:22 +0200 Subject: [PATCH 4/4] Version 1.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fecd6ed..df77a79 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aldap", - "version": "1.0.0", + "version": "1.0.1", "description": "Authentication LDAP server", "repository": "git@gitlab.com:ArisuOngaku/aldap.git", "author": "Alice Gaudon ",