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:
(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresponse:",V,"\nresult:",S),this.spinner.stop(),e(S,N,O,Q))}),A)}),A,mxUtils.bind(this,function(N){3>n++?t.clear()&&(this.spinner.stop(),p()):A(N)}))}),A);else{var C={message:mxResources.get("error")+" "+G.getStatus()};try{C=JSON.parse(G.getText()),C=C.error}catch(V){}A(C)}}),A)}),k)});p()};EditorUi.prototype.extractMermaidMindmap=function(c){for(0<c[1].indexOf("orientation")&&c.splice(1,1);1<c.length&&""==c[1];)c.splice(1,1);