Language: JavaScript
Label: vulnerable
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:
StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(k){var l=[];if(null!=k)for(var u=0;u<k.length;u++)"."==k[u].title.charAt(0)||null!=e&&k[u].type!=e||l.push(k[u]);f(l)},function(){null==b.database?f(StorageFile.listLocalStorageFiles(e)):null!=c&&c()},"filesInfo")};StorageFile.deleteFile=function(b,e,f,c){b.removeDatabaseItem([e,e],f,function(){null==b.database?(localStorage.removeItem(e),f()):null!=c&&c()},["files","filesInfo"])};StorageLibrary=function(b,e,f){StorageFile.call(this,b,e,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};