-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bug where did:mailto with pct-encoded email parts was not decode…
…d correctly (#719) … right, causing access/authorize not to send emails for email addresses with '+' Motivation: * storacha/w3cli#73
- Loading branch information
Showing
2 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ for (const accessApiVariant of /** @type {const} */ ([ | |
} | ||
const spaceWithStorageProvider = principal.ed25519.generate() | ||
async function createContext() { | ||
/** @type {{url:string}[]} */ | ||
/** @type {{url:string,to:string}[]} */ | ||
const emails = [] | ||
const email = createEmail(emails) | ||
const ctx = await context({ | ||
|
@@ -384,7 +384,7 @@ for (const accessApiVariant of /** @type {const} */ ([ | |
const abort = new AbortController() | ||
after(() => abort.abort()) | ||
const account = { | ||
email: /** @type {const} */ ('[email protected]'), | ||
email: /** @type {const} */ ('example+123@dag.house'), | ||
did: thisEmailDidMailto, | ||
} | ||
const { connection, emails } = await accessApiVariant.create() | ||
|
@@ -409,6 +409,9 @@ for (const accessApiVariant of /** @type {const} */ ([ | |
with: space.did, | ||
}) | ||
assertNotError(spaceInfoResult) | ||
|
||
const latestEmail = emails.at(-1) | ||
assert.deepEqual(latestEmail?.to, account.email, 'emails are equal') | ||
}) | ||
|
||
it('authorizeWithPollClaim', async () => { | ||
|