Skip to content

Commit

Permalink
reslving fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tron committed Nov 16, 2024
1 parent 12cad02 commit 568b0fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/api/dns_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ func (h *Handler) AccountDnsBackResolve(ctx context.Context, params oas.AccountD
}

func (h *Handler) DnsResolve(ctx context.Context, params oas.DnsResolveParams) (*oas.DnsRecord, error) {
if len(params.DomainName) == 48 || len(params.DomainName) == 52 {
return nil, toError(http.StatusBadRequest, fmt.Errorf("domains with length 48 and 52 can't be resolved by security issues"))
if len(params.DomainName) == 48 || len(params.DomainName) == 52 || (len(params.DomainName) == 46 && params.DomainName[:2] == "0x") {
return nil, toError(http.StatusBadRequest, fmt.Errorf("domains with length 46, 48 and 52 can't be resolved by security issues"))
}
if len(params.DomainName) > 127 {
return nil, toError(http.StatusBadRequest, fmt.Errorf("domain name is too long"))
Expand Down

0 comments on commit 568b0fc

Please sign in to comment.