Verified Commit 9140e2d7 authored by heiko.reese's avatar heiko.reese 💤
Browse files

Fix: invalid memory address or nil pointer dereference on empty/broken/lost DNS answer over UDP.

parent 3eef9bba
Pipeline #242988 passed with stages
in 2 minutes and 28 seconds
......@@ -57,8 +57,8 @@ func NameserverHasChallenge(nameserver, fqdn, challenge string) bool {
// request all TXT records
TXTAnswer, _, err := client.Exchange(&msg, nameserver)
// if message is too big, retry using TCP
if TXTAnswer.MsgHdr.Truncated {
// if message is empty/broken/lost or too big, retry over TCP
if TXTAnswer == nil || TXTAnswer.MsgHdr.Truncated {
// Set DNS query protocol to TCP to allow for large anwsers
client.Net = "tcp"
// ask DNS about challenge record
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment