Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
99f19d5
fix: sanitize user-provided content with Xss.escape to prevent potent…
May 22, 2026
17c01ac
chore: add default-src to extension_pages content security policy
May 22, 2026
9afde36
chore: update manifest.json
May 22, 2026
49e58de
refactor: use build-specific csp
May 22, 2026
a767053
refactor: move the connect-src patching to makeMockBuild
May 22, 2026
b312de6
test: fix failing test
May 22, 2026
44de259
test: add style-src unsafe inline csp directive
May 25, 2026
31b219b
test: add another host to connect-src csp
May 25, 2026
f019953
test: fix missing port on whitelisted domain
May 25, 2026
74c7181
test: update img-src
May 25, 2026
5fd2d1a
feat: add flowcrypt s3 to connect-src
May 25, 2026
95b06e2
feat: add google.com to connect-src
May 26, 2026
21d7ab3
test: add google.com to test csp
May 26, 2026
5a9b720
Merge remote-tracking branch 'origin/master' into issue-6229-fix-impr…
May 26, 2026
c1789d1
test: add new host to connect-src
May 26, 2026
b42bf66
test: add even more hosts
May 26, 2026
81f3ea1
test: add www.google.com to connect-src
May 26, 2026
5080e27
chore: de-duplicate hosts
May 26, 2026
fb64204
test: add whitelisted ports
May 26, 2026
71a094f
chore: prod-ready manifest.json
May 26, 2026
f9c3116
chore: de-dupe hosts
May 26, 2026
7bb90fa
Merge branch 'master' into issue-6229-fix-improper-output-rendering
martgil May 29, 2026
e82bb73
chore: re-add google.com host
May 29, 2026
5096070
chore: revert changes
Jun 1, 2026
9ca4b7c
fix: apply connect-src and style-src allowing inline
Jun 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extension/chrome/elements/pgp_pubkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ View.run(

private showKeyNotUsableError = async () => {
$('.error_container').removeClass('hidden');
$('.error_introduce_label').html(`This OpenPGP key is not usable.<br/><small>(${await this.getErrorText()})</small>`); // xss-escaped
$('.error_introduce_label').html(`This OpenPGP key is not usable.<br/><small>(${Xss.escape(await this.getErrorText())})</small>`); // xss-escaped
$('.hide_if_error').hide();
$('.fingerprints, .add_contact, #manual_import_warning').remove();
const email = this.firstParsedPublicKey ? KeyUtil.getPrimaryEmail(this.firstParsedPublicKey) : undefined;
Expand Down
7 changes: 5 additions & 2 deletions extension/chrome/settings/modules/contacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,16 @@ View.run(
}
const key = await KeyUtil.parse(armoredPubkey);
$('.hide_when_rendering_subpage').css('display', 'none');
Xss.sanitizeRender('h1', `${this.backBtn}${this.space}${email}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`);
Xss.sanitizeRender('h1', `${this.backBtn}${this.space}${Xss.escape(email)}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`); // xss-escaped
$('#view_contact .key_dump').text(armoredPubkey);
$('#view_contact #container-pubkey-details').text(
[
`Type: ${key.family}`,
`Fingerprint: ${Str.spaced(key.id || 'none')}`,
`Users: ${key.users?.map(u => u.email).filter(Boolean).join(', ')}`,
`Users: ${key.users
?.map(u => u.email)
.filter(Boolean)
.join(', ')}`,
`Created on: ${key.created ? new Date(key.created) : ''}`,
`Expiration: ${key.expiration ? new Date(key.expiration) : 'Does not expire'}`,
`Last signature: ${key.lastModified ? new Date(key.lastModified) : ''}`,
Expand Down
4 changes: 2 additions & 2 deletions extension/js/common/ui/passphrase-ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export const isCreatePrivateFormInputCorrect = async (section: string, clientCon
Please write down your passphrase and store it in safe place or even two.
It is needed in order to access your FlowCrypt account.
</div>
<div class="passphrase-sticky-note">${notePp}</div>
`;
<div class="passphrase-sticky-note">${Xss.escape(notePp)}</div>
`; // xss-escaped
return await Ui.modal.confirmWithCheckbox('Yes, I wrote it down', paperPassPhraseStickyNote);
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@
],
"minimum_chrome_version": "96",
"content_security_policy": {
"extension_pages": "script-src 'self'; frame-ancestors 'self' https://mail.google.com; img-src 'self' data: blob: https:; frame-src 'self' blob:; worker-src 'self'; form-action 'none'; media-src 'none'; font-src 'none'; manifest-src 'none'; object-src 'none'; base-uri 'self';"
"extension_pages": "script-src 'self'; default-src 'self'; frame-ancestors 'self' https://mail.google.com; img-src 'self' https://* data: blob:; frame-src 'self' blob:; worker-src 'self'; form-action 'none'; media-src 'none'; font-src 'none'; manifest-src 'none'; object-src 'none'; base-uri 'self'; connect-src 'self' *; style-src 'self' 'unsafe-inline';"
}
}
Loading