mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 16:12:09 +02:00
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:
@@ -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')
|
||||
|
||||
@@ -7,7 +7,7 @@ from setuptools import setup
|
||||
version = '1.20.0.dev0'
|
||||
|
||||
install_requires = [
|
||||
'dnspython',
|
||||
'dnspython>=1.15.0',
|
||||
'setuptools>=39.0.1',
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user