1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

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) {