Mercurial > cgi-bin > hgweb.cgi > PassMan
comparison src/main/kotlin/name/blackcap/passman/ReadSubcommand.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 | 711cc42e96d7 |
comparison
equal
deleted
inserted
replaced
2:3c792ad36b3d | 3:eafa3779aef8 |
---|---|
29 | 29 |
30 db.connection.prepareStatement("select name, username, password, notes, created, modified, accessed from passwords where id = ?").use { | 30 db.connection.prepareStatement("select name, username, password, notes, created, modified, accessed from passwords where id = ?").use { |
31 it.setLong(1, id) | 31 it.setLong(1, id) |
32 val result = it.executeQuery() | 32 val result = it.executeQuery() |
33 if (!result.next()) { | 33 if (!result.next()) { |
34 die("no record matches $nameIn") | 34 die("no record matches ${see(nameIn)}") |
35 } | 35 } |
36 val entry = Entry( | 36 val entry = Entry( |
37 name = result.getDecryptedString(1, db.encryption), | 37 name = result.getDecryptedString(1, db.encryption), |
38 username = result.getDecryptedString(2, db.encryption), | 38 username = result.getDecryptedString(2, db.encryption), |
39 password = result.getDecrypted(3, db.encryption), | 39 password = result.getDecrypted(3, db.encryption), |