Language: JavaScript
Label: safe
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
x&&t.apply(this,arguments)});n=n||{};n.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:G,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:n});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var n=mxUtils.bind(this,function(F,U){var R={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=U?R.error={errResp:U}:null!=F&&(R.resp=
F);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var q=d.funtionName,t=this.remoteInvokableFns[q];if(null!=t&&"function"===typeof this[q]){if(t.allowedDomains){for(var x=!1,B=0;B<t.allowedDomains.length;B++)if(g=="https://"+t.allowedDomains[B]){x=!0;break}if(!x){n(null,"Invalid Call: "+q+" is not allowed.");return}}var G=d.functionArgs;Array.isArray(G)||(G=[]);if(t.isAsync)G.push(function(){n(Array.prototype.slice.apply(arguments))}),G.push(function(F){n(null,F||"Unkown Error")}),this[q].apply(this,
G);else{var I=this[q].apply(this,G);n([I])}}else n(null,"Invalid Call: "+q+" is not found.")}catch(F){n(null,"Invalid Call: An error occurred, "+F.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var n=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=n)try{var q=n.open("database",2);q.onupgradeneeded=function(t){try{var x=q.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),