From ed8d0fe65b3f96355fd64d5eccb7522528fdd95d Mon Sep 17 00:00:00 2001
From: TheJoeCoder <joe@radialbog9.uk>
Date: Mon, 26 Aug 2024 22:50:35 +0100
Subject: [PATCH] Fix app password visibility issues

---
 accounts/tables.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/accounts/tables.py b/accounts/tables.py
index c3c06aa..cfa4a47 100644
--- a/accounts/tables.py
+++ b/accounts/tables.py
@@ -17,9 +17,9 @@ class AppPasswordTable(tables.Table):
 
     def value_key(self, value):
         out_val = "****"
-        if len(value) < 2:
+        if len(value) < 4:
             return out_val
-        return out_val + value[2:]
+        return out_val + value[-4:]
 
     def render_key(self, value):
         return self.value_key(value)
-- 
GitLab