Accept current Cloudflare token lengths with safe characters
This commit is contained in:
parent
9880081af7
commit
936a7b3ddf
@ -32,7 +32,7 @@ def api(method, suffix, payload=None):
|
||||
if not re.fullmatch(r'[a-f0-9]{32}', zone) or cfg['target'] != TARGET:
|
||||
raise RuntimeError('Unapproved DNS configuration')
|
||||
token = TOKEN.read_text().strip()
|
||||
if not re.fullmatch(r'[A-Za-z0-9_-]{40}', token):
|
||||
if not re.fullmatch(r'[A-Za-z0-9_-]{20,128}', token):
|
||||
raise RuntimeError('Invalid token format')
|
||||
with tempfile.TemporaryDirectory(prefix='acme-api-', dir=STATE) as folder:
|
||||
body = pathlib.Path(folder) / 'request.json'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user