Skip to content

Commit 972f289

Browse files
committed
refactor: Add tighter security requirements for SMP answer
1 parent 0e93cee commit 972f289

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ui/smp_setup_window.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ def submit(self):
8080
if len(question) > SMP_QUESTION_MAX_LEN:
8181
messagebox.showerror("Error", f"Question must be under {SMP_QUESTION_MAX_LEN} characters long.")
8282

83-
if len(answer) <= 3:
84-
messagebox.showerror("Error", "Answer must be at least 4 characters long!")
83+
if len(answer) <= 6:
84+
messagebox.showerror("Error", "Answer must be at least 6 characters long!")
8585
return
8686

87-
if len(answer) <= 5 or not check_str_high_entropy(answer):
87+
if not check_str_high_entropy(answer):
8888
# Even though we enforce SMP, sometime a user might want to add someone whom our user don't have a out-of-band channel to communicate with
8989
# allowing the user to set a low-entropy answer gives user the opportunity to do so
9090
# But we still warn the user twice about the importance of the answer's entropy in context of SMP verification

0 commit comments

Comments
 (0)