Fix content script injection in thunderbird#6032
Fix content script injection in thunderbird#6032ioanatflowcrypt wants to merge 1 commit intoFlowCrypt:masterfrom ioanatflowcrypt:fix/thunderbird-content-script
Conversation
| // 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); |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
Okay, got it
There was a problem hiding this comment.
@ioanatflowcrypt I also noticed such bug in iOS app - FlowCrypt/flowcrypt-ios#2672
This PR fixed content script injection in thunderbird
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):