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;