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 plugin short name parsing for records that contain the zone name more than once #586

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rmbolger
Copy link
Owner

Fixes #584

Many DNS plugins use a regex based algorithm documented in the plugin development guide to separate a record label (short name) from its zone name. The previous version of this algorithm didn't account for the edge case where the FQDN might contain the zone name more than once in the string.

So a record like _acme-challenge.example.com.foo.example.com in a zone called example.com would result in a short name of _acme-challenge..foo instead of _acme-challenge.example.com.foo preventing the proper creation of the associated TXT record with that provider.

This change fixes that bug in all of the plugins currently implementing it and in the plugin development guide.

Thanks to @andreashaerter for finding the original bug.

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.

Domain-name in sub-domain not possible (at least a documentation issue)
1 participant