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:
TrelloClient.prototype.getFile=function(b,e,f,c,k){k=null!=k?k:!1;var l=mxUtils.bind(this,function(){var u=b.split(this.SEPARATOR),x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);Trello.cards.get(u[0]+"/attachments/"+u[1],mxUtils.bind(this,function(D){window.clearTimeout(E);if(x){var A=/\.png$/i.test(D.name),K={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(D.name)||
/\.gliffy$/i.test(D.name)||!this.ui.useCanvasForExport&&A?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(D.url),D.name,D.mimeType,this.extension,e,f,null,K):(x=!0,E=window.setTimeout(mxUtils.bind(this,function(){x=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(D.url),mxUtils.bind(this,function(H){window.clearTimeout(E);if(x){D.compoundId=b;if(0<(A?H.lastIndexOf(","):-1)){var d=this.ui.extractGraphModelFromPng(H);null!=d&&0<d.length&&
(H=d)}k?e(new TrelloLibrary(this.ui,H,D)):e(new TrelloFile(this.ui,H,D))}}),mxUtils.bind(this,function(H,d){window.clearTimeout(E);x&&(401==d.status?this.authenticate(l,f,!0):f())}),A||null!=D.mimeType&&"image/"==D.mimeType.substring(0,6),null,null,null,K))}}),mxUtils.bind(this,function(D){window.clearTimeout(E);x&&(null!=D&&401==D.status?this.authenticate(l,f,!0):f())}))});this.authenticate(l,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,k){this.insertFile(b,e,f,c,!0,k)};