dns-rfc2136: use certbot's own is_ipaddress func (#9035)

* dns-rfc2136: use certbot's own is_ipaddress func

* oldest: pin dnspython==1.15.0 (epel8 version)

* inhibit deprecationwarning for dnspython==1.15.0

* dns-rfc2136: declare minimum version of dnspython

* add changelog entry
This commit is contained in:
alexzorin
2021-09-14 07:48:15 +10:00
committed by GitHub
parent bd5f4f2d8a
commit b0aa064640
6 changed files with 11 additions and 6 deletions
@@ -3,7 +3,6 @@ import logging
from typing import Optional
import dns.flags
from dns.inet import is_address
import dns.message
import dns.name
import dns.query
@@ -16,6 +15,7 @@ import dns.update
from certbot import errors
from certbot.plugins import dns_common
from certbot.plugins.dns_common import CredentialsConfiguration
from certbot.util import is_ipaddress
logger = logging.getLogger(__name__)
@@ -57,7 +57,7 @@ class Authenticator(dns_common.DNSAuthenticator):
def _validate_credentials(self, credentials):
server = credentials.conf('server')
if not is_address(server):
if not is_ipaddress(server):
raise errors.PluginError("The configured target DNS server ({0}) is not a valid IPv4 "
"or IPv6 address. A hostname is not allowed.".format(server))
algorithm = credentials.conf('algorithm')
+1 -1
View File
@@ -7,7 +7,7 @@ from setuptools import setup
version = '1.20.0.dev0'
install_requires = [
'dnspython',
'dnspython>=1.15.0',
'setuptools>=39.0.1',
]