mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Support multiple TXT entries for TLD
The dig of TXT for @ can returns multiple entries. In that case, the DNS diagnosis fails. The modification preserves the handling of DMARC and the likes which use a single entry and a specfic domain name. For single entry list, the behavior is preserved. If mutliple TXT entries are defined for @, only the v=spf1 one is returned. Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr>
This commit is contained in:
parent
19eb48b6e7
commit
460e39a2f0
1 changed files with 4 additions and 0 deletions
|
@ -182,6 +182,10 @@ class MyDiagnoser(Diagnoser):
|
|||
if success != "ok":
|
||||
return None
|
||||
else:
|
||||
if type_ == "TXT" and isinstance(answers,list):
|
||||
for part in answers:
|
||||
if part.startswith('"v=spf1'):
|
||||
return part
|
||||
return answers[0] if len(answers) == 1 else answers
|
||||
|
||||
def current_record_match_expected(self, r):
|
||||
|
|
Loading…
Add table
Reference in a new issue