Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion extension/js/service_worker/bg-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ export class BgHandlers {
public static thunderbirdContentScriptRegistration = async () => {
const contentScriptGroups = chrome.runtime.getManifest().content_scripts ?? []; // we know it's in the manifest
// sweetalert2.js throws error in Thunderbird environment
const files = contentScriptGroups[0].js?.filter(url => !url.includes('sweetalert2')).map(url => url.replace(/moz-extension:\/\/[^/]+\//, './')) ?? [];
let files = contentScriptGroups[0].js?.filter(url => !url.includes('sweetalert2')).map(url => url.replace(/moz-extension:\/\/[^/]+\//, './')) ?? [];
files = ['./lib/asmcrypto.all.es5.min.js', './lib/elliptic.min.js', './lib/webcrypto-liner.shim.js'].concat(files);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sosnovsky, I’m currently stuck on polyfilling the Web Crypto API. I tried using the webcrypto-linear library, but I still get the error:

FYI you need to manually add try-catch in lib/openpgp.js to see below error message.

Web Crypto API is not supported

I suspect it’s because I’m not very experienced with polyfills. Could you lend me a hand?

Note: I’ve manually copied the library files into lib/ for faster testing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sosnovsky I’m currently working on this task, However I’m stuck on an issue and looking for a solution.
Please let me know if you have any other urgent tasks I should prioritize.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently there are no urgent tasks, but if you're stuck with this one, feel free to work on some other issues from current milestone, like #5477 or #5945

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, got it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ioanatflowcrypt I also noticed such bug in iOS app - FlowCrypt/flowcrypt-ios#2672

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it

await messenger.messageDisplayScripts.register({
js: files.map(file => ({ file })),
css: [{ file: './css/cryptup.css' }],
Expand Down
1 change: 1 addition & 0 deletions extension/lib/asmcrypto.all.es5.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions extension/lib/elliptic.min.js

Large diffs are not rendered by default.

Loading