-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
BugSomething isn't workingSomething isn't working
Description
I'm working on a firefox extension meant to integrate with polycentric and I've run into a few issues preventing it from working. Loading with a <script> tag works fine, but there are a couple issues specific to extensions.
- A usage of
evalin protobufjs violates csp: Use of eval is strongly discouraged protobufjs/protobuf.js#1754. It seems the codepath that hits this eval is entirely unnecessary. This code is extremely suspicious in the first place - cross-fetch doesn't work. I forgot the exact error message, but I believe it had something to do with assigning to
fetch(or some other variable), which is treated as readonly in extension scripts. - The function
getKeyFromHashfrom@noble/ed25519throws an error when callinghashed.slice. Due to globalThis != window in the content script sandbox, calling slice attempts to create an object with incorrect permissions. I haven't checked newer versions of this library, but the issue might be fixed in those.
These are all easily fixed using sed in the generated JS, but firefox extensions require dependencies to not be modified as a submission criterion.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working