Improve checking callsign validity by regex, and fix passing v1 type credentials into v2 APIs

This commit is contained in:
Ian Renton
2026-08-17 16:30:24 +01:00
parent 03164d747f
commit 38bc03a603
19 changed files with 48 additions and 36 deletions
+3 -2
View File
@@ -8,6 +8,7 @@ import pytz
import telnetlib3
from core.config import SERVER_OWNER_CALLSIGN
from core.constants import CALL_REGEX
from data.spot import Spot
from providers.spot.spot_provider import SpotProvider
@@ -19,11 +20,11 @@ class DXCluster(SpotProvider):
See config-example.yml for examples."""
_LINE_PATTERN_EXCLUDE_RBN = re.compile(
r"^DX de ([a-z0-9/]+):\s+([0-9.]+)\s+([a-z0-9/]+)\s+(.*)\s+(\d{4}Z)",
rf"^DX de ({CALL_REGEX}):\s+([0-9.]+)\s+({CALL_REGEX})\s+(.*)\s+(\d{4}Z)",
re.IGNORECASE,
)
_LINE_PATTERN_ALLOW_RBN = re.compile(
r"^DX de ([a-z0-9/]+)-?#?:\s+([0-9.]+)\s+([a-z0-9/]+)\s+(.*)\s+(\d{4}Z)",
rf"^DX de ({CALL_REGEX})-?#?:\s+([0-9.]+)\s+({CALL_REGEX})\s+(.*)\s+(\d{4}Z)",
re.IGNORECASE,
)