Fixed OpenURL feature to only allow https:// or http://

This commit is contained in:
Ylian Saint-Hilaire
2020-10-05 11:40:29 -07:00
parent adc513f08a
commit 7e58ebf54a
3 changed files with 1381 additions and 1372 deletions

View File

@@ -2486,7 +2486,7 @@ function createMeshCore(agent) {
// Open a web browser to a specified URL on current user's desktop
function openUserDesktopUrl(url) {
if ((url.toLowerCase().startsWith('http://') == false) || (url.toLowerCase().startsWith('https://') == false)) { return null; }
if ((url.toLowerCase().startsWith('http://') == false) && (url.toLowerCase().startsWith('https://') == false)) { return null; }
var child = null;
try {
switch (process.platform) {