-
Notifications
You must be signed in to change notification settings - Fork 112
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
issue #170: Produce proper DNS quoted strings for TXT and SPF records #171
Conversation
This change modifies the `zone_record.erb` template so that it processes the data values for TXT and SPF records to produce proper DNS quoted strings (of no more than 255 characters, with embedded quotes and backslashes escaped with backslashes). It also adds SPEC tests for the TXT record type.
# for TXT and SPF records, transform the data item into a valid text record value: | ||
# use String.unpack to split the text value into 255 character chunks; | ||
# then use Array.collect to turn each chunk into a valid quoted character string; | ||
# finally join the quoted character strings together, separated by a space. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did a great job documenting why we do this in the issue, can you put the abridged version here? (at least link to the RFC)
I guess I don't understand what you are asking for. What do you mean by a docstring? Do you mean you want the comment block at the top of |
Yes. I would link you to the "puppet doc" format to that but they've removed in favor of the "puppet strings" stuff which isn't fully baked yet. |
Markdown source code for last version of Puppet style guide that included the Puppet Doc section: https://raw.githubusercontent.com/puppetlabs/puppet-docs/462e3350c548d2b0ee9c91d2a68aabb9b6d2c87e/source/guides/style_guide.markdown - go to the end for section 13 on Puppet Doc |
Thanks! |
#170 This change modifies the
zone_record.erb
template so that itprocesses the data values for TXT and SPF records to produce proper
DNS quoted strings (of no more than 255 characters, with embedded
quotes and backslashes escaped with backslashes).
It also adds SPEC tests for the TXT record type.