Gentoo Archives: gentoo-commits

From: John Helmert III <ajak@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/security:ajak-cvetool commit in: bin/
Date: Mon, 05 Jul 2021 17:42:30
Message-Id: 1625449412.b599466bea8a657b2716a96d9c0a355728af4f7c.ajak@gentoo
1 commit: b599466bea8a657b2716a96d9c0a355728af4f7c
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 5 01:40:16 2021 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 5 01:43:32 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/security.git/commit/?id=b599466b
7
8 cvetool: sanity check CVETool args rather than sys.argv
9
10 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
11
12 bin/cvetool.py | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15 diff --git a/bin/cvetool.py b/bin/cvetool.py
16 index 233375a..744e2a5 100644
17 --- a/bin/cvetool.py
18 +++ b/bin/cvetool.py
19 @@ -73,14 +73,14 @@ class CVETool:
20
21 self.nfu(self.cleanup_cve(args[0]))
22 elif command == 'pw':
23 - if len(sys.argv) != 4:
24 + if len(args) != 2:
25 print('Usage: pw <user> <password>')
26 print('Generates a base64-encoded credential for storing')
27 sys.exit(1)
28
29 self.pw(sys.argv[2], sys.argv[3])
30 elif command == 'dobug':
31 - if len(sys.argv) != 3:
32 + if len(args) != 1:
33 print('Usage: dobug <bug>')
34 print('Adds and assigns a bug\'s CVEs')
35 sys.exit(1)