fix: replace all CRLF in email token (#10271)
This commit is contained in:
@@ -34,7 +34,7 @@ export async function getTokenFromLatestMailMessage<A extends Assertions>(
|
|||||||
const emailContent = await getLatestMailMessage();
|
const emailContent = await getLatestMailMessage();
|
||||||
const tokenMatch = emailContent.Content.Body.match(tokenRegex);
|
const tokenMatch = emailContent.Content.Body.match(tokenRegex);
|
||||||
const token = tokenMatch
|
const token = tokenMatch
|
||||||
? decodeURIComponent(tokenMatch[1].replace(/=\r\n/, ''))
|
? decodeURIComponent(tokenMatch[1].replaceAll('=\r\n', ''))
|
||||||
: null;
|
: null;
|
||||||
test?.truthy(token);
|
test?.truthy(token);
|
||||||
return token;
|
return token;
|
||||||
|
|||||||
Reference in New Issue
Block a user