Language: JavaScript
Label: safe
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 m=mxUtils.bind(this,function(){var u=b.split(this.SEPARATOR),v=!0,E=window.setTimeout(mxUtils.bind(this,function(){v=!1;f({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);Trello.cards.get(u[0]+"/attachments/"+u[1],mxUtils.bind(this,function(D){window.clearTimeout(E);if(v){var A=/\.png$/i.test(D.name),L={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,L):(v=!0,E=window.setTimeout(mxUtils.bind(this,function(){v=!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(v){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);v&&(401==d.status?this.authenticate(m,f,!0):f())}),A||null!=D.mimeType&&"image/"==D.mimeType.substring(0,6),null,null,null,L))}}),mxUtils.bind(this,function(D){window.clearTimeout(E);v&&(null!=D&&401==D.status?this.authenticate(m,f,!0):f())}))});this.authenticate(m,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,k){this.insertFile(b,e,f,c,!0,k)};