blob: 24c072ea77c88f637a2d9960c4a39855a2c39989 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
https://github.com/roddhjav/pass-import/pull/232
From fe919c9f7686fbf34d7c72f26952546ab92bc68d Mon Sep 17 00:00:00 2001
From: Antonio Gurgel <git@antonio.goorzhel.com>
Date: Wed, 31 Dec 2025 00:36:41 -0800
Subject: [PATCH] Don't bail on passwords longer than 72 chars
--- a/pass_import/audit.py
+++ b/pass_import/audit.py
@@ -92,9 +92,14 @@ def zxcvbn(self):
user_input = list(entry.values())
if password in user_input:
user_input.remove(password)
- results = zxcvbn(password, user_inputs=user_input)
- if results['score'] <= 2:
- self.weak.append((password, results))
+ try:
+ results = zxcvbn(password, user_inputs=user_input)
+ if results['score'] <= 2:
+ self.weak.append((password, results))
+ except ValueError:
+ # zxcvbn raises ValueError on passwords greater than 72 chars.
+ # Anything that long needn't be appended to `self.weak`.
+ pass
def duplicates(self):
"""Check for duplicated passwords."""
|