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:
(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){k(!1)}))}),function(x){k(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,f,c,k){try{var l=e.getData(),x=mxUtils.bind(this,function(E){var D=mxUtils.bind(this,function(M){f(M,l)}),z=this.getItemURL(e.getId());4E6<=E.length?this.writeLargeFile(z,E,D,c,k):this.writeFile(z+"/content/",E,"PUT",null,D,c,k)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var y=
this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(E){x(this.ui.base64ToBlob(E,"image/png"))}),c,this.ui.getCurrentFile()!=e?l:null,y.scale,y.border)}else x(l)}catch(E){c(E)}};OneDriveClient.prototype.writeLargeFile=function(e,f,c,k,l){try{if(null!=f){var x=(new TextEncoder).encode(f).length,y=mxUtils.bind(this,function(D,z,M,I){try{I=I||0;var d=!0,g=null;g=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT})}),this.ui.timeout);