Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure DNS - consecutive DNS challenges break validation #17

Open
ohadschn opened this issue Feb 9, 2020 · 0 comments
Open

Azure DNS - consecutive DNS challenges break validation #17

ohadschn opened this issue Feb 9, 2020 · 0 comments

Comments

@ohadschn
Copy link

ohadschn commented Feb 9, 2020

It seems that after a few DNS challenges are made, and the TXT record contains more values, exceptions like this are encountered:

Challenge record was Pq-z7SLbwD7f_SXrA-J-akjsdhaskjdh-83D4 should have been fKESI1optQ-PjI2sYX41pC0akjsdhlaksjdh70L4, retrying again in 5 seconds

Looking at the actual record, both are there. So the code might be looking at the wrong one - I'm guessing because an assumption is made on the order of returned values:

queriedDns = dnsRes.Answers.TxtRecords().FirstOrDefault()?.Text.FirstOrDefault();

When yet more challenges are made, the exception becomes (probably at the fault of the DNS client):
DnsClient.DnsResponseException: Unhandled exception ---> System.IndexOutOfRangeException: Cannot read that many bytes: '43'

Either way, manually deleting the TXT entry fixes the issue. Maybe you could delete it each time, rather than add values to it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant