fix: do not escape 'secret!'

This commit is contained in:
ptrcnull 2024-11-06 04:20:45 +01:00
parent b51fb6569d
commit f300f2c538

View file

@ -29,6 +29,8 @@ def base16_decode(key: str) -> str:
return bytes.fromhex(res).decode()
def escape_key(key: str) -> str:
if key == 'secret!':
return key
if not re.fullmatch(keyre, key):
return 'based_' + base16_encode(key)
return key