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