Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
163daea4
Commit
163daea4
authored
Sep 22, 2016
by
Mathis Hoffmann
Committed by
Joshua Tauberer
Sep 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dnspython exception with IPv6 addresses
see #945, merges #947
parent
102b2d46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
ssl_certificates.py
management/ssl_certificates.py
+11
-0
status_checks.py
management/status_checks.py
+16
-0
No files found.
management/ssl_certificates.py
View file @
163daea4
...
...
@@ -238,6 +238,17 @@ def get_certificates_to_provision(env, show_extended_problems=True, force_domain
except
Exception
as
e
:
problems
[
domain
]
=
"DNS isn't configured properly for this domain: DNS lookup had an error:
%
s."
%
str
(
e
)
return
False
# Unfortunately, the response.__str__ returns bytes
# instead of string, if it resulted from an AAAA-query.
# We need to convert manually, until this is fixed:
# https://github.com/rthalley/dnspython/issues/204
#
# BEGIN HOTFIX
if
isinstance
(
response
[
0
]
.
to_text
(),
bytes
):
response
=
[
response
[
0
]
.
to_text
()
.
decode
(
'utf-8'
)]
# END HOTFIX
if
len
(
response
)
!=
1
or
str
(
response
[
0
])
!=
value
:
problems
[
domain
]
=
"Domain control validation cannot be performed for this domain because DNS points the domain to another machine (
%
s
%
s)."
%
(
rtype
,
", "
.
join
(
str
(
r
)
for
r
in
response
))
return
False
...
...
management/status_checks.py
View file @
163daea4
...
...
@@ -680,6 +680,22 @@ def query_dns(qname, rtype, nxdomain='[Not Set]', at=None):
# periods from responses since that's how qnames are encoded in DNS but is
# confusing for us. The order of the answers doesn't matter, so sort so we
# can compare to a well known order.
# Unfortunately, the response.__str__ returns bytes
# instead of string, if it resulted from an AAAA-query.
# We need to convert manually, until this is fixed:
# https://github.com/rthalley/dnspython/issues/204
#
# BEGIN HOTFIX
response_new
=
[]
for
r
in
response
:
if
isinstance
(
r
.
to_text
(),
bytes
):
response_new
.
append
(
r
.
to_text
()
.
decode
(
'utf-8'
))
else
:
response_new
.
append
(
r
)
response
=
response_new
# END HOTFIX
return
"; "
.
join
(
sorted
(
str
(
r
)
.
rstrip
(
'.'
)
for
r
in
response
))
def
check_ssl_cert
(
domain
,
rounded_time
,
ssl_certificates
,
env
,
output
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment