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:
var CommentsWindow=function(b,e,g,p,y,q){function E(){for(var ca=C.getElementsByTagName("div"),ja=0,ma=0;ma<ca.length;ma++)"none"!=ca[ma].style.display&&ca[ma].parentNode==C&&ja++;F.style.display=0==ja?"block":"none"}function L(ca,ja,ma,aa){function S(){ja.removeChild(V);ja.removeChild(l);P.style.display="block";da.style.display="block"}k={div:ja,comment:ca,saveCallback:ma,deleteOnCancel:aa};var da=ja.querySelector(".geCommentTxt"),P=ja.querySelector(".geCommentActionsList"),V=document.createElement("textarea");
V.className="geCommentEditTxtArea";V.style.minHeight=da.offsetHeight+"px";V.value=ca.content;ja.insertBefore(V,da);var l=document.createElement("div");l.className="geCommentEditBtns";var A=mxUtils.button(mxResources.get("cancel"),function(){aa?(ja.parentNode.removeChild(ja),E()):S();k=null});A.className="geCommentEditBtn";l.appendChild(A);var N=mxUtils.button(mxResources.get("save"),function(){da.innerText="";ca.content=V.value;mxUtils.write(da,ca.content);S();ma(ca);k=null});mxEvent.addListener(V,
"keydown",mxUtils.bind(this,function(X){mxEvent.isConsumed(X)||((mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X))&&13==X.keyCode?(N.click(),mxEvent.consume(X)):27==X.keyCode&&(A.click(),mxEvent.consume(X)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";l.appendChild(N);ja.insertBefore(l,da);P.style.display="none";da.style.display="none";V.focus()}function T(ca,ja){ja.innerText="";ca=new Date(ca.modifiedDate);var ma=b.timeSince(ca);null==ma&&(ma=mxResources.get("lessThanAMinute"));