mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
Improve checking callsign validity by regex, and fix passing v1 type credentials into v2 APIs
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import re
|
||||
|
||||
from core.config import SERVER_OWNER_CALLSIGN
|
||||
from data.band import Band
|
||||
from data.sig import SIG
|
||||
@@ -9,6 +11,11 @@ SOFTWARE_VERSION = "2.0-pre"
|
||||
HTTP_HEADERS = {"User-Agent": f"Spothole v{SOFTWARE_VERSION} (operated by {SERVER_OWNER_CALLSIGN})"}
|
||||
HAMQTH_PRG = f"Spothole v{SOFTWARE_VERSION} operated by {SERVER_OWNER_CALLSIGN}".replace(" ", "_")
|
||||
|
||||
# Generally useful regexes
|
||||
CALL_REGEX = r"[A-Za-z0-9/\-]+"
|
||||
CALL_PATTERN = re.compile(CALL_REGEX)
|
||||
CALL_ONLY_PATTERN = re.compile(rf"^{CALL_REGEX}$")
|
||||
|
||||
# Special Interest Groups
|
||||
SIGS = [
|
||||
SIG(
|
||||
|
||||
Reference in New Issue
Block a user