Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
protect against an SRV field starting with a hyphen
The original RFC 2782 was fairly lax in restraining what an SRV Service Name may look like, but RFC 6335 is explicitly "MUST NOT". So rather than worrying about warnings, and options to ignore warnings when someone's doing something strange, let's just make it an error to supply a service name which starts with a hyphen. This should be enough to protect against the most likely mis-invocation, where someone doesn't notice that `-srv` takes a string parameter and follows with another option. It's not fool-proof, but it's a 90% solution which buys immediate wins today without being a dead-end which might preclude any better solution in the future.
- Loading branch information