Mercurial > cgi-bin > hgweb.cgi > PassMan
diff src/main/kotlin/name/blackcap/passman/Database.kt @ 3:eafa3779aef8
More bug fixes, quote strings in diagnostics.
author | David Barts <n5jrn@me.com> |
---|---|
date | Sun, 11 Sep 2022 20:36:06 -0700 |
parents | a6cfdffcaa94 |
children | ad997df1f560 |
line wrap: on
line diff
--- a/src/main/kotlin/name/blackcap/passman/Database.kt Sun Sep 11 18:24:55 2022 -0700 +++ b/src/main/kotlin/name/blackcap/passman/Database.kt Sun Sep 11 20:36:06 2022 -0700 @@ -18,9 +18,9 @@ val exists = Files.exists(Path.of(fileName)) if (!exists) { if (create) { - error("initializing database $fileName") + error("initializing database ${see(fileName, simple = true)}") } else { - die("$fileName not found") + die("${see(fileName, simple = true)} not found") } } val masterPassword = getPassword(passwordPrompt, !exists) @@ -99,8 +99,6 @@ val readFromDb = result.getDecryptedString(1, database.encryption) if (readFromDb != PLAINTEXT) { /* might also get thrown by getDecryptedString if bad */ - println(" got: " + dump(readFromDb)) - println("expected: " + dump(PLAINTEXT)) throw GeneralSecurityException("bad key!") } }