Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

MarshallOfSound
Copy link
Member

This is more secure than using file:// and aligns us with Electron on the intention to stop making the file:// protocol special and powerful.

Fixes #3508

Testing this is kinda a nightmare but I think it works, leaving as draft till I'm 100% sure tho

This is more secure than using file:// and aligns us with Electron
on the intention to stop making the file:// protocol special and powerful.

Fixes #3508
const STATUS_CODE_FORBIDDEN = 403;
const STATUS_CODE_INTERNAL_SERVER_ERROR = 500;

protocol.registerFileProtocol(config.protocolName, (request, cb) => {

Choose a reason for hiding this comment

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

Isn't this call deprecated in the recent Electron versions and instead one should use "handle"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, but it's not gonna be removed any time soon and we can migrate at some point in the future. This at the moment is more performant that handle for complicated reasons so to avoid issues around that we'll use the deprecated API for a bit

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 this pull request may close these issues.

New Electron Fuse GrantFileProtocolExtraPrivileges breaks forge/plugin-webpack's (and potentially other plugins') entry points in production builds

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.