mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-965: revert the changes (#562)
This commit is contained in:
committed by
GitHub
parent
335f89fa26
commit
608e293a98
@@ -70,7 +70,6 @@ const DEFAULT_HEIGHT = 600;
|
||||
|
||||
// Certificate transparency whitelist
|
||||
let ctWhitelist = [];
|
||||
let ignoreAllCertErrors = false;
|
||||
|
||||
/**
|
||||
* Adds a window key
|
||||
@@ -343,7 +342,6 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) {
|
||||
const dialogContent = { type: 'error', title: i18n.getMessageFor('Permission Denied') + '!', message: fullMessage };
|
||||
mainWindow.webContents.send('is-screen-share-enabled', config.permissions.media, dialogContent);
|
||||
}
|
||||
ignoreAllCertErrors = false;
|
||||
});
|
||||
|
||||
mainWindow.webContents.on('did-fail-load', function (event, errorCode,
|
||||
@@ -793,28 +791,7 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) {
|
||||
return callback(0);
|
||||
}
|
||||
|
||||
if (!ignoreAllCertErrors) {
|
||||
const browserWin = electron.BrowserWindow.getFocusedWindow();
|
||||
if (browserWin && !browserWin.isDestroyed()) {
|
||||
const buttonId = electron.dialog.showMessageBox(browserWin, {
|
||||
type: 'warning',
|
||||
buttons: [ 'Allow', 'Deny', 'Ignore All' ],
|
||||
defaultId: 1,
|
||||
cancelId: 1,
|
||||
noLink: true,
|
||||
title: i18n.getMessageFor('Certificate Error'),
|
||||
message: `${i18n.getMessageFor('Certificate Error')}: ${i18n.getMessageFor('Cannot verify Root CA for the hostname')}: ${hostUrl}`,
|
||||
});
|
||||
|
||||
if (buttonId === 2) {
|
||||
ignoreAllCertErrors = true;
|
||||
}
|
||||
|
||||
return callback(buttonId === 1 ? -2 : 0);
|
||||
}
|
||||
return callback(-2);
|
||||
}
|
||||
return callback(0);
|
||||
return callback(-2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user