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:
function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,k,v,z,A,H){z=null!=z?z:this.maxImageSize;var J=Math.max(1,d.width),O=Math.max(1,d.height);if(v&&this.isResampleImageSize(null!=H?H:f.length,A))try{var G=Math.max(J/z,O/z);if(1<G){var ja=Math.round(J/G),fa=Math.round(O/G),ca=document.createElement("canvas");ca.width=ja;ca.height=fa;ca.getContext("2d").drawImage(d,0,0,ja,fa);var ia=ca.toDataURL();if(ia.length<f.length){var ma=document.createElement("canvas");
ma.width=ja;ma.height=fa;var da=ma.toDataURL();ia!==da&&(f=ia,J=ja,O=fa)}}}catch(S){}k(f,J,O)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,k){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;f(v)};null!=k&&(v.onerror=k);v.src=d}catch(z){if(null!=k)k(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=