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:
c+(null!=k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var k=c.length,n=Math.ceil(k/1024),p=Array(n),t=0;t<n;++t){for(var y=1024*t,A=Math.min(y+1024,k),G=Array(A-y),C=0;y<A;++C,++y)G[C]=c[y].charCodeAt(0);p[t]=new Uint8Array(G)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,k,n,p,t,y,A){t=null!=t?t:!1;y=null!=y?
y:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(t);isLocalStorage&&p++;var G=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(C,V){try{if("_blank"==V)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var S=new EmbedDialog(this,c);this.showDialog(S.container,450,240,!0,!0);S.init()}else{var N=window.open("about:blank");null==N?mxUtils.popup(c,!0):(N.document.write("<pre>"+mxUtils.htmlEntities(c,
!1)+"</pre>"),N.document.close())}else V==App.MODE_DEVICE||"download"==V?this.doSaveLocalFile(c,C,k,n,null,A):null!=C&&0<C.length&&this.pickFolder(V,mxUtils.bind(this,function(O){try{this.exportFile(c,C,k,n,V,O)}catch(Q){this.handleError(Q)}}))}catch(O){this.handleError(O)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,y,null,1<p,G,c,k,n);t=this.isServices(p)?p>G?390:280:160;this.showDialog(e.container,420,t,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=