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 R(aa,S,da){aa=f.getOutgoingTreeEdges(aa);da=f.view.getState(da);var P=[];if(null!=da&&null!=aa){for(var V=0;V<aa.length;V++){var l=f.view.getState(f.model.getTerminal(aa[V],!1));null!=l&&(!S&&Math.min(l.x+l.width,da.x+da.width)>=Math.max(l.x,da.x)||S&&Math.min(l.y+l.height,da.y+da.height)>=Math.max(l.y,da.y))&&P.push(l)}P.sort(function(A,N){return S?A.x+A.width-N.x-N.width:A.y+A.height-N.y-N.height})}return P}function W(aa,S){var da=L(aa),P=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;
(da==mxConstants.DIRECTION_EAST||da==mxConstants.DIRECTION_WEST)==P&&da!=S?d.actions.get("selectParent").funct():da==S?(S=f.getOutgoingTreeEdges(aa),null!=S&&0<S.length&&f.setSelectionCell(f.model.getTerminal(S[0],!1))):(da=f.getIncomingTreeEdges(aa),null!=da&&0<da.length&&(P=R(f.model.getTerminal(da[0],!0),P,aa),aa=f.view.getState(aa),null!=aa&&(aa=mxUtils.indexOf(P,aa),0<=aa&&(aa+=S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_WEST?-1:1,0<=aa&&aa<=P.length-1&&f.setSelectionCell(P[aa].cell)))))}