Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The "--dane" option can be used both as a flag and with an argument. In its current implementation, it is even a special case for flags with variable numbers of arguments. At an Icinga 2 ITL PR by GitHub user @peteeckel, an unexpected behavior was seen when calling check_ssl_cert with "--dane" followed by an empty argument[0], as so: $ ./check_ssl_cert --dane "" If the empty argument was used, the --dane option was effectively useless. This is due to the argument counting/checking code, not expecting an empty second argument, setting DANE="", which disables it. This change allows an empty second argument, which will then be swallowed. For the other options with variable numbers of arguments, this does not seem to apply. [0]: Icinga/icinga2#10196 (comment)
- Loading branch information