mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 06:16:59 +08:00
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 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;
|
||||
|
||||
Reference in New Issue
Block a user