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

Fix regression in Syntax04 #1369

Merged

Conversation

marc-vanderwal
Copy link
Contributor

Purpose

This PR fixes a small regression caused by code refactoring.

Context

See #1368 (and the original changes that introduced the regression being addressed by this PR: #1322).

Changes

  • Refer to the correct variable inside a loop checking the syntax of a zone’s name servers’ names.

How to test this PR

Run the following two tests.

Firstly, run the following command:

perl -MZonemaster::Engine -E 'say join "\n", Zonemaster::Engine->test_method("syntax", "syntax04", "hipotel.fr");'

Expect one of the lines in the output to have a NAMESERVER_NON_ALLOWED_CHARS message like so:

Syntax:Syntax04:NAMESERVER_NON_ALLOWED_CHARS domain="100\\0321\\032443\\032sipdir.online.lync.com"

Secondly, run a complete test on hipotel.fr, either using zonemaster-cli hipotel.fr or from GUI. Expect an error message stating “Found illegal characters in the nameserver (100\0321\032443\032sipdir.online.lync.com).”.

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.
@marc-vanderwal marc-vanderwal added T-Bug Type: Bug in software or error in test case description V-Patch Versioning: The change gives an update of patch in version. labels Jul 1, 2024
@marc-vanderwal marc-vanderwal added this to the v2024.1 milestone Jul 1, 2024
@matsduf
Copy link
Contributor

matsduf commented Jul 1, 2024

@marc-vanderwal, please merge.

@marc-vanderwal
Copy link
Contributor Author

@marc-vanderwal, please merge.

Merging…

@marc-vanderwal marc-vanderwal merged commit fa012b2 into zonemaster:develop Jul 1, 2024
3 checks passed
@tgreenx tgreenx linked an issue Jul 8, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Type: Bug in software or error in test case description 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.

Syntax04 checks the syntax of the wrong kind of name
4 participants