summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoruser@node5.net <user@node5.net>2026-06-18 19:06:58 +0200
committeruser@node5.net <user@node5.net>2026-06-18 19:06:58 +0200
commit952497cd1973d8e06060d444d0b7372bd9f3cbaf (patch)
tree6f856d1bbb55bd7afef1e8a26479c470669a4544 /src
parentc4a19955f448cceb11ee5b3a882fcfcaf293bf3f (diff)
fix: password of the month, pick latest if no data in the last monthHEADmaster
Diffstat (limited to 'src')
-rw-r--r--src/db_handler.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/db_handler.py b/src/db_handler.py
index e97c8ce..e6452f3 100644
--- a/src/db_handler.py
+++ b/src/db_handler.py
@@ -51,7 +51,7 @@ class DBHandler:
cur.execute("""
SELECT password
FROM login_attempt
- WHERE timestamp BETWEEN current_timestamp - interval '1 month' AND timestamp
+ WHERE timestamp BETWEEN (SELECT timestamp FROM login_attempt ORDER BY timestamp DESC LIMIT 1) - interval '1 month' AND timestamp
GROUP BY password
ORDER BY COUNT(password) DESC
LIMIT 1;