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:
App.prototype.save=function(b,f){var l=this.getCurrentFile();if(null!=l&&this.spinner.spin(document.body,mxResources.get("saving"))){var d=mxUtils.bind(this,function(q){this.handleError(q)});this.createTimeout(3*this.timeout,mxUtils.bind(this,function(q){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var u=mxUtils.bind(this,function(){q.clear()&&(l.handleFileSuccess(!0),null!=f&&f())}),z=mxUtils.bind(this,function(D){q.clear()&&(l.isModified()&&Editor.addRetryToError(D,
mxUtils.bind(this,function(){this.save(b,f)})),l.handleFileError(D,null==D||"AbortError"!=D.name))});try{b==l.getTitle()?l.save(!0,u,z):l.saveAs(b,u,z)}catch(D){z(D)}}),d)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};