this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

identity: enforce disallowed TLDs

+7
+4
atproto/identity/handle.go
··· 164 164 var dnsErr error 165 165 var did syntax.DID 166 166 167 + if !handle.AllowedTLD() { 168 + return "", ErrHandleReservedTLD 169 + } 170 + 167 171 tryDNS := true 168 172 for _, suffix := range d.SkipDNSDomainSuffixes { 169 173 if strings.HasSuffix(handle.String(), suffix) {
+3
atproto/identity/identity.go
··· 40 40 // Indicates that handle and DID resolved, but handle points to a DID with a different handle. This is only returned when looking up a handle, not when looking up a DID. 41 41 var ErrHandleNotValid = errors.New("handle resolves to DID with different handle") 42 42 43 + // Handle top-level domain (TLD) is one of the special "Reserved" suffixes, and not allowed for atproto use 44 + var ErrHandleReservedTLD = errors.New("handle top-level domain is disallowed") 45 + 43 46 // Indicates that resolution process completed successfully, but the DID does not exist. 44 47 var ErrDIDNotFound = errors.New("DID not found") 45 48