Cleanup attachment download flow

This commit is contained in:
trevor-signal 2024-03-21 16:02:12 -04:00 committed by GitHub
parent 9ad0e5064d
commit ff5ecd8bf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 25 deletions

View file

@ -163,6 +163,10 @@ export const redactCallLinkRootKeys = (text: string): string => {
return text.replace(CALL_LINK_ROOT_KEY_PATTERN, `${REDACTION_PLACEHOLDER}$1`);
};
export const redactCdnKey = (cdnKey: string): string => {
return `${REDACTION_PLACEHOLDER}${cdnKey.slice(-3)}`;
};
const createRedactSensitivePaths = (
paths: ReadonlyArray<string>
): RedactFunction => {