Language: JavaScript
Label: safe
CWE: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.

Code:
error:z});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,L){var N={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=L?N.error={errResp:L}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var k=c.funtionName,m=this.remoteInvokableFns[k];if(null!=m&&"function"===
typeof this[k]){if(m.allowedDomains){for(var p=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){p=!0;break}if(!p){g(null,"Invalid Call: "+k+" is not allowed.");return}}var x=c.functionArgs;Array.isArray(x)||(x=[]);if(m.isAsync)x.push(function(){g(Array.prototype.slice.apply(arguments))}),x.push(function(y){g(null,y||"Unkown Error")}),this[k].apply(this,x);else{var z=this[k].apply(this,x);g([z])}}else g(null,"Invalid Call: "+k+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+
y.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var k=g.open("database",2);k.onupgradeneeded=function(m){try{var p=k.result;1>m.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>m.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(v){null!=e&&e(v)}};k.onsuccess=