From 9e0ca8324a28f38acc0deefa23fb056830fecf0a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Nov 2016 11:37:14 -0400 Subject: Better suggestion when user is having difficulty thinking of a strong enough password. This commit was sponsored by Ignacio on Patreon. --- CHANGELOG | 2 ++ TODO | 2 -- keysafe.hs | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d901cb5..14548bf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,8 @@ keysafe (0.20161023) UNRELEASED; urgency=medium * --upload-queued: Exit nonzero if unable to upload all queued objects. * --autostart: If unable to upload all queued objects initially, delay between 1 and 2 hours and try again. + * Better suggestion when user is having difficulty thinking of a strong + enough password. -- Joey Hess Sun, 23 Oct 2016 15:30:02 -0400 diff --git a/TODO b/TODO index 105308f..e0190cc 100644 --- a/TODO +++ b/TODO @@ -2,8 +2,6 @@ Soon: * Finish vetting 2 servers to Recommended. * Set up --check-servers in a cron job, so I know when servers are down. -* If user is having difficulty thinking of good enough password, give - advice. Later: diff --git a/keysafe.hs b/keysafe.hs index 738274f..cbbbb86 100644 --- a/keysafe.hs +++ b/keysafe.hs @@ -170,7 +170,12 @@ backup cmdline ui tunables distinguisher (secretkeysource, secretkey) = do let mincost = Dollars 100000 if crackcost < mincost then do - showError ui $ "Weak password! It would cost only " ++ show crackcost ++ " to crack the password. Please think of a better one. More words would be good.." + showError ui $ unlines + [ "Weak password! It would cost only " ++ show crackcost ++ " to crack the password." + , "Please think of a better one." + , "" + , "Suggestion: Pick 3 or 4 unrelated words for a strong password, like \"correct horse battery staple\"" + ] promptpassword name else do (thisyear, _, _) <- toGregorian . utctDay -- cgit v1.2.3