Language: JavaScript
Label: vulnerable
CWE: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Code:
StorageFile.prototype.saveFile=function(b,f,m,d){if(this.isEditable()){var u=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var v=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=m&&m()});this.setShadowModified(!1);var E=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:E.length,lastModified:Date.now(),type:this.type},{title:this.title,data:E}],v,mxUtils.bind(this,function(){if(null==this.ui.database)try{this.ui.setLocalData(this.title,
E,v)}catch(F){null!=d&&d(F)}else null!=d&&d()}),["filesInfo","files"])}catch(F){null!=d&&d(F)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(v){this.isRenamable()&&this.getTitle()!=b&&null!=v?this.ui.confirm(mxResources.get("replaceIt",[b]),u,d):u()}),d)}else null!=m&&m()};