Repository navigation
SPF parser bug fixed in package dns-zonefile #1207
Description
Activity
Awesome! Thanks for the heads up @elgs
@stephenplusplus - can we take a look ?
- addedapi: dnsIssues related to the Cloud DNS API.Issues related to the Cloud DNS API.
on Apr 6, 2016 @elgs thanks for opening an issue about this! I upgraded locally, but the latest version of
dns-zonefileis breaking one of our e2e tests.1) dns Zones should import records from a zone file: Uncaught AssertionError: '"-all"' === '"v=spf1" "mx:gcloud-node.com." "-all"' + expected - actual -"-all" +"v=spf1" "mx:gcloud-node.com." "-all" at system-test/dns.js:205:22It would seem that some of the values we're testing for are being stripped out. Would you be able to provide me with any clues as to why this might be happening?
@callmehiphop I know what's wrong. That does not mean the old version is anywhere near correct, because in the old version, the
mxin the SPF record could fool the parse to parse it as an mx record if SPF is parse first. I will fixed and get back here soon. Thanks.@callmehiphop I have released `dns-zonefile v0.1.18', which should have fixed the SPF parser problem. This release introduced a zone file resource record normalizer which eliminated assumptions of record format and sticks to the RFC1035. Would you please help run your test again and let me know if it works. Thanks.
@elgs that appears to have fixed it, thanks! I'll make a PR to bump the version of
dns-zonefileshortly. Thanks again for opening this issue and for the quick fix! 👍Sure. Thanks @callmehiphop.
- added a commit that references this issue
on Feb 3, 2026 - added a commit that references this issue
on Mar 11, 2026
Hello, I'm the maintainer of the package
dns-zonefile. I saw this package is depending on a specific version (0.1.10) ofdns-zonefile, which had serious bugs on parsing SPF and TXT records. The latest version has greatly improved the parsers and fixed all known bugs. Now it might be an option for you to update the dependency and move it on to the up to date version. Thanks.