MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / ValidateDomain

Function ValidateDomain

internal/agent/api.go:1553–1555  ·  view source on GitHub ↗

validateDomain runs the IDNA "Lookup" profile against a user-supplied domain string. Lookup is the strictest of the four IDNA profiles and is what DNS resolvers themselves apply when converting a name into a wire-format query — it rejects whitespace, control characters, invalid label combinations, a

(domain string)

Source from the content-addressed store, hash-verified

1551// instead of replicating the security-relevant parsing. Returns the
1552// normalized (Punycode) form.
1553func ValidateDomain(domain string) (string, error) {
1554 return validateDomain(domain)
1555}
1556
1557func validateDomain(domain string) (string, error) {
1558 if domain == "" {

Callers 1

handleRegisterDomainMethod · 0.92

Calls 1

validateDomainFunction · 0.85

Tested by

no test coverage detected