Skip to content

Commit

Permalink
identity: don't remove non-ASCII characters
Browse files Browse the repository at this point in the history
simplifies what we are normalizing: just take the first line and strip whitespace, don't try to remove any non-ASCII characters as well.
  • Loading branch information
bnewbold authored Sep 12, 2023
1 parent 1c807a7 commit 27bf744
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/identity/src/handle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export class HandleResolver {
const url = new URL('/.well-known/atproto-did', `https://${handle}`)
try {
const res = await fetch(url, { signal })
const asciiText = (await res.text()).replace(/[^\x00-\x7F]/g, "")
const did = asciiText.split('\n')[0].trim()
const did = (await res.text()).split('\n')[0].trim()
if (typeof did === 'string' && did.startsWith('did:')) {
return did
}
Expand Down

0 comments on commit 27bf744

Please sign in to comment.