Compare commits
2 commits
a454ad4868
...
c7153cad43
| Author | SHA1 | Date | |
|---|---|---|---|
| c7153cad43 | |||
| 98c9afaef2 |
1 changed files with 2 additions and 0 deletions
2
app.py
2
app.py
|
|
@ -989,6 +989,8 @@ def _normalize_hetzner_dns_token(raw: str) -> str | None:
|
||||||
candidates = []
|
candidates = []
|
||||||
labelled = re.findall(r"(?is)(?:token|api[ -]?key)[^\n:=]{0,80}(?::|=|\n)\s*([A-Za-z0-9._-]{24,})", raw)
|
labelled = re.findall(r"(?is)(?:token|api[ -]?key)[^\n:=]{0,80}(?::|=|\n)\s*([A-Za-z0-9._-]{24,})", raw)
|
||||||
candidates.extend(value for value in labelled if value.isascii())
|
candidates.extend(value for value in labelled if value.isascii())
|
||||||
|
broad = re.findall(r"(?<![A-Za-z0-9._-])([A-Za-z0-9_-]{32,})(?![A-Za-z0-9._-])", raw)
|
||||||
|
candidates.extend(value for value in broad if value.isascii())
|
||||||
for line in raw.splitlines():
|
for line in raw.splitlines():
|
||||||
if "token" not in line.lower() and "api key" not in line.lower() and "api-key" not in line.lower():
|
if "token" not in line.lower() and "api key" not in line.lower() and "api-key" not in line.lower():
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue