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

API: prevent duplicate records in single RRset #4195

Merged
merged 2 commits into from Aug 21, 2017

Conversation

Projects
None yet
6 participants
@zeha
Collaborator

zeha commented Jul 15, 2016

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added regression tests
  • added unit tests

@zeha zeha added the auth label Jul 15, 2016

@zeha zeha added this to the auth-4.1.0 milestone Aug 27, 2016

@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Aug 27, 2016

Collaborator

Somebody please review this.

Collaborator

zeha commented Aug 27, 2016

Somebody please review this.

@pieterlexis

This comment has been minimized.

Show comment
Hide comment
@pieterlexis

pieterlexis Sep 6, 2016

Member

looks good to me, please rebase 👍

Member

pieterlexis commented Sep 6, 2016

looks good to me, please rebase 👍

@skf82 skf82 referenced this pull request Sep 19, 2016

Closed

Search returns 500 API error #119

@tuxis-ie

This comment has been minimized.

Show comment
Hide comment
@tuxis-ie

tuxis-ie Sep 19, 2016

Contributor

May I please object? Although this might be technically correct, it is not very userfriendly. When importing a zone from another setup, I would just like to AXFR the zone, copy paste it into nsedit and be done with it. If I choose not to send an array with nameservers, just use the nameservers that are already in the zone, or b0rk. If I however do send an array with nameservers, override the nameservers in the zone.

If you b0rk on nameservers in the array and in the zone, you are forcing users to first review the whole zone before they are able to import.

So please reconsider this.

Contributor

tuxis-ie commented Sep 19, 2016

May I please object? Although this might be technically correct, it is not very userfriendly. When importing a zone from another setup, I would just like to AXFR the zone, copy paste it into nsedit and be done with it. If I choose not to send an array with nameservers, just use the nameservers that are already in the zone, or b0rk. If I however do send an array with nameservers, override the nameservers in the zone.

If you b0rk on nameservers in the array and in the zone, you are forcing users to first review the whole zone before they are able to import.

So please reconsider this.

@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Sep 19, 2016

Collaborator

@tuxis-ie This would imply the outcome of sending conflicting data is a silent loss of either data. If you want a fallback, client code can handle this. (Either by looking at the data before sending, or by sending 'replace NS' afterwards.)

Collaborator

zeha commented Sep 19, 2016

@tuxis-ie This would imply the outcome of sending conflicting data is a silent loss of either data. If you want a fallback, client code can handle this. (Either by looking at the data before sending, or by sending 'replace NS' afterwards.)

@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Sep 19, 2016

Collaborator

@pieterlexis rebased.

Collaborator

zeha commented Sep 19, 2016

@pieterlexis rebased.

@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Oct 24, 2016

Collaborator

Rebased once more.

Collaborator

zeha commented Oct 24, 2016

Rebased once more.

Show outdated Hide outdated pdns/ws-auth.cc

zeha added some commits Jul 15, 2016

API test: stop binding pdns_server to ::
Avoids firewall warning on OS X, and is generally good.
API: prevent duplicate records in single RRset
If a zone already had duplicates, we do nothing to them
(for now).
@zeha

This comment has been minimized.

Show comment
Hide comment
@zeha

zeha Jul 24, 2017

Collaborator

Worked in review feedback + rebased.

Collaborator

zeha commented Jul 24, 2017

Worked in review feedback + rebased.

@Habbie

Habbie approved these changes Aug 14, 2017

Approved, even if the answer to my one question is no.

[](const DNSResourceRecord& rec_a, const DNSResourceRecord& rec_b) -> bool {
return rec_a.qname.toString() > rec_b.qname.toString() || \
rec_a.qtype.getCode() > rec_b.qtype.getCode() || \
rec_a.content < rec_b.content;

This comment has been minimized.

@Habbie

Habbie Aug 14, 2017

Member

Has content been canonicalized at this point?

@Habbie

Habbie Aug 14, 2017

Member

Has content been canonicalized at this point?

This comment has been minimized.

@zeha

zeha Aug 21, 2017

Collaborator

Yes!

@zeha

zeha Aug 21, 2017

Collaborator

Yes!

@Habbie Habbie merged commit 3ad168a into PowerDNS:master Aug 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zeha zeha deleted the zeha:api-nameservers-or-ns-rrset branch Jan 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment