Skip to content

Normalize WHOIS targets and reject non-domain inputs#10

Merged
retlehs merged 1 commit intomainfrom
whois-input-handling
Apr 12, 2026
Merged

Normalize WHOIS targets and reject non-domain inputs#10
retlehs merged 1 commit intomainfrom
whois-input-handling

Conversation

@retlehs
Copy link
Copy Markdown
Owner

@retlehs retlehs commented Apr 12, 2026

  • resolver.RegistrableDomain normalizes WHOIS/RDAP targets via the public suffix list so subdomain queries walk up to the registrable domain (mail.google.comgoogle.com, retlehs.github.iogithub.io). Subcommands like dns, tls, and mail still pass the raw FQDN through so they query exactly the name you typed.
  • Obvious non-domains (hello, version, bare suffixes like co.jp) are rejected before the TUI launches, and rootCmd.SilenceUsage keeps those errors to a single line instead of dumping cobra's usage help.

@retlehs retlehs self-assigned this Apr 12, 2026
@retlehs retlehs merged commit 310798f into main Apr 12, 2026
5 checks passed
@retlehs retlehs deleted the whois-input-handling branch April 12, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant