You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #357 we updated the handling command line arguments with regard to domain names. This issue describes a couple of improvements to the new behaviors. This should probably have been brought up while reviewing that PR, but better late than never. It would be great though if we could include fixes for these in v2023.2.
When running in normal mode we're outputting an empty line to separate diagnostics from the test results. But for some reason we're outputting it before all input validations have completed, so the separation is not working as intended. The situation should be improved by validating the domain name related arguments (and all others too) before outputting the separating empty line.
When the domain name argument is "" or "0" we're reusing the same error message that we give when the domain name argument was omitted:
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01
Must give the name of a domain to test.
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 ''
Must give the name of a domain to test.
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 0
Must give the name of a domain to test.
Instead we should acknowledge that a domain name argument was actually found. This would be helpful when debugging a script that invokes zonemaster-cli. I.e. we should do this:
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01
Must give the name of a domain to test.
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 ''
Domain name is empty
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 0
Seconds Level Testcase Message
======= ======== ============== =======
...
When a space character is included in the middle of a domain name, it is considered to be part of a label, but when it is included in at the beginning of the first label or end of the last label, it is automatically stripped. This is particularly problematic when domain names are used as components in complex string types such as the name/ip pairs we use for specifying name servers on the command line.
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 'example .com'
Domain name has an ASCII label ("example ") with a character not permitted.
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 'example '
Seconds Level Testcase Message
======= ======== ============== =======
...
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 ' '
Domain name is empty.
$ zonemaster-cli --raw --level info --no-ipv6 --test basic01 zonemaster.fr --ns 'd.nic.fr. /194.0.9.1'
0.00 INFO GLOBAL_VERSION version=v4.7.3
...
$ zonemaster-cli --raw --level info --no-ipv6 --test basic01 zonemaster.fr --ns 'd.nic.fr./ 194.0.9.1'
Invalid IP address in --ns argument:
Invalid chars in IP 194.0.9.1
IMHO this is a more reasonable behavior:
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 'example .com'
Domain name has an ASCII label ("example ") with a character not permitted.
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 'example '
Domain name has an ASCII label ("example ") with a character not permitted.
$ zonemaster-cli --show-testcase --no-ipv6 --test basic/basic01 ' '
Domain name has an ASCII label (" ") with a character not permitted.
$ zonemaster-cli --raw --level info --no-ipv6 --test basic01 zonemaster.fr --ns 'd.nic.fr. /194.0.9.1'
Invalid name in --ns argument:
Domain name has an ASCII label (" ") with a character not permitted.
$ zonemaster-cli --raw --level info --no-ipv6 --test basic01 zonemaster.fr --ns 'd.nic.fr./ 194.0.9.1'
Invalid IP address in --ns argument:
Invalid chars in IP 194.0.9.1
The text was updated successfully, but these errors were encountered:
In #357 we updated the handling command line arguments with regard to domain names. This issue describes a couple of improvements to the new behaviors. This should probably have been brought up while reviewing that PR, but better late than never. It would be great though if we could include fixes for these in v2023.2.
When running in normal mode we're outputting an empty line to separate diagnostics from the test results. But for some reason we're outputting it before all input validations have completed, so the separation is not working as intended. The situation should be improved by validating the domain name related arguments (and all others too) before outputting the separating empty line.
When the domain name argument is "" or "0" we're reusing the same error message that we give when the domain name argument was omitted:
Instead we should acknowledge that a domain name argument was actually found. This would be helpful when debugging a script that invokes zonemaster-cli. I.e. we should do this:
When a space character is included in the middle of a domain name, it is considered to be part of a label, but when it is included in at the beginning of the first label or end of the last label, it is automatically stripped. This is particularly problematic when domain names are used as components in complex string types such as the name/ip pairs we use for specifying name servers on the command line.
IMHO this is a more reasonable behavior:
The text was updated successfully, but these errors were encountered: