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

Make syntax04 take zone name instead of ns name #1322

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

mattias-p
Copy link
Member

@mattias-p mattias-p commented Mar 4, 2024

Purpose

Bring syntax04 in line with other methods

Context

Fixes #1321.

Changes

The determination of nameserver names for syntax04 is moved from Zonemaster::Engine::Test::Syntax::all() into Zonemaster::Engine::Test::Syntax::syntax04().

How to test this PR

Find/create zones with NS records with invalid NSDNAME:

  • One NSDNAME with a numeric TLD (e.g. ns1.nic.47).
  • One NSDNAME with a double dash (e.g. ns1.ns--nic.fr).

Run this command (with ZONE replaced with your test zone) and verify that you get complaints about nameserver records.

$ perl -MZonemaster::Engine -E 'say join "\n", Zonemaster::Engine->test_method("syntax", "syntax04", "ZONE")'

Unit tests have been updated to test the converse. I.e. that syntax04 does not complain about zones whose names themselves have these properties.

@tgreenx tgreenx added this to the v2024.1 milestone Mar 11, 2024
@tgreenx tgreenx added the A-TestCase Area: Test case specification or implementation of test case label Mar 11, 2024
@tgreenx tgreenx linked an issue Mar 11, 2024 that may be closed by this pull request
@mattias-p mattias-p merged commit 1858323 into zonemaster:develop Apr 5, 2024
3 checks passed
@mattias-p mattias-p added the V-Major Versioning: The change gives an update of major in version. label Jun 17, 2024
@matsduf
Copy link
Contributor

matsduf commented Jun 28, 2024

Release testing for v2024.1

Cannot determine the correctness.

@matsduf matsduf added the S-ReleaseTested Status: The PR has been successfully tested in release testing label Jun 28, 2024
@marc-vanderwal
Copy link
Contributor

Well, actually it seems that this change introduces a regression.

Take hipotel.fr, whose NS resource record set currently includes a record whose name contains spaces.

On 2023.2.1, Zonemaster correctly reports the invalid characters in the NS’s name:
Syntax04 complains about 100\0321\032443\032sipdir.online.lync.com.

On latest develop, however, this doesn’t work anymore and Syntax04 reports the domain, instead of the name server name:
Syntax04 does not show any errors anymore

@matsduf
Copy link
Contributor

matsduf commented Jul 1, 2024

Is this a show stopper?

Actually, I do not understand what the purpose of this PR is.

@marc-vanderwal
Copy link
Contributor

From what I understand, it’s a PR that refactors some code. It looked alright on the surface but the affected code doesn’t seem to be covered by unit tests.

marc-vanderwal added a commit to marc-vanderwal/zonemaster-engine that referenced this pull request Jul 1, 2024
The change introduced in zonemaster#1322 to make Syntax04 take the domain under
test, instead of a name server name, had a little oversight that caused
the zone under test being tested for good syntax, instead of a name
server name.

Make sure we refer to the correct variable.
@mattias-p mattias-p added V-Patch Versioning: The change gives an update of patch in version. and removed V-Major Versioning: The change gives an update of major in version. labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-TestCase Area: Test case specification or implementation of test case S-ReleaseTested Status: The PR has been successfully tested in release testing V-Patch Versioning: The change gives an update of patch in version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bring syntax04 in line with other methods
4 participants