keepass_kpscript 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f97c25985d64806567559377354f7bba9114e450253653fe8afcd73a6519b1c9
|
4
|
+
data.tar.gz: '0778819142fef3931cf994bea3aa9c2ae7bf9d3320aee2935dfc9e6736476908'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07a5a1e79788ce88eb33375b789d4689c72a74882806d4400f57e22033bf2951334c60df205e3baa9163eec9d5e82e1069889f29b27c250c44fc21c0ef406f82
|
7
|
+
data.tar.gz: c1eb2a87fbecf106d88e9155333d04d516ff3a27aac3f3a6b848b4863034c593244c811b4bf207ee2634a1358a350a82ba736da1218d644de60051ed118fcead
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# [v1.0.1](https://github.com/Muriel-Salvan/keepass_kpscript/compare/v1.0.0...v1.0.1) (2021-06-30 15:29:15)
|
2
|
+
|
3
|
+
### Patches
|
4
|
+
|
5
|
+
* [Fail if no authentication method is provided](https://github.com/Muriel-Salvan/keepass_kpscript/commit/7178863234782aa3fd46d9a2ea9263d9344b465f)
|
6
|
+
|
1
7
|
# [v0.0.1](https://github.com/Muriel-Salvan/keepass_kpscript/compare/...v0.0.1) (2021-06-30 10:50:35)
|
2
8
|
|
3
9
|
### Patches
|
@@ -10,6 +10,7 @@ module KeepassKpscript
|
|
10
10
|
class Database
|
11
11
|
|
12
12
|
# Constructor
|
13
|
+
# At least 1 of password, password_enc or key_file is mandatory.
|
13
14
|
#
|
14
15
|
# Parameters::
|
15
16
|
# * *kpscript* (Kpscript): The KPScript instance handling this database
|
@@ -23,6 +24,7 @@ module KeepassKpscript
|
|
23
24
|
@password = password
|
24
25
|
@password_enc = password_enc
|
25
26
|
@key_file = key_file
|
27
|
+
raise 'Please specify at least one of password, password_enc or key_file arguments' if @password.nil? && @password_enc.nil? && @key_file.nil?
|
26
28
|
end
|
27
29
|
|
28
30
|
# Securely select field values from entries.
|
@@ -19,7 +19,8 @@ module KeepassKpscript
|
|
19
19
|
@debug = debug
|
20
20
|
end
|
21
21
|
|
22
|
-
# Open a database using this KPScript instance
|
22
|
+
# Open a database using this KPScript instance.
|
23
|
+
# At least 1 of password, password_enc or key_file is mandatory.
|
23
24
|
#
|
24
25
|
# Parameters::
|
25
26
|
# * *database_file* (String): Path to the database file
|
@@ -19,6 +19,11 @@ describe KeepassKpscript::Database do
|
|
19
19
|
expect(database.password_for('MyEntryTitle')).to eq 'MyEntryPassword'
|
20
20
|
end
|
21
21
|
|
22
|
+
it 'fails if no authentication mechanism is provided' do
|
23
|
+
expect_calls_to_kpscript []
|
24
|
+
expect { kpscript.open('/path/to/my_db.kdbx') }.to raise_error 'Please specify at least one of password, password_enc or key_file arguments'
|
25
|
+
end
|
26
|
+
|
22
27
|
it 'fails with an error silencing secrets when KPScript returns a non-zero exit status' do
|
23
28
|
expect_calls_to_kpscript [
|
24
29
|
[
|