From 7bee9c1c69e8fb3d80039dd7532d4fdd5cfc5d66 Mon Sep 17 00:00:00 2001
From: Dietrich <dietrich@teilgedanken.de>
Date: Sun, 19 Jun 2022 06:56:51 +0200
Subject: [PATCH] Length of passwords consistently use the constant

---
 src/database/admin.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/database/admin.rs b/src/database/admin.rs
index 3ed1a8a9..5a0c28a9 100644
--- a/src/database/admin.rs
+++ b/src/database/admin.rs
@@ -525,7 +525,7 @@ async fn process_admin_command(
                 ));
             }
 
-            let new_password = utils::random_string(20);
+            let new_password = utils::random_string(AUTO_GEN_PASSWORD_LENGTH);
 
             match db.users.set_password(&user_id, Some(new_password.as_str())) {
                 Ok(()) => RoomMessageEventContent::text_plain(format!(