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

fixes zone2sql include with a comment #14414

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ITJamie
Copy link

@ITJamie ITJamie commented Jul 3, 2024

Short description

fixes #14382

Checklist

I have:

  • read the CONTRIBUTING.md document
  • 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)
  • checked that this code was merged to master

@ITJamie
Copy link
Author

ITJamie commented Jul 3, 2024

this fix worked for us to parse out hundreds of includes which had comments at the end of them

@omoerbeek
Copy link
Member

omoerbeek commented Jul 4, 2024

I'm not sure semicolon inside a quoted path will now work as expected.

I think it would be better to fix the splitting of tokens. This also should fix the parsing of the other $XYZ cases.

@omoerbeek
Copy link
Member

It looks like correct comment handling would require quite a bit of effort, e.g. things like quoted pathname with semicolons or spaces in them go wrong as well. Given that, your PR might be acceptable.

@Habbie Habbie added this to the auth-5 milestone Jul 4, 2024
@coveralls
Copy link

coveralls commented Jul 4, 2024

Pull Request Test Coverage Report for Build 9786192998

Details

  • 0 of 7 (0.0%) changed or added relevant lines in 1 file are covered.
  • 58 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.2%) to 64.652%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pdns/zoneparser-tng.cc 0 7 0.0%
Files with Coverage Reduction New Missed Lines %
modules/gpgsqlbackend/gpgsqlbackend.cc 1 88.62%
pdns/recursordist/recursor_cache.cc 1 86.42%
pdns/sstuff.hh 2 56.83%
pdns/distributor.hh 2 51.86%
pdns/recursordist/rec-tcpout.cc 2 63.49%
pdns/ws-auth.cc 2 80.78%
pdns/stubresolver.cc 3 77.58%
pdns/recursordist/syncres.cc 3 79.5%
pdns/recursordist/test-syncres_cc1.cc 6 89.55%
pdns/recursordist/rec-tcp.cc 10 64.56%
Totals Coverage Status
Change from base Build 9775477569: 0.2%
Covered Lines: 124682
Relevant Lines: 162118

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zone2sql failed when it reached an $include statement ending in ;
4 participants