Commit f6cedec6 authored by Moul's avatar Moul

[enh] #69: PubSec: Specify number of expected chars in the regex

- Imported from Silkaj
parent d8e15f7d
Pipeline #4394 passed with stages
in 3 minutes and 20 seconds
......@@ -166,8 +166,8 @@ class SigningKey(libnacl.sign.Signer):
pubsec_content = fh.read()
# line patterns
regex_pubkey = compile("pub: ([1-9A-HJ-NP-Za-km-z]+)", MULTILINE)
regex_signkey = compile("sec: ([1-9A-HJ-NP-Za-km-z]+)", MULTILINE)
regex_pubkey = compile("pub: ([1-9A-HJ-NP-Za-km-z]{43,44})", MULTILINE)
regex_signkey = compile("sec: ([1-9A-HJ-NP-Za-km-z]{88,90})", MULTILINE)
# check public key field
match = search(regex_pubkey, pubsec_content)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment