Make --sign-key less picky; about case, length and 0x marker
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Currently duplicity is a lot more picky about the key format it accepts for --sign-key compared to --encrypt-key, or gpg in general. The eight character long key id can only include upper case A-F, and may not include the hexadecimal marker 0x.
The check is performed by this this method, in ./duplicity/
def set_sign_
"""Set globals.sign_key assuming proper key given"""
if not len(sign_key) == 8 or not re.search(
log.FatalError
globals.
The --encrypt-key on the other hand doesn't seem to do any such syntax checking.
Unless there is a specific reason to only allow the key id in upper case, and disallowing the 0x marker, would it be possible to make the set_sign_key method a bit less picky? Perhaps by changing the if line to one of the following alternatives?
if not len(sign_key) == 8 or not re.search(
or
if not re.search(
In neither case can I see it breaking the existing format, nor introducing any additional disambiguity.
Related branches
Changed in duplicity: | |
milestone: | none → 0.7.01 |
importance: | Undecided → Medium |
Changed in duplicity: | |
status: | Confirmed → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
Note also my additional comments in #1215031.