gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: Admin registration.


From: gnunet
Subject: [libeufin] branch master updated: Admin registration.
Date: Sat, 23 Sep 2023 09:01:07 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new f5ec9139 Admin registration.
f5ec9139 is described below

commit f5ec91390745e04845cd37c426cc10ed28bb8bea
Author: MS <ms@taler.net>
AuthorDate: Sat Sep 23 08:59:25 2023 +0200

    Admin registration.
    
    Even the first and unused password goes hashed in the
    database, in order to avoid 500-like errors in case admin
    tries to authenticate before having reset its password.
---
 bank/src/main/kotlin/tech/libeufin/bank/helpers.kt | 6 +++++-
 contrib/wallet-core                                | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt 
b/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt
index 6e93454d..dd7d8027 100644
--- a/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt
+++ b/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt
@@ -469,7 +469,11 @@ fun maybeCreateAdminAccount(db: Database, ctx: 
BankApplicationContext): Boolean
         Random().nextBytes(pwBuf)
         val adminCustomer = Customer(
             login = "admin",
-            passwordHash = Base32Crockford.encode(pwBuf),
+            /**
+             * Hashing the password helps to avoid the "password not hashed"
+             * error, in case the admin tries to authenticate.
+             */
+            passwordHash = CryptoUtil.hashpw(String(pwBuf, Charsets.UTF_8)),
             name = "Bank administrator"
         )
         val rowId = db.customerCreate(adminCustomer)
diff --git a/contrib/wallet-core b/contrib/wallet-core
index 9e2d95b3..c5a3cd4c 160000
--- a/contrib/wallet-core
+++ b/contrib/wallet-core
@@ -1 +1 @@
-Subproject commit 9e2d95b39723a038eb714d723ac0910a5bf596e2
+Subproject commit c5a3cd4c50676c49fa6c67cbdeb609101c38e764

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]