[SecurityUtils] Remove as unneeded
This commit is contained in:
parent
5a3cf6d81f
commit
0abad98295
|
@ -65,9 +65,6 @@ const startCore = () => {
|
||||||
GPUSettings,
|
GPUSettings,
|
||||||
updater,
|
updater,
|
||||||
crashReporterSetup,
|
crashReporterSetup,
|
||||||
|
|
||||||
// OpenCore additionals (non-standard)
|
|
||||||
securityUtils: require('./utils/securityUtils.js')
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const i = setImmediate(() => {
|
const i = setImmediate(() => {
|
||||||
|
|
|
@ -24,8 +24,6 @@ var moduleUpdater = _interopRequireWildcard(require("../updater/moduleUpdater"))
|
||||||
|
|
||||||
var paths = _interopRequireWildcard(require("../paths"));
|
var paths = _interopRequireWildcard(require("../paths"));
|
||||||
|
|
||||||
var _securityUtils = require("../utils/securityUtils");
|
|
||||||
|
|
||||||
var _updater = require("../updater/updater");
|
var _updater = require("../updater/updater");
|
||||||
|
|
||||||
const ipcMain = _electron.ipcMain;
|
const ipcMain = _electron.ipcMain;
|
||||||
|
@ -389,15 +387,6 @@ function launchSplashWindow(startMinimized) {
|
||||||
splashWindow = new _electron.BrowserWindow(windowConfig); // prevent users from dropping links to navigate in splash window
|
splashWindow = new _electron.BrowserWindow(windowConfig); // prevent users from dropping links to navigate in splash window
|
||||||
log('Splash', 'Created BrowserWindow');
|
log('Splash', 'Created BrowserWindow');
|
||||||
|
|
||||||
splashWindow.webContents.on('will-navigate', e => e.preventDefault());
|
|
||||||
splashWindow.webContents.on('new-window', (e, windowURL) => {
|
|
||||||
e.preventDefault();
|
|
||||||
(0, _securityUtils.saferShellOpenExternal)(windowURL); // exit, but delay half a second because openExternal is about to fire
|
|
||||||
// some events to things that are freed by app.quit.
|
|
||||||
|
|
||||||
setTimeout(_electron.app.quit, 500);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
// citron note: this causes a crash on quit while the window is open on osx
|
// citron note: this causes a crash on quit while the window is open on osx
|
||||||
splashWindow.on('closed', () => {
|
splashWindow.on('closed', () => {
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
const { shell } = require('electron');
|
|
||||||
|
|
||||||
const allowedProtocols = [ 'https', 'http' ]; // Only allow some protocols
|
|
||||||
exports.saferShellOpenExternal = (url) => allowedProtocols.includes(url.split(':')[0].toLowerCase()) ? shell.openExternal(url) : Promise.reject();
|
|
||||||
|
|
||||||
const oParse = (u) => u.split('/').slice(0, 3).join('/');
|
|
||||||
exports.checkUrlOriginMatches = (a, b) => oParse(a) === oParse(b);
|
|
Loading…
Reference in New Issue