Skip to content
This repository was archived by the owner on Feb 26, 2020. It is now read-only.

Commit d199ccf

Browse files
authored
[stable] Remove preload.js path verification (#140)
* Remove preload.js path verification * Bump v0.1.4
1 parent b002de1 commit d199ccf

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parity-ui",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "The Electron app for Parity UI",
55
"main": ".build/electron.js",
66
"jsnext:main": ".build/electron.js",

src/index.electron.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,9 @@ function createWindow () {
112112
mainWindow.webContents.on('will-attach-webview', (event, webPreferences, params) => {
113113
// Strip away inline preload scripts, ours is at preloadURL
114114
delete webPreferences.preload;
115-
// Verify the location of our prelaod script is legitimate (unless uiDev has been passed)
116-
if (webPreferences.preloadURL !== encodeURI(url.format({
117-
pathname: path.join(__dirname, 'preload.js'),
118-
protocol: 'file:',
119-
slashes: true
120-
}))) {
121-
throw new Error(`Unknown preload.js is being injected, quitting for security reasons. ${webPreferences.preloadURL}`);
122-
}
115+
116+
// TODO Verify that the location of webPreferences.preloadURL is:
117+
// `file://path/to/app.asar/.build/preload.js`
123118

124119
// Disable Node.js integration
125120
webPreferences.nodeIntegration = false;

0 commit comments

Comments
 (0)