fix: replace all CRLF in email token (#10271)

This commit is contained in:
fengmk2
2025-02-19 04:07:43 +00:00
parent dad39d1129
commit 320875425c

View File

@@ -34,7 +34,7 @@ export async function getTokenFromLatestMailMessage<A extends Assertions>(
const emailContent = await getLatestMailMessage();
const tokenMatch = emailContent.Content.Body.match(tokenRegex);
const token = tokenMatch
? decodeURIComponent(tokenMatch[1].replace(/=\r\n/, ''))
? decodeURIComponent(tokenMatch[1].replaceAll('=\r\n', ''))
: null;
test?.truthy(token);
return token;