Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better domain handling of extensions (for VM and development) #1342

Closed
gsteinLTU opened this issue Nov 28, 2022 · 0 comments · Fixed by #1345
Closed

Better domain handling of extensions (for VM and development) #1342

gsteinLTU opened this issue Nov 28, 2022 · 0 comments · Fixed by #1345

Comments

@gsteinLTU
Copy link
Member

const trustedSources = [ '/', window.location.origin, 'https://extensions.netsblox.org'];

The current check works for extensions hosted on the official repository or window.location.origin, but that doesn't allow e.g. a user on localhost to have the extension hosted on a different port than their NetsBlox server. The VM extension @dragazo is working on currently has to host its own extension file and presents a warning. This occurs when running on localhost as well, as window.location.origin will be something like http://localhost:8080/ and the VM server hosting the extension file will have a different port.

It seems like dropping the port (and protocol?) for the check when on localhost should solve this.
@brollb, do you think this should apply to all domains? Localhost seems pretty safe (you're already running a server on your computer, browsing to it is unlikely to be any more risky), and I'm not sure if it would ever come up for anything else.

@gsteinLTU gsteinLTU linked a pull request Dec 20, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant