Language: JavaScript
Label: safe
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,C=Math.min(y+1024,k),G=Array(C-y),B=0;y<C;++B,++y)G[B]=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,C){t=null!=t?t:!1;y=null!=y?
y:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);var G=mxUtils.bind(this,function(V,R,O,P){try{if("_blank"==R)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var H=window.open("about:blank");null==H?mxUtils.popup(c,!0):(H.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),H.document.close())}else if(R==App.MODE_DEVICE||"download"==
R)this.doSaveLocalFile(c,V,k,n,null,C);else if(null!=V&&0<V.length){var m=mxUtils.bind(this,function(v){try{this.exportFile(c,V,k,n,R,v)}catch(A){this.handleError(A)}});null!=P?m(P):this.pickFolder(R,m)}}catch(v){this.handleError(v)}});if("1"==urlParams["save-dialog"])p=[],t||p.push(App.MODE_BROWSER),y||p.push("_blank"),e=new SaveDialog(this,e,mxUtils.bind(this,function(V,R,O){G(V.value,R,V,O);this.hideDialog()}),p,c,k,n),this.showDialog(e.container,420,100,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));
else{p=this.getServiceCount(t);isLocalStorage&&p++;var B=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,G,mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,y,null,1<p,B,c,k,n);t=this.isServices(p)?p>B?390:280:160;this.showDialog(e.container,420,t,!0,!0)}e.init()};EditorUi.prototype.openInNewWindow=function(c,e,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||