• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dnsimple / dns_erlang / 20237295847

15 Dec 2025 03:15PM UTC coverage: 84.45% (+2.0%) from 82.485%
20237295847

push

github

web-flow
Fix Base64 lexing of zone files (and add support for ZONEMD records) (#94)

This PR introduces support for the `ZONEMD` resource record ([RFC8976](https://datatracker.ietf.org/doc/html/rfc8976)) and fixes a lexing issue where Base64-encoded strings containing + or / were failing to parse correctly.

1. New Record Support: ZONEMD
    - Added ZONEMD to the supported resource record types: this allows the parser to handle Message Digests for DNS Zones ([RFC8976](https://datatracker.ietf.org/doc/html/rfc8976)), enabling cryptographic verification of zone data integrity.

2. Lexer Fix: Base64 Support
    - Updated `LABEL_CHAR` and `LABEL` regex definitions in `src/dns_zone_lexer.xrl` to include `+` and `/`: previously, the lexer was restricted to alphanumeric characters (plus -_*:) for unquoted strings. This caused failures when parsing Base64-encoded fields—common in `DNSKEY`, `RRSIG`, `DS`, and now `ZONEMD` records—if they contained standard Base64 characters `+` or `/`.

Context & References
- [RFC8976](https://datatracker.ietf.org/doc/html/rfc8976) (Message Digests for DNS Zones): Defines the ZONEMD record to provide a cryptographic digest of the zone's content.
- [RFC4648](https://datatracker.ietf.org/doc/html/rfc4648) (Base64 Encoding): Defines the Base64 alphabet as A-Z, a-z, 0-9, +, and /.
- [RFC1035](https://datatracker.ietf.org/doc/html/rfc1035) §5.1: Defines Master File RDATA as "character-strings", which should allow contiguous sequences including + and /.

37 of 49 new or added lines in 5 files covered. (75.51%)

8 existing lines in 2 files now uncovered.

2281 of 2701 relevant lines covered (84.45%)

2966.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.18
/src/dns_encode.erl


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc