diff --git a/dnstapir/key_resolver.py b/dnstapir/key_resolver.py index 1a01896..2e94563 100644 --- a/dnstapir/key_resolver.py +++ b/dnstapir/key_resolver.py @@ -24,6 +24,8 @@ description="The number of public key lookups", ) +KEY_ID_VALIDATOR = re.compile(r"^[a-zA-Z0-9_\-.]+$") + def key_resolver_from_client_database(client_database: str, key_cache: KeyCache | None = None): if client_database.startswith("http://") or client_database.startswith("https://"): @@ -35,7 +37,7 @@ def key_resolver_from_client_database(client_database: str, key_cache: KeyCache class KeyResolver: def __init__(self): self.logger = logging.getLogger(__name__).getChild(self.__class__.__name__) - self.key_id_validator = re.compile(r"^[a-zA-Z0-9_\-.]+$") + self.key_id_validator = KEY_ID_VALIDATOR @abstractmethod def resolve_public_key(self, key_id: str) -> PublicKey: diff --git a/pyproject.toml b/pyproject.toml index 4cc4885..279b4cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dnstapir" -version = "1.2.2" +version = "1.2.3" description = "DNS TAPIR Python Library" authors = ["Jakob Schlyter "] readme = "README.md"