monitoring: allow ? in QR https payloads (Play Store)

This commit is contained in:
Hernâni Marques 2026-07-17 18:43:12 +02:00
parent f7856525f3
commit 9950bb05dd
No known key found for this signature in database

View file

@ -49,10 +49,13 @@ def looks_like_real_uri(uri: str) -> bool:
return False
if re.match(r"^taler://pay/?$", uri, re.I):
return False
# trailing junk from HTML/JS
if uri.endswith((")", "(", "\\", "^", "*", "+", "?")):
# trailing junk / JS regex fragments (allow ? & = in query strings)
if uri.endswith((")", "(", "\\", "^", "*")):
return False
if re.search(r"[\\^$*+?]", uri):
if re.search(r"[\\^$*]", uri):
return False
# lone incomplete `taler://…?` without path
if re.match(r"^taler://[^/]+$", uri, re.I):
return False
return True