Skip to content

auth: once again, relax JSON normalization code for record contents#17373

Open
miodvallat wants to merge 3 commits into
PowerDNS:masterfrom
miodvallat:hemicolon
Open

auth: once again, relax JSON normalization code for record contents#17373
miodvallat wants to merge 3 commits into
PowerDNS:masterfrom
miodvallat:hemicolon

Conversation

@miodvallat
Copy link
Copy Markdown
Contributor

Short description

As mentioned in #17368, the recent addition of normalization for the RRset contents fed through the API will reject semicolons in valid TXT records.

This PR replaces the use of parseRFC1035CharString in this code path with a slightly different parseRFC1035CharStringRelaxed. The only difference between these routines is that the relaxed form will now accept ( ) and ;, if they occur within a "-quoted part.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • read and accepted the Developer Certificate of Origin document, including the AI Policy, and added a "Signed-off-by" to my commits
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

…ents.

parseRFC1035CharString will always reject ( ) and ;, the latter which is
quite often used. The new parseRFC1035CharStringRelaxed automaton behaves
similarly to parseRFC1035CharString, but allows these three characters when
they appear within quoted sections.

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Fixes PowerDNS#17368

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
@miodvallat miodvallat added this to the auth-5.1 milestone May 15, 2026
Comment thread pdns/test-misc_hh.cc Dismissed
@coveralls
Copy link
Copy Markdown

coveralls commented May 15, 2026

Coverage Report for CI Build 25920986031

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage at 71.091% (no base build to compare)

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 69 of 69 lines across 2 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 170144
Covered Lines: 132495
Line Coverage: 77.87%
Relevant Branches: 81130
Covered Branches: 46137
Branch Coverage: 56.87%
Branches in Coverage %: Yes
Coverage Strength: 6646787.07 hits per line

💛 - Coveralls

Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants