fix(route/twitter): Mask the error output to avoid leak token (#17193)
This commit is contained in:
@@ -116,7 +116,7 @@ export const twitterGot = async (
|
||||
agent,
|
||||
};
|
||||
} else if (auth) {
|
||||
throw new ConfigNotFoundError(`Twitter cookie for token ${auth?.token} is not valid`);
|
||||
throw new ConfigNotFoundError(`Twitter cookie for token ${auth?.token?.replace(/(\w{8})(\w+)/, (_, v1, v2) => v1 + '*'.repeat(v2.length))} is not valid`);
|
||||
}
|
||||
const jsonCookie = dispatchers
|
||||
? Object.fromEntries(
|
||||
|
||||
Reference in New Issue
Block a user