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:
function(d,g,n){var q=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(q^=this.hashValue(d.nodeName,g,n));if(null!=d.attributes){null!=n&&(n.attrCount+=d.attributes.length);for(var t=0;t<d.attributes.length;t++){var v=d.attributes[t].name,B=null!=g?g(d,v,d.attributes[t].value,!0):d.attributes[t].value;null!=B&&(q^=this.hashValue(v,g,n)+this.hashValue(B,g,n))}}if(null!=d.childNodes)for(t=0;t<d.childNodes.length;t++)q=
(q<<5)-q+this.hashValue(d.childNodes[t],g,n)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=n&&(n.byteCount+=d.length);for(t=0;t<d.length;t++)g=(g<<5)-g+d.charCodeAt(t)<<0;q^=g}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,n,q,t,v,B){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&