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:
function(d,g,n){var q=new XMLHttpRequest;q.open("POST",OPEN_URL);q.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q.onreadystatechange=function(){g(q)};q.send("format=xml&filename="+encodeURIComponent(n)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,n,q,t,x,
B){t=null!=t?t:this.maxImageSize;var G=Math.max(1,d.width),I=Math.max(1,d.height);if(q&&this.isResampleImageSize(null!=B?B:g.length,x))try{var F=Math.max(G/t,I/t);if(1<F){var U=Math.round(G/F),R=Math.round(I/F),N=document.createElement("canvas");N.width=U;N.height=R;N.getContext("2d").drawImage(d,0,0,U,R);var Q=N.toDataURL();if(Q.length<g.length){var P=document.createElement("canvas");P.width=U;P.height=R;var M=P.toDataURL();Q!==M&&(g=Q,G=U,I=R)}}}catch(p){}n(g,G,I)};EditorUi.prototype.extractGraphModelFromPng=