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

fix: program failing when unknown record type is in zone #56

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

diogotcorreia
Copy link
Contributor

The upstream cloudflare crate does not support parsing CAA records (and others), which means that the result of the record listing endpoint cannot be parsed by cfdyndns, resulting in a crash.

This PR adds a filter to the requests to only get A and AAAA records. However, due to the design of the upstream crate, it is not possible to filter by type without also filtering by content, meaning we have to change the match parameter to any. Additionally, the API only allows to filter by a single type, which means we duplicate the number of requests by making one request for A records and another for AAAA records.

Fixes #54

The upstream `cloudflare` crate does not support parsing CAA records
(and others), which means that the result of the record listing endpoint
cannot be parsed by cfdyndns, resulting in a crash.

This PR adds a filter to the requests to only get A and AAAA records.
However, due to the design of the upstream crate, it is not possible to
filter by type without also filtering by content, meaning we have to
change the `match` parameter to `any`. Additionally, the API only allows
to filter by a single type, which means we duplicate the number of
requests by making one request for A records and another for AAAA
records.

Fixes nrdxp#54
@nrdxp
Copy link
Owner

nrdxp commented Jun 4, 2024

I dunno why CI didn't trigger for this PR. I also don't see the usual section to "approve" the workflow to run for this PR. Given that everything is configured properly and I am the repo owner, I must assume that something strange happened on GitHub's side unless I overlooked something.

In any case I will run it manually and merge if it passes. Thank you 🙏

@nrdxp nrdxp merged commit defade2 into nrdxp:master Jun 4, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

cfdyndns fails when a CAA record (or any other unknown RR type) exists in the zone
3 participants