Commit Graph

27 Commits

Author SHA1 Message Date
Vassilis Asteriou
0568a90ec1 Changed auto_ptr() logic to remove-then-add 2023-02-08 15:27:45 +02:00
corubba
cb835978df Fix order of operations in api payload
PDNS checks that when a `CNAME` rrset is created that no other rrset of
the same name but a different rtype exists. When changing a record type
to `CNAME`, PDA will send two operations in one api call to PDNS: A
deletion of the old rrset, and the addition of the new rrset. For the
check in PDNS to pass, the deletion needs to happen before the addition.
Before PR #1201 that was the case, the first api call did deletions and
the second handled additions and changes. Currently the api payload
contains additions first and deletions last. PDNS applies these in the
order they are passed in the payload to the api, so to restore the
original/correct/working behaviour the order of operations in the api
payload has to be reversed.

fixes #1251
2022-09-23 00:19:22 +02:00
corubba
af902f24a2 Update using only one api call
Starting with the very first commit, the update was always done with
two api calls: one for DELETE and one for REPLACE. It is however
perfectly valid and save to do both at once, which makes it atomic, so
no need for the rollback. Plus it only updates the serial once.
There is no point in sending the full RRset data when deleting it, the
key attributes to identify it are enough. This also make the behaviour
consistent with the api docs [0] where it says "MUST NOT be included
when changetype is set to DELETE."

[0] https://doc.powerdns.com/authoritative/http-api/zone.html#rrset
2022-06-18 18:58:39 +02:00
jbe-dw
2a75013de4
Merge pull request #1163 from AdvanticGmbH/idna_decode
fix: use idna module to support extended character set
2022-06-17 15:47:55 +02:00
corubba
f98326ea90 Fix remaining typo occurrence 2022-05-24 23:45:14 +02:00
AdvanticGmbH
191e919626 Allow IDNA in SOA
* Previously having characters like "ü" in the SOA wouldnt allow to push
updates to the domain
* Also use the new method to_idna to support characters like "ß"
2022-04-25 10:19:40 +02:00
Jérôme BECOT
17b4269e1b
fix: Set Content-Type on backend API calls 2022-03-30 23:39:00 +02:00
Hidde
f96103db79
Replace [ZONE] placeholder with domain_name (#960) 2021-10-30 21:24:16 +02:00
Mark Zealey
4ce1b71c57
Fix when no records returned by API (#923)
For some reason when some programs delete a record we get an entry returned with records: []
2021-10-30 21:07:42 +02:00
jyoung15
32983635c6
Delete blank comments. Fix for ngoduykhanh/PowerDNS-Admin#919 (#920) 2021-05-07 23:43:44 +02:00
R. Daneel Olivaw
46993e08c0
Add punycode (IDN) support (#879) 2021-03-16 19:37:05 +01:00
Khanh Ngo
5123d542e4
Fix #752 - Rollback the removed record if apply operation failed 2020-06-19 09:34:33 +07:00
Khanh Ngo
a3fd856dd8
Code refactoring and bug fixes 2020-06-19 08:47:51 +07:00
Khanh Ngo
125883330e Merge branch 'pull/679' 2020-05-24 21:19:04 +07:00
Steve Shipway
3476c8a9ec SJS Sort rrset members by content before comparison to ensure correct compare. Also default comment to blank entry rather than missing entry, to allow sorting to work correctly. 2020-05-20 16:21:28 +12:00
Scott Howard
417338d826 Remove blank comments from rrsets before sending for compatibility with some pdns backends 2020-03-07 02:07:41 -06:00
Enrico Tröger
68843d9664 Add new setting to verify outgoing SSL connections
The new setting 'verify_ssl_connections' tells the requests library to
verify secured outgoing HTTP connections.
Usually verifying is desired and helps to reveal configuration
problems. It also disables an ugly warning when HTTPS connections
are made without verification.
2020-01-25 19:44:11 +01:00
Khanh Ngo
1cd423041c Fix #632 2020-01-07 14:30:28 +07:00
Khanh Ngo
7f8ae003fc
Fix #631 Ipv6 reverse dns with pretty_ipv6_ptr enabled 2020-01-03 09:32:04 +07:00
Khanh Ngo
93cd64ac75
Fix #613. Create domain from template with SOA record enabled 2019-12-19 21:43:53 +07:00
Khanh Ngo
3e961d7b21
LGTM fixes 2019-12-16 16:27:18 +07:00
Khanh Ngo
3196297f57
Fix domain template. Drop PDNS 3.x support 2019-12-16 14:23:17 +07:00
Khanh Ngo
5ac58d5503
Re-add pretty_ipv6_ptr. Bug fixes 2019-12-14 23:13:55 +07:00
Khanh Ngo
14658d797e
Adjustment in domain's record applying 2019-12-14 14:47:21 +07:00
Khanh Ngo
67e6df6880
Bug fixes. Adjust logger 2019-12-10 17:08:43 +07:00
Khanh Ngo
bca3c45e37
Add record comment 2019-12-09 17:50:48 +07:00
Khanh Ngo
8ea00b9484
Refactoring the code
- Use Flask blueprint
- Split model and views into smaller parts
- Bug fixes
- API adjustment
2019-12-02 10:32:03 +07:00