Skip to content

Trim the data field of dquotes when finding records#28

Closed
andsens wants to merge 1 commit intolibdns:mainfrom
orbit-online:ft-trim-data
Closed

Trim the data field of dquotes when finding records#28
andsens wants to merge 1 commit intolibdns:mainfrom
orbit-online:ft-trim-data

Conversation

@andsens
Copy link
Contributor

@andsens andsens commented Mar 5, 2026

The INWX API trims leading and trailing quotes in the data field, so it's not possible to create e.g. TXT records with quoted content.
Meaning you don't ever want to look for records that have data which is surrounded by quotes.

I don't know if the change covers enough or too much. I have only observed this with TXT records and only with double quotes (single quotes seem to behave normally).

I don't think the failing tests have anything to do with the change since the #27 has the exact same failures.

The INWX API trims leading and trailing quotes in the data field,
so it's not possible to create e.g. TXT records with quoted content
@ihmels
Copy link
Collaborator

ihmels commented Mar 16, 2026

Thanks for the PR and for investigating the INWX API behaviour.

However, according to the libdns contract, TXT record data should not be passed with surrounding quotes:

https://github.com/libdns/libdns/blob/d3609c6996e67a8186b81cb4c797dd8c48d5017c/rrtypes.go#L440-L442

The “Text” field contains the arbitrary data associated with the TXT record. The contents of this field should not be wrapped in quotes as libdns implementations are expected to quote any fields as necessary.

Because of this, records coming from libdns should never contain leading or trailing quotes in the Text field. If they do, that would likely be a bug in the caller rather than something the provider should compensate for.

@ihmels ihmels closed this Mar 16, 2026
@andsens andsens deleted the ft-trim-data branch March 17, 2026 11:45
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.

2 participants