Language: JavaScript
Label: vulnerable
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:
y.push(function(A){k(null,A||"Unkown Error")}),this[l].apply(this,y);else{var z=this[l].apply(this,y);k([z])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(A){k(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
2>p.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=g&&g(x)}};l.onsuccess=mxUtils.bind(this,function(p){var q=l.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(x){if(!x||