mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Handle case where DKIM record is split into several pieces
This commit is contained in:
parent
02ed684f9a
commit
c8a23f26bb
1 changed files with 4 additions and 1 deletions
|
@ -130,8 +130,11 @@ class DNSRecordsDiagnoser(Diagnoser):
|
||||||
# Split expected/current
|
# Split expected/current
|
||||||
# from "v=DKIM1; k=rsa; p=hugekey;"
|
# from "v=DKIM1; k=rsa; p=hugekey;"
|
||||||
# to a set like {'v=DKIM1', 'k=rsa', 'p=...'}
|
# to a set like {'v=DKIM1', 'k=rsa', 'p=...'}
|
||||||
|
# Additionally, for DKIM, because the key is pretty long,
|
||||||
|
# some DNS registrar sometime split it into several pieces like this:
|
||||||
|
# "p=foo" "bar" (with a space and quotes in the middle)...
|
||||||
expected = set(r["value"].strip(';" ').replace(";", " ").split())
|
expected = set(r["value"].strip(';" ').replace(";", " ").split())
|
||||||
current = set(r["current"].strip(';" ').replace(";", " ").split())
|
current = set(r["current"].replace('" "', '').strip(';" ').replace(";", " ").split())
|
||||||
|
|
||||||
# For SPF, ignore parts starting by ip4: or ip6:
|
# For SPF, ignore parts starting by ip4: or ip6:
|
||||||
if r["name"] == "@":
|
if r["name"] == "@":
|
||||||
|
|
Loading…
Add table
Reference in a new issue