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:
"?inline=false",last_commit_id:k.last_commit_id,refPos:x};k=this.getFileContent(k);return l?new GitLabLibrary(this.ui,k,e):new GitLabFile(this.ui,k,e)};GitLabClient.prototype.insertFile=function(e,f,c,k,l,x,y){l=null!=l?l:!1;x=x.split("/");this.getRefIndex(x,!0,mxUtils.bind(this,function(E,D){var z=Math.max(D-1,0),M=E.slice(0,z).join("/"),I=E[z],d=E[D];path=E.slice(D+1,E.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(M+"/"+I+"/"+d+"/"+path,!0,mxUtils.bind(this,function(g,n){g?
l?(y||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(t){this.writeFile(M,I,d,path,t,f,n,mxUtils.bind(this,function(u){try{var v=JSON.parse(u.getText());c(this.createGitLabFile(M,I,d,null!=v.content?v.content:v,l,D))}catch(A){k(A)}}),k)}),k)):(g=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:M,repo:I,ref:d,name:e,path:path,html_url:g+M+"/"+I+"/blob/"+d+"/"+path,download_url:g+M+"/"+I+"/raw/"+d+"/"+path+"?inline=false",refPos:D,last_commit_id:n,isNew:!0}))):k()}))}),
k,null,4>=x.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(k){if(f){var l=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){l();c(!0,k.getCurrentEtag())},function(){l();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(k){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,