code
stringlengths
14
2.05k
label
int64
0
1
programming_language
stringclasses
7 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
98
description
stringlengths
36
379
url
stringlengths
36
48
label_name
stringclasses
2 values
this.updateDocumentTitle();this.refresh()}));e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var B=parseInt(this.div.offsetLeft),H=parseInt(this.div.offsetWidth),g=c.embedViewport.x+c.embedViewport.width,x=parseInt(this.div.offsetTop),F=parseInt(this.div.offsetHeight),M=c.embedViewport.y+c.embedViewport.height;this.div.style.left= Math.max(c.embedViewport.x,Math.min(B,g-H))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(x,M-F))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if("simple"==Editor.currentTheme||"sketch"==Editor.currentTheme)J=Editor.currentTheme,Editor.currentTheme="",this.doSetCurrentTheme(J,0,mxUtils.bind(this,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
(A=new mxCodec(mxUtils.createXmlDocument()),A=A.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,A,null,n),y=y.cloneNode(!1),mxUtils.setTextContent(y,Graph.compressNode(A))));c(y)}return p};EditorUi.prototype.anonymizeString=function(c,e){for(var k=[],n=0;n<c.length;n++){var p=c.charAt(n);0<=EditorUi.ignoredAnonymizedChars.indexOf(p)?k.push(p):isNaN(parseInt(p))?p.toLowerCase()!=p?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):p.toUpperCase()!=p?k.push(String.fromCharCode(97+ Math.round(25*Math.random()))):/\s/.test(p)?k.push(" "):k.push("?"):k.push(e?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var k=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);null!=k.getAttribute("name")&&k.setAttribute("name",this.anonymizeString(k.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(k)}catch(t){c[EditorUi.DIFF_INSERT][e].data=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,k){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(n,p){try{this.spinner.stop();var t=this.createImageDataUri(n,e,"png"),y=parseInt(p.getAttribute("width")),A=parseInt(p.getAttribute("height")); this.writeImageToClipboard(t,y,A,mxUtils.bind(this,function(G){this.handleError(G)}))}catch(G){this.handleError(G)}}),null,null,null,mxUtils.bind(this,function(n){this.spinner.stop();this.handleError(n)}),null,null,null!=k?k:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(n){this.handleError(n)}};EditorUi.prototype.writeImageToClipboard=function(c,e,k,n){var p=this.base64ToBlob(c.substring(c.indexOf(",")+
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(p?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),N+="cursor:pointer;"),c&&(c=parseInt(A.getAttribute("width")),p=parseInt(A.getAttribute("height")),A.setAttribute("viewBox","-0.5 -0.5 "+c+" "+p),N+="max-width:100%;max-height:"+p+"px;",A.removeAttribute("height")),""!=N&&A.setAttribute("style",N),this.editor.addFontCss(A),this.editor.graph.mathEnabled&&this.editor.addMathCss(A),y(mxUtils.getXml(A))};EditorUi.prototype.timeSince=function(c){c= Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var k=null;if("diagram"==c.nodeName)k=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
Editor.extractGraphModelFromXref(T));null!=F&&(F=decodeURIComponent(F.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return F};Editor.extractGraphModelFromXref=function(g){var x=g.trailer,F=null;null!=x&&(x=/.* \/Info (\d+) (\d+) R/g.exec(x.join("\n")),null!=x&&0<x.length&&(x=g[x[1]],null!=x&&(x=/.* \/Subject (\d+) (\d+) R/g.exec(x.join("\n")),null!=x&&0<x.length&&(g=g[x[1]],null!=g&&(g=g.join("\n"),F=g.substring(1,g.length-1))))));return F};Editor.extractParserError=function(g,x){var F=null;g=null!= g?g.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(F=x||mxResources.get("invalidChars"),x=g[0].getElementsByTagName("div"),0<x.length&&(F=mxUtils.getTextContent(x[0])));return null!=F?mxUtils.trim(F):F};Editor.addRetryToError=function(g,x){null!=g&&(g=null!=g.error?g.error:g,null==g.retry&&(g.retry=x))};Editor.mermaidToDrawio=function(g,x,F){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(g,x,F)};Editor.configure=function(g){if(null!=g){Editor.config=g;Editor.configVersion=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
null,"Templates"),function(){xa.style.display="";pa.style.display="";ha.style.left="160px";X(0);ha.scrollTop=0;ha.innerText="";v=0;T!=Ia&&(Ia=T,sa=W,Ea=U,xa.innerText="",S(),T=null)});P.push(N);k.appendChild(N);var Z=function(da){xa.style.display="none";pa.style.display="none";ha.style.left="30px";X(da?-1:1);null==T&&(T=Ia);ha.scrollTop=0;ha.innerText="";B.spin(ha);var la=function(ma,oa,ia){v=0;B.stop();Ia=ma;ia=ia||{};var ja=0,va;for(va in ia)ja+=ia[va].length;if(oa)ha.innerText=oa;else if(0==ma.length&& 0==ja)ha.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ha.innerText="",0<ja){xa.style.display="";ha.style.left="160px";xa.innerText="";Ea=0;sa={"draw.io":ma};for(va in ia)sa[va]=ia[va];S()}else t(!0)};da?I(Y.value,la):R(la)};R&&(N=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Z()}),k.appendChild(N),P.push(N));if(I){N=document.createElement("span");N.style.marginLeft="10px";N.innerText=mxResources.get("search")+":";k.appendChild(N);var Y=document.createElement("input");
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(S){return"page"==S&&null!=G&&null!=G[A]?G[A].getAttribute("name"):"pagenumber"==S?A+1:"pagecount"==S?null!=G?G.length:1:C.apply(this,arguments)};p.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){p.zoomIn()},20);E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){p.zoomOut()},20);f=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==p.view.scale?(p.maxFitScale=8,p.fit(8)):
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"22px";y.style.width="22px";y.style.position="relative";y.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";y.className="geColorBtn";c.appendChild(y);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return n.value},focus:function(){n.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,k,n,p,t,y){y=null!=y?y:[];n&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||y.push("lightbox=1"),"auto"!=c&&y.push("target="+c),null!= e&&e!=mxConstants.NONE&&y.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&y.push("edit="+encodeURIComponent(p)),t&&y.push("layers=1"),this.editor.graph.foldingEnabled&&y.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&y.push("page-id="+this.currentPage.getId());return y};EditorUi.prototype.createLink=function(c,e,k,n,p,t,y,A,G,C){G=this.createUrlParameters(c,e,k,n,p,t,G);c=this.getCurrentFile();e=!0;null!=y?k="#U"+encodeURIComponent(y):
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(K){return this.isTreeEdge(K)}))};Graph.prototype.getIncomingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(J){return k.isVertex(J)&&u(J)}function q(J){var m=!1;null!=J&&(m="1"==
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
this.model.root||this.model.isVertex(x[U])||this.model.isEdge(x[U])){var X=this.getTagsForCell(x[U]),Z=!1;if(0<X.length&&(X=X.split(" "),X.length>=g.length)){for(var Y=Z=0;Y<X.length&&Z<T;Y++)null!=W[X[Y]]&&Z++;Z=Z==T}Z&&(1!=M||this.isCellVisible(x[U]))&&P.push(x[U])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(g){for(var x=null,F=[],M=0;M<g.length;M++){var P=this.getTagsForCell(g[M]); F=[];if(0<P.length){P=P.split(" ");for(var T={},W=0;W<P.length;W++)if(null==x||null!=x[P[W]])T[P[W]]=!0,F.push(P[W]);x=T}else return[]}return F};Graph.prototype.getTagsForCells=function(g){for(var x=[],F={},M=0;M<g.length;M++){var P=this.getTagsForCell(g[M]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==F[P[T]]&&(F[P[T]]=!0,x.push(P[T]))}}return x};Graph.prototype.getTagsForCell=function(g){return this.getAttributeForCell(g,"tags","")};Graph.prototype.addTagsForCells=function(g,x){if(0<
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
N=parseFloat(m[0].getAttribute("height")))}k(G.result,S,N)}catch(v){n(v)}};V.src=G.result};G.onerror=function(C){n(C)}}else n(A)};y.onerror=function(A){n(A)};y.send()};EditorUi.prototype.insertAsPreText=function(c,e,k){var n=this.editor.graph,p=null;n.getModel().beginUpdate();try{p=n.insertVertex(null,null,"<pre>"+c+"</pre>",e,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(p,!0)}finally{n.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,k,n,p,t,y,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
Xa?this.src=Xa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ua,mxUtils.bind(this,function(Na){C(ua,null,null,da,va,ya)}),null,null);mxEvent.addListener(ua,"dblclick",function(Na){G();mxEvent.consume(Na)})}else if(!Ha&&null!=da&&0<da.length){var Qa=function(Na){H.setAttribute("disabled","disabled");ua.style.backgroundColor="transparent";ua.style.border="1px solid transparent";B.spin(ha);La(da,function(Ya,Wa){B.stop();null!=Ya&&(C(ua,Ya,la,null,null,ya,Wa),Na&&G())})};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(x),mxUtils.setOpacity(H,100),B.style.visibility="",g.stop(),m())}))}else m();C.appendChild(v);++V==R&&(mxUtils.br(C),V=0)}function t(N){var O=A.value;if(null==N||null!=O&&0<O.length)n&&b.hideDialog(),l(O,N,A)}E="1"==urlParams.noDevice?!1:E;z=null!=z?z:!0;D=null!=D?D:!0;R=null!=R?R:4;n=null!=n?n:!0;u=document.createElement("div");u.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(u);var y=document.createElement("h2");
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
mxResources.get("mermaid")+"...","mermaid");I.showDialog(k.container,620,420,!0,!1);k.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),e=function(k,n,p,t){k.addItem(p,null,mxUtils.bind(this,function(){var y=new CreateGraphDialog(I,p,t);I.showDialog(y.container,620,420,!0,!1);y.init()}),n)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,n){for(var p=0;p<c.length;p++)"-"==c[p]?k.addSeparator(n):e(k,n,mxResources.get(c[p])+
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,k){var n=null==c||null==e;k=null!=k?k:24;var p=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=p.spin;p.spin=function(A,G){var C= !1;this.active||(t.call(this,A),this.active=!0,null!=G&&(n&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),C=document.createElement("div"),C.style.position="absolute",C.style.whiteSpace="nowrap",C.style.background="#4B4243",C.style.color="white",C.style.fontFamily=Editor.defaultHtmlFont,C.style.fontSize="9pt",C.style.padding="6px",C.style.paddingLeft="10px",C.style.paddingRight="10px",C.style.zIndex=2E9,C.style.left=Math.max(0, c)+"px",C.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(C.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(C.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=G.substring(G.length-3,G.length)&&"!"!=G.charAt(G.length-1)&&(G+="..."),C.innerHTML=G,A.appendChild(C),p.status=C),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(A,G)}));this.stop(); return V}),C=!0);return C};var y=p.stop;p.stop=function(){y.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};return p};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),k=this.editor.extractGraphModel(e.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(n){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
var Ma=null,Oa=da;null!=ma?ua.setAttribute("title",mxResources.get(ma,null,ma)):null!=oa&&0<oa.length&&ua.setAttribute("title",oa);if(null!=ja){ua.style.display="inline-flex";ua.style.justifyContent="center";ua.style.alignItems="center";ia=document.createElement("img");ia.setAttribute("src",ja);ia.setAttribute("alt",oa);ia.style.maxWidth=Ga+"px";ia.style.maxHeight=qa+"px";F=ia;var Xa=ja.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ua.appendChild(ia);ia.onerror=function(){this.src!= Xa?this.src=Xa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ua,mxUtils.bind(this,function(Na){C(ua,null,null,da,va,ya)}),null,null);mxEvent.addListener(ua,"dblclick",function(Na){G();mxEvent.consume(Na)})}else if(!Ha&&null!=da&&0<da.length){var Qa=function(Na){H.setAttribute("disabled","disabled");ua.style.backgroundColor="transparent";ua.style.border="1px solid transparent";B.spin(ha);La(da,function(Ya,Wa){B.stop();null!=Ya&&(C(ua,Ya,la,null,null,ya,Wa),Na&&G())})};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(y.responseType="blob");y.onload=function(A){if(200<=this.status&&300>this.status)if("txt"==e)k(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(C){var V=new Image;V.onload=function(){try{var S=V.width,N=V.height;if(0==S&&0==N){var O=G.result,Q=O.indexOf(","),J=decodeURIComponent(escape(atob(O.substring(Q+1)))),m=mxUtils.parseXml(J).getElementsByTagName("svg");0<m.length&&(S=parseFloat(m[0].getAttribute("width")), N=parseFloat(m[0].getAttribute("height")))}k(G.result,S,N)}catch(v){n(v)}};V.src=G.result};G.onerror=function(C){n(C)}}else n(A)};y.onerror=function(A){n(A)};y.send()};EditorUi.prototype.insertAsPreText=function(c,e,k){var n=this.editor.graph,p=null;n.getModel().beginUpdate();try{p=n.insertVertex(null,null,"<pre>"+c+"</pre>",e,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(p,!0)}finally{n.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,k,n,p,t,y,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
c.shortcut):z.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(I){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=I?I:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
ma.join(" ")}null!=ka?(M=ka,M.className+=" "+da,P=la,na.className="geTempDlgCreateBtn"):(P=M=null,na.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function A(ka,da){if(null!=P){var la=function(va){ja.isExternal?L(ja,function(wa){ma(wa,va)},oa):ja.url?mxUtils.get(TEMPLATE_PATH+"/"+ja.url,mxUtils.bind(this,function(wa){200<=wa.getStatus()&&299>=wa.getStatus()?ma(wa.getText(),va):oa()})):ma(b.emptyDiagramXml,va)},ma=function(va,wa){e||b.hideDialog(!0);f(va,wa,ja,da)},oa=function(){k(mxResources.get("cannotLoad"));
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
D.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[E]?K[E].getAttribute("name"):"pagenumber"==X?E+1:"pagecount"==X?null!=K?K.length:1:R.apply(this,arguments)};D.getLinkForCell=function(){return null};Editor.MathJaxRender&&D.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,Z){b.editor.graph.mathEnabled&&Editor.MathJaxRender(D.container)}));var I={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
""),Ea.value=sa,Ea.style.width="96px",Ea.style.borderWidth="0px",Ia.appendChild(Ea)):(Ia.innerHTML=mxUtils.htmlEntities(decodeURIComponent(sa)),mxEvent.addListener(Ia,"click",mxUtils.bind(Y,function(){function Ua(){var da=ka.value;da=0==da.length&&"string"!=Ka?0:da;ta.allowAuto&&(null!=da.trim&&"auto"==da.trim().toLowerCase()?(da="auto",Ka="string"):(da=parseFloat(da),da=isNaN(da)?0:da));null!=ta.min&&da<ta.min?da=ta.min:null!=ta.max&&da>ta.max&&(da=ta.max);da=encodeURIComponent(("int"==Ka?parseInt(da): da)+"");M(qa,da,ta)}var ka=document.createElement("input");P(Ia,ka,!0);ka.value=decodeURIComponent(sa);ka.className="gePropEditor";"int"!=Ka&&"float"!=Ka||ta.allowAuto||(ka.type="number",ka.step="int"==Ka?"1":"any",null!=ta.min&&(ka.min=parseFloat(ta.min)),null!=ta.max&&(ka.max=parseFloat(ta.max)));g.appendChild(ka);mxEvent.addListener(ka,"keypress",function(da){13==da.keyCode&&Ua()});ka.focus();mxEvent.addListener(ka,"blur",function(){Ua()})})));ta.isDeletable&&(Ea=mxUtils.button("-",mxUtils.bind(Y,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
this.diagramContainer.scrollLeft+=c.x-e.x;this.diagramContainer.scrollTop+=c.x-e.x};EditorUi.prototype.isAutoDarkModeSupported=function(){return null!=window.matchMedia};EditorUi.prototype.isAutoDarkMode=function(c){return!c&&"auto"==urlParams.dark||Editor.isSettingsEnabled()&&("auto"==mxSettings.settings.darkMode||"draw.io"==this.getServiceName()&&"1"!=urlParams.embed&&(!this.editor.chromeless||this.editor.editable)&&null==mxSettings.settings.darkMode)};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c, mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("darkModeChanged"))}),mxUtils.bind(this,function(e){null!=window.console&&console.error(e);this.editor.setStatus(e.message)}))};EditorUi.prototype.createDarkStyle=function(){var c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("href",STYLE_PATH+"/dark.css");c.setAttribute("charset","UTF-8");c.setAttribute("type","text/css");return c};EditorUi.prototype.doSetDarkMode=function(c,e,k){var n=mxUtils.bind(this,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(g,x){g=null!=g?g:!0;var F=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&F.setAttribute("style",this.graph.currentStyle);var M=this.graph.getBackgroundImageObject(this.graph.backgroundImage,x);null!=M&&F.setAttribute("backgroundImage",JSON.stringify(M));F.setAttribute("math",this.graph.mathEnabled?"1":"0");F.setAttribute("shadow", this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(M=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),F.setAttribute("extFonts",M.join("|")));return F};Editor.prototype.isDataSvg=function(g){try{var x=mxUtils.parseXml(g).documentElement.getAttribute("content");if(null!=x&&(null!=x&&"<"!=x.charAt(0)&&"%"!=x.charAt(0)&&(x=unescape(window.atob?atob(x):Base64.decode(cont,x))),null!=x&&"%"==x.charAt(0)&&(x=decodeURIComponent(x)),null!=x&&0<x.length)){var F=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
g[1].geometry.width)/2:(P.x+P.width)/W-T.x+-x.x+10,g[1].geometry.y-=g[1].geometry.height+x.y+40):(g[1].geometry.x=H==mxConstants.DIRECTION_WEST?g[1].geometry.x-(g[1].geometry.width+x.x+40):g[1].geometry.x+(g[1].geometry.width-x.x+40),g[1].geometry.y=null==P?J.geometry.y+(J.geometry.height-g[1].geometry.height)/2:(P.y+P.height)/W-T.y+-x.y+10);return e.addCells(g,v)}finally{e.model.endUpdate()}}function R(J,m,v){J=e.getOutgoingTreeEdges(J);v=e.view.getState(v);var B=[];if(null!=v&&null!=J){for(var H= 0;H<J.length;H++){var g=e.view.getState(e.model.getTerminal(J[H],!1));null!=g&&(!m&&Math.min(g.x+g.width,v.x+v.width)>=Math.max(g.x,v.x)||m&&Math.min(g.y+g.height,v.y+v.height)>=Math.max(g.y,v.y))&&B.push(g)}B.sort(function(x,F){return m?x.x+x.width-F.x-F.width:x.y+x.height-F.y-F.height})}return B}function I(J,m){var v=D(J),B=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST;(v==mxConstants.DIRECTION_EAST||v==mxConstants.DIRECTION_WEST)==B&&v!=m?c.actions.get("selectParent").funct():v==
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,k,n,p,t){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,k){e(null)};EditorUi.prototype.exportSvg=function(c,e,k,n,p,t,y,A,G,C,V,S,N,O){if(this.spinner.spin(document.body,mxResources.get("export")))try{var Q=this.editor.graph.isSelectionEmpty();
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
if(null!=t.hoverIcons){var O=t.hoverIcons.update;t.hoverIcons.update=function(){y.freehand.isDrawing()||O.apply(this,arguments)}}if(null!=y.freehand){var Q=y.freehand.createStyle;y.freehand.createStyle=function(U){return Q.apply(this,arguments)+"sketch=0;"}}t.editor.addListener("statusChanged",mxUtils.bind(this,function(){t.setStatusText(t.editor.getStatus())}));t.setStatusText(t.editor.getStatus());var J=t.menus.get("viewZoom");if(null!=J){var m=function(U){if(mxEvent.isAltDown(U))t.hideCurrentMenu(),
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
q,z=0;8>z;z++)u=1==(u&1)?3988292384^u>>>1:u>>>1,Editor.crcTable[q]=u;Editor.updateCRC=function(g,x,F,M){for(var P=0;P<M;P++)g=Editor.crcTable[(g^x.charCodeAt(F+P))&255]^g>>>8;return g};Editor.crc32=function(g){for(var x=-1,F=0;F<g.length;F++)x=x>>>8^Editor.crcTable[(x^g.charCodeAt(F))&255];return(x^-1)>>>0};Editor.writeGraphModelToPng=function(g,x,F,M,P){function T(Y,ba){var fa=X;X+=ba;return Y.substring(fa,X)}function W(Y){Y=T(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+ (Y.charCodeAt(0)<<24)}function U(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var X=0;if(T(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(g,4),"IHDR"!=T(g,4))null!=P&&P();else{T(g,17);P=g.substring(0,X);do{var Z=W(g);if("IDAT"==T(g,4)){P=g.substring(0,X-8);"pHYs"==x&&"dpi"==F?(F=Math.round(M/.0254),F=U(F)+U(F)+String.fromCharCode(1)):F=F+String.fromCharCode(0)+ ("zTXt"==x?String.fromCharCode(0):"")+M;M=4294967295;M=Editor.updateCRC(M,x,0,4);M=Editor.updateCRC(M,F,0,F.length);P+=U(F.length)+x+F+U(M^4294967295);P+=g.substring(X-8,g.length);break}P+=g.substring(X-8,X-4+Z);T(g,Z);T(g,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,x){D.apply(this,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"checked"),G.defaultChecked=!0);n&&G.setAttribute("disabled","disabled");t&&(c.appendChild(G),k=document.createElement("label"),mxUtils.write(k,e),k.setAttribute("for",y),c.appendChild(k),p||mxUtils.br(c));return G};EditorUi.prototype.addEditButton=function(c,e){var k=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var n=this.getCurrentFile(),p="";null!=n&&n.getMode()!=App.MODE_DEVICE&&n.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var t=document.createElement("select"); t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("makeCopy"));t.appendChild(n);n=document.createElement("option");n.setAttribute("value","custom");mxUtils.write(n,mxResources.get("custom")+"...");t.appendChild(n);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var y=new FilenameDialog(this, p,mxResources.get("ok"),function(A){null!=A?p=A:t.value="blank"},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(y.container,300,80,!0,!1);y.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===t.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return t}}};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
J.readAsText(Q)}else this.doImportVisio(Q,e,A,n)}catch(m){A(m)}else try{""==O.responseType||"text"==O.responseType?A({message:O.responseText}):(J=new FileReader,J.onload=function(){try{A({message:JSON.parse(J.result).Message})}catch(m){A(m)}},J.readAsText(O.response))}catch(m){A({})}});O.send(C)}else if(y.clear())try{this.doImportVisio(c,e,A,n)}catch(Q){A(Q)}}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
Graph.prototype.isAllTagsHidden=function(g){if(null==g||0==g.length||0==this.hiddenTags.length)return!1;g=g.split(" ");if(g.length>this.hiddenTags.length)return!1;for(var x=0;x<g.length;x++)if(0>mxUtils.indexOf(this.hiddenTags,g[x]))return!1;return!0};Graph.prototype.getCellsForTags=function(g,x,F,M){var P=[];if(null!=g){x=null!=x?x:this.model.getDescendants(this.model.getRoot());for(var T=0,W={},U=0;U<g.length;U++)0<g[U].length&&(W[g[U]]=!0,T++);for(U=0;U<x.length;U++)if(F&&this.model.getParent(x[U])==
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
c.nodeName&&(y=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{t.endUpdate()}null!=y&&this.chromelessResize&&this.chromelessResize(!0,y)}return k};EditorUi.prototype.getCopyFilename=function(c,e){var k=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var n=k.lastIndexOf(".");0<=n&&(c=k.substring(n),k=k.substring(0,n));if(e){e=k;var p=new Date;k=p.getFullYear();n=p.getMonth()+1;var t=p.getDate(),y=p.getHours(),A=p.getMinutes();p=p.getSeconds(); k=e+(" "+(k+"-"+n+"-"+t+"-"+y+"-"+A+"-"+p))}return k=mxResources.get("copyOf",[k])+c};EditorUi.prototype.fileLoaded=function(c,e,k){var n=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var p=!1;this.hideDialog();null!=n&&(EditorUi.debug("File.closed",[n]),n.removeListener(this.descriptorChangedListener),n.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(c,e,k){var n=new XMLHttpRequest;n.open("POST",OPEN_URL);n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");n.onreadystatechange=function(){e(n)};n.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,k,n,p,t, y){p=null!=p?p:this.maxImageSize;var A=Math.max(1,c.width),G=Math.max(1,c.height);if(n&&this.isResampleImageSize(null!=y?y:e.length,t))try{var C=Math.max(A/p,G/p);if(1<C){var V=Math.round(A/C),S=Math.round(G/C),N=document.createElement("canvas");N.width=V;N.height=S;N.getContext("2d").drawImage(c,0,0,V,S);var O=N.toDataURL();if(O.length<e.length){var Q=document.createElement("canvas");Q.width=V;Q.height=S;var J=Q.toDataURL();O!==J&&(e=O,A=V,G=S)}}}catch(m){}k(e,A,G)};EditorUi.prototype.extractGraphModelFromPng=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
[this],"time",Date.now()-m+" ms","args",arguments);return v});null!=y?(d.diffPages=y,y=null):(y=d.diffPages,d.diffPages=function(){var m=Date.now(),v=y.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-m+" ms","args",arguments);return v});null!=A?(d.patchPages=A,A=null):(A=d.patchPages,d.patchPages=function(){var m=Date.now(),v=A.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",[this],"time",Date.now()-m+" ms","args",arguments);
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),S=mxUtils.bind(this,function(){window.clearTimeout(C);C=window.setTimeout(V,G)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){S();V()}));S();V()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(y){p(y)}),mxUtils.bind(this,function(y){null!=k&&k(y)}))}else p("")};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
I.formatElt.style.width)}function f(I,c){function e(p,t){var y=I.menus.get(p);p=k.addMenu(t,mxUtils.bind(this,function(){y.funct.apply(this,arguments)}));p.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";p.className="geTitle";c.appendChild(p);return p}var k=new Menubar(I,c);if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
null!=t&&(this.diagramContainer.style.width=Math.max(20,A+mxEvent.getClientX(C)-t)+"px",V=!0);null!=y&&(this.diagramContainer.style.height=Math.max(20,G+mxEvent.getClientY(C)-y)+"px",V=!0);V&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(C){null==t&&null==y||mxEvent.consume(C);y=t=null});document.body.style.backgroundColor="transparent";
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
f.getCell(e),null!=c&&c!=I&&(I=null));null!=I&&(f.getChildAt(l,D)!=I&&f.add(l,I,D),this.patchCellRecursive(b,f,I,d,q),D++);return e});for(K=[null];0<K.length;)if(E=K.shift(),E=L(null!=E?E.child:null,null!=E?E.insert:!1),R=u[E],null!=R&&(delete u[E],K.push({child:f.getCell(R)})),R=z[E],null!=R&&(delete z[E],K.push({child:this.getCellForJson(R),insert:!0})),0==K.length){for(E in u)K.push({child:f.getCell(u[E])}),delete u[E];for(E in z)K.push({child:this.getCellForJson(z[E]),insert:!0}),delete z[E]}}};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
0;ja<wa.length;ja++)oa=wa[ja],0==ia==(null==la[oa.url])&&(Ha[oa.url]=!0,Ja.push(oa));la=Ha;ia++}0==Ja.length?ra.innerText=mxResources.get("noResultsFor",[ka]):C(Ja,!0)}}function J(ka){if(Y!=ka||W!=ba)n(),Ba.scrollTop=0,aa.innerText="",ra.innerText=mxResources.get("searchResults")+' "'+ka+'"',Ua=null,fa?Q(ka):D&&(ka?(Ga.spin(aa),g=!1,H=!0,D(ka,Va,function(){k(mxResources.get("searchFailed"));Va([])},W?null:u)):O(W)),Y=ka,ba=W}function m(ka){null!=Ua&&clearTimeout(Ua);13==ka.keyCode?J(Fa.value):Ua=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"simple"==Editor.currentTheme&&this.addMenuItems(B,["-","exitGroup","home"],null,g)};var C=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(B,H,g){if(c.editor.graph.isSelectionEmpty())C.apply(this,arguments),c.menus.addMenuItems(B,["copyAsImage"],null,g);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(B,H,g):this.addPopupMenuArrangeItems(B,H,g),this.addMenuItems(B,"- cut copy copyAsImage duplicate -".split(" "),null,g),this.isShowCellEditItems()||this.addPopupDeleteItem(B, H,g),this.addMenuItems(B,["lockUnlock","-"],null,g),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(H)&&e.isCellEditable(H)&&(this.addSubmenu("editCell",B,null,mxResources.get("edit")),B.addSeparator(),e.getModel().isEdge(H))){this.addSubmenu("line",B);var x=e.getModel().getGeometry(H);null!=x&&null!=x.points&&0<x.points.length&&this.addMenuItems(B,["clearWaypoints"],null,g)}1==e.getSelectionCount()&&this.addMenuItems(B,["enterGroup"],null,g);x=c.getSelectionState();null!=x.mergeCell? this.addMenuItem(B,"mergeCells"):(1<x.style.colspan||1<x.style.rowspan)&&this.addMenuItem(B,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
ma[Xa],0<ka.length&&(oa=document.createElement("div"),oa.className="geTempDlgImportCat",oa.innerText=mxResources.get(Xa,null,Xa),aa.appendChild(oa),C(ka,da,la,null,!0))}function V(ka,da){pa.innerText="";y();var la=Math.floor(pa.offsetWidth/150)-1;da=!da&&ka.length>la?la:ka.length;for(var ma=0;ma<da;ma++){var oa=ka[ma];oa.isCategory=!0;var ia=document.createElement("div"),ja=mxResources.get(oa.title);null==ja&&(ja=oa.title.substring(0,1).toUpperCase()+oa.title.substring(1));ia.className="geTempDlgNewDiagramCatItem"; ia.setAttribute("title",ja);ja=mxUtils.htmlEntities(ja);15<ja.length&&(ja=ja.substring(0,15)+"&hellip;");null==M&&(G(!0),y(ia,"geTempDlgNewDiagramCatItemActive",oa));var va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemImg";var wa=document.createElement("img");wa.src=NEW_DIAGRAM_CATS_PATH+"/"+oa.img;va.appendChild(wa);ia.appendChild(va);va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemLbl";va.innerHTML=ja;ia.appendChild(va);pa.appendChild(ia);(function(Ja, Ha){mxEvent.addListener(ia,"click",function(){M!=Ha&&(G(!0),y(Ha,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(ia,"dblclick",A)})(oa,ia)}ia=document.createElement("div");ia.className="geTempDlgNewDiagramCatItem";ja=mxResources.get("showAllTemps");ia.setAttribute("title",ja);va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemImg";va.innerText="...";va.style.fontSize="32px";ia.appendChild(va);va=document.createElement("div");va.className="geTempDlgNewDiagramCatItemLbl"; va.innerText=ja;ia.appendChild(va);pa.appendChild(ia);mxEvent.addListener(ia,"click",function(){function Ja(){var ya=Ha.querySelector(".geTemplateDrawioCatLink");null!=ya?ya.click():setTimeout(Ja,200)}fa=!0;var Ha=B.querySelector(".geTemplatesList");Ha.style.display="block";Ba.style.width="";Fa.style.display="";Fa.value="";Y=null;Ja()});ca.style.display=ka.length<=la?"none":""}function S(ka,da,la){function ma(Oa,Xa){Oa=mxResources.get(Oa,null,Oa.substring(0,1).toUpperCase()+Oa.substring(1));var Qa=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
var g=0,x=0;q.view.states.visit(function(F,M){F=!0;m(M.shape)||(console.log("invalid shape",M.cell.id,M.shape),F=!1);m(M.text)||(console.log("invalid text",M.cell.id,M.text),F=!1);F||g++;x++});console.log("states checked",x,"invalid",g)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var m=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";m=new TextareaDialog(d,"Paste Data:",m,function(v){if(0<v.length)try{var B=function(M){function P(aa){if(null== ca[aa]){if(ca[aa]=!0,null!=U[aa]){for(;0<U[aa].length;){var ra=U[aa].pop();P(ra)}delete U[aa]}}else mxLog.debug(T+": Visited: "+aa)}var T=M.parentNode.id,W=M.childNodes;M={};for(var U={},X=null,Z={},Y=0;Y<W.length;Y++){var ba=W[Y];if(null!=ba.id&&0<ba.id.length)if(null==M[ba.id]){M[ba.id]=ba.id;var fa=ba.getAttribute("parent");null==fa?null!=X?mxLog.debug(T+": Multiple roots: "+ba.id):X=ba.id:(null==U[fa]&&(U[fa]=[]),U[fa].push(ba.id))}else Z[ba.id]=ba.id}W=Object.keys(Z);0<W.length?(W=T+": "+W.length+
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
EditorUi.prototype.patchPage=function(b,f,l,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),u=this.createParentLookup(q,f);q.beginUpdate();try{var z=q.updateEdgeParent,D=new mxDictionary,L=[];q.updateEdgeParent=function(n,p){!D.get(n)&&d&&(D.put(n,!0),L.push(n))};var K=u[""],E=null!=K&&null!=K.inserted?K.inserted[""]:null,R=null;null!=E&&(R=this.getCellForJson(E));if(null==R){var I=null!=K&&null!=K.moved?K.moved[""]:null;null!=I&&(R=q.getCell(I))}null!=R&&(q.setRoot(R),
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(O){E=O};this.setAutoScroll=function(O){R=O};this.setOpenFill=function(O){I=O};this.setStopClickEnabled=function(O){k=O};this.setSelectInserted=function(O){n=O};this.setSmoothing=function(O){l=O};this.setPerfectFreehandMode=function(O){t=O};this.isPerfectFreehandMode=function(){return t};this.setBrushSize=function(O){p.size=O};this.getBrushSize=function(){return p.size};var y=function(O){e=O;b.getRubberband().setEnabled(!O);b.graphHandler.setSelectEnabled(!O);b.graphHandler.setMoveEnabled(!O);
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
!n,null!=A&&n&&(p.shadowVisible=A),this.editor.graph.model.execute(p))});c=new BackgroundImageDialog(this,c,e,k,n);this.showDialog(c.container,400,n?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,k,n,p){c=new LibraryDialog(this,c,e,k,n,p);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"metaEdit","0")?c.showDataDialog(B):k.apply(this,arguments)}}catch(F){c.handleError(F)}};e.getLinkTitle=function(B){return c.getLinkTitle(B)};e.customLinkClicked=function(B){var H=!1;try{c.handleCustomLink(B),H=!0}catch(g){c.handleError(g)}return H};var n=e.parseBackgroundImage;e.parseBackgroundImage=function(B){var H=n.apply(this,arguments);null!=H&&null!=H.src&&Graph.isPageLink(H.src)&&(H={originalSrc:H.src});return H};var p=e.setBackgroundImage;e.setBackgroundImage=function(B){null!=B&&null!=B.originalSrc&&
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
t(A)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(A){4==A.readyState&&(this.spinner.stop(),200<=A.status&&299>=A.status?t(A.responseText):this.handleError({message:mxResources.get(413==A.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
(null==Q.getCell()||Q.getCell()==I)};R.panningHandler.isForcePanningEvent=function(Q){return 2==Q.evt.button};var c=R.isCellSelectable;R.isCellSelectable=function(Q){return Q==I?!1:c.apply(this,arguments)};R.getLinkForCell=function(){return null};var e=R.view.getState(I);E=R.getAllConnectionConstraints(e);for(var k=0;null!=E&&k<E.length;k++){var n=R.getConnectionPoint(e,E[k]);u(n.x-3,n.y-3,E[k])}R.fit(8);R.center();k=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){R.zoomIn()},
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
typeof mxMermaidToDrawio)ea=ca=ua;ua=g.cloneNode(!0);ma.appendChild(ua);Ma=function(Pa){M=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Oa=function(Pa){M||y(Ra,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),Qa,Ca)};mxEvent.addGestureListeners(Qa,Ma,null,Oa);mxEvent.addGestureListeners(ua,Ma,null,Oa)},function(ua){b.handleError(ua)})});Ja.setAttribute("disabled","disabled");Ja.className="geBtn gePrimaryBtn";oa=function(){window.setTimeout(function(){""!=la.value?Ja.removeAttribute("disabled"): Ja.setAttribute("disabled","disabled")},0)};ja=urlParams["smart-template"];null!=ja&&"1"!=ja&&(la.value=decodeURIComponent(ja),oa(),"1"==urlParams["smart-template-generate"]&&window.setTimeout(function(){Ja.click()},0));mxEvent.addListener(la,"change",oa);mxEvent.addListener(la,"keydown",oa);mxEvent.addListener(la,"cut",oa);mxEvent.addListener(la,"paste",oa);mxEvent.addListener(la,"keydown",function(Ha){13==Ha.keyCode&&Ja.click()});oa=document.createElement("div");oa.style.height="40px";oa.style.marginTop=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
null!=aa&&(this.shapeBackgroundColor=za,this.shapeForegroundColor=ra,this.stylesheet=aa,this.refresh());return Ba};var G=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(g){G.apply(this,arguments);null!=g.secondLabel&&(g.secondLabel.destroy(),g.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(g){return[g.shape,g.text,g.secondLabel,g.control]};var C=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){C.apply(this,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
k&&t.setAttribute("resource",k);var O=mxUtils.bind(this,function(Q){Q=(n?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(Q);null!=p&&p(Q);return Q});e.mathEnabled&&this.editor.addMathCss(t);if(null!=p)this.embedFonts(t,mxUtils.bind(this,function(Q){A?this.editor.convertImages(Q,mxUtils.bind(this,function(J){O(J)})):O(Q)}));else return O(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&& this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(c,k),e(c)}catch(n){e(c)}}))}catch(k){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,k,n,p,t,y,A,G,C,V,S,N){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var O=this.editor.graph.isSelectionEmpty();k=null!=k?k:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
p.value);p.geometry.width+=G.gridSize;p.geometry.height+=G.gridSize}finally{G.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
U.fillStyle=W;return U};g.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};g.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};g.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
38==J.keyCode?(I(m,mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(I(m,mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(I(m,mxConstants.DIRECTION_SOUTH),mxEvent.consume(J)))}}catch(B){c.handleError(B)}mxEvent.isConsumed(J)||C.apply(this,arguments)};var V=e.connectVertex;e.connectVertex=function(J,m,v,B,H,g,x){var F=e.getIncomingTreeEdges(J);if(d(J)){var M=D(J),P=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST,T=m==mxConstants.DIRECTION_EAST||m==mxConstants.DIRECTION_WEST; return M==m||0==F.length?E(J,m):P==T?K(J):L(J,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return V.apply(this,arguments)};e.getSubtree=function(J){var m=[J];!q(J)&&!d(J)||z(J)||e.traverse(J,!0,function(v,B){var H=null!=B&&e.isTreeEdge(B);H&&0>mxUtils.indexOf(m,B)&&m.push(B);(null==B||H)&&0>mxUtils.indexOf(m,v)&&m.push(v);return null==B||H});return m};var S=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){S.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
l.appendChild(q);f.appendChild(l);this.container=f},ConnectionPointsDialog=function(b,f){function l(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function u(Q,J,m){Q=new mxCell("",new mxGeometry(Q,J,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");Q.vertex=!0;Q.cp=!0;Q.constObj=m;return R.addCell(Q)}function z(Q){Q=R.getSelectionCells();R.deleteCells(Q)}
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
t.descriptorChanged=function(){S.apply(this,arguments);var U=t.getCurrentFile();if(null!=U&&null!=U.getTitle()){var X=U.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);A.setAttribute("title",U.getTitle()+(null!=X?" ("+X+")":""))}else A.removeAttribute("title")};t.setStatusText(t.editor.getStatus());A.appendChild(t.statusContainer);t.buttonContainer=document.createElement("div");t.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
null!=window.console&&console.error(ha,U)}});/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name)?p(null,U.type,e+W*g,k+W*g,240,160,U.name,function(Z){P(W,function(){return Z})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?X.readAsDataURL(U):X.readAsText(U)}})(T)});if(J){J=[];for(v=0;v<c.length;v++)J.push(c[v]);c=J;this.confirmImageResize(function(H){Q=H;B()},G)}else B()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&& this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},n=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,p=function(t,y){if(t||e)mxSettings.setResizeImages(t?y:null),mxSettings.save();k();c(y)};null==n||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){p(t,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
0;k<c.length;k++)mxUtils.bind(this,function(n){var p=new FileReader;p.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,n.name,n,e)}catch(y){this.handleError(y)}});p.onerror=mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t);window.openFile=null});"image"!==n.type.substring(0,5)&&"application/pdf"!==n.type||"image/svg"===n.type.substring(0,9)?p.readAsText(n):p.readAsDataURL(n)})(c[k])};EditorUi.prototype.openLocalFile=function(c,e,k,n,p){var t=this.getCurrentFile(), y=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var A=mxUtils.parseXml(c);null!=A&&(this.editor.setGraphXml(A.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,k,n,p))});if(null!=c&&0<c.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)?y():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=n)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"), null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,y,mxResources.get("cancel"),mxResources.get("discardChanges")):y()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
2;p.style.border="3px dotted rgb(254, 137, 12)";p.style.pointerEvents="none";p.style.position="absolute";p.style.top=e+"px";p.style.left=k+"px";p.style.width=Math.max(0,t-3)+"px";p.style.height=Math.max(0,n-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(p):document.body.appendChild(p);return p};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var k=new mxCodec(e.ownerDocument), n=new mxGraphModel;k.decode(e,n);e=n.getChildAt(n.getRoot(),0);for(k=0;k<n.getChildCount(e);k++)c.push(n.getChildAt(e,k))}return c};EditorUi.prototype.openFileHandle=function(c,e,k,n,p){if(null!=e&&0<e.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(e)||/(\.pdf)$/i.test(e))e=e.substring(0,e.length-4),/(\.drawio)$/i.test(e)||(e+=".drawio");var t=mxUtils.bind(this,function(A){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==A.substring(0,10)){null==
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
u)for(z=0;z<u.length;z++)u[z].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var u=0;u<d.length;u++)d[u].destroy();this.guidesArrVer=null}if(null!=q){for(u=0;u<q.length;u++)q[u].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function q(){var y=b.diagramContainer;R.style.top=y.offsetTop-L+"px";R.style.left=y.offsetLeft-L+"px";R.style.width=(l?0:y.offsetWidth)+L+"px";R.style.height=(l?y.offsetHeight:0)+L+"px"}function u(y,A,G){if(null!=z)return y;var C;return function(){var V=this,S=arguments,N=G&&!C;clearTimeout(C);C=setTimeout(function(){C=null;G||y.apply(V,S)},A);N&&y.apply(V,S)}}var z=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
U.fillStyle=W;return U};g.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};g.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};g.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var g=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=g)for(var x in g)this.globalVars[x]=g[x]}catch(F){null!=window.console&&console.log("Error in vars URL parameter: "+F)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(g){var x= y.apply(this,arguments);null==x&&null!=this.globalVars&&(x=this.globalVars[g]);return x};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var g=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(g.ownerDocument)).decode(g)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var A=Graph.prototype.getSvg;Graph.prototype.getSvg=function(g,x,F,M,P,T,W,U,X,Z,Y,ba,fa,ca){var aa=null,ra=null,za=null;ba||null==this.themes||
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
(Y.charCodeAt(0)<<24)}function U(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}g=g.substring(g.indexOf(",")+1);g=window.atob?atob(g):Base64.decode(g,!0);var X=0;if(T(g,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(g,4),"IHDR"!=T(g,4))null!=P&&P();else{T(g,17);P=g.substring(0,X);do{var Z=W(g);if("IDAT"==T(g,4)){P=g.substring(0,X-8);"pHYs"==x&&"dpi"==F?(F=Math.round(M/.0254),F=U(F)+U(F)+String.fromCharCode(1)):F=F+String.fromCharCode(0)+
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
p.pasteCounter=0);var y=p.pasteCounter*p.gridSize;if(k||this.isCompatibleString(c))t=this.importXml(c,y,y),p.setSelectionCells(t);else if(e&&1==p.getSelectionCount()){y=p.getStartEditingCell(p.getSelectionCell(),n);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==p.getCurrentCellStyle(y)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,c,[y]);else{p.model.beginUpdate();try{p.labelChanged(y,c),Graph.isLink(c)&&p.setLinkForCell(y,c)}finally{p.model.endUpdate()}}p.setSelectionCell(y)}else t= p.getInsertPoint(),p.isMouseInsertPoint()&&(y=0,p.lastPasteXml==c&&0<p.pasteCounter&&p.pasteCounter--),t=this.insertTextAt(c,t.x+y,t.y+y,!0),p.setSelectionCells(t);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return t};EditorUi.prototype.pasteCells=function(c,e,k,n){if(!mxEvent.isConsumed(c)){var p=e,t=!1;if(k&&null!=c.clipboardData&&c.clipboardData.getData){var y=c.clipboardData.getData("text/plain"),
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
k,null,null,null,n)},null,null,null,n)},null,null,null,n)},null,null,null,n):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",k,null,null,null,n))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var k=c.split("\n"),n=[],p=[],t=[],y={};if(0<k.length){var A={},G=this.editor.graph,C=null,V=null,S=null,N=null,O=null,Q=null,J=null,m="whiteSpace=wrap;html=1;",v=null,B=null,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
App.prototype.loadTemplate=function(b,f,l,d,q){var u=!1,z=b,D=null!=d?d:b,L=/(\.v(dx|sdx?))($|\?)/i.test(D)||/(\.vs(x|sx?))($|\?)/i.test(D);d=/\.png$/i.test(D)||/\.pdf$/i.test(D);this.editor.isCorsEnabledForUrl(z)||(u=d||L,z="t="+(new Date).getTime(),z=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+z+(u?"&base64=1":""));this.editor.loadUrl(z,mxUtils.bind(this,function(K){try{var E=u?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(K):atob(K):K;if(L||this.isVisioData(E))L||(D=q?this.isRemoteVisioData(E)? "raw.vss":"raw.vssx":this.isRemoteVisioData(E)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(R){f(R)},l,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,D))this.isExternalDataComms()?this.parseFileData(E,mxUtils.bind(this,function(R){4==R.readyState&&200<=R.status&&299>=R.status&&"<mxGraphModel"==R.responseText.substring(0,13)&&f(R.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l); else if(this.isLucidChartData(E))this.convertLucidChart(E,mxUtils.bind(this,function(R){f(R)}),mxUtils.bind(this,function(R){l(R)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(E))E=Editor.extractGraphModelFromPng(K);f(E)}}catch(R){l(R)}}),l,/(\.png)($|\?)/i.test(D)||/(\.v(dx|sdx?))($|\?)/i.test(D)||/(\.vs(x|sx?))($|\?)/i.test(D),null,null,u)};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
g.prototype.lineTo=function(T,W){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,W),this.lastX=T,this.lastY=W)};g.prototype.moveTo=function(T,W){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,W),this.lastX=T,this.lastY=W,this.firstX=T,this.firstY=W)};g.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};g.prototype.quadTo=function(T,W,U,X){this.passThrough?
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
Graph.recentCustomFonts[M]=P,x=document.getElementsByTagName("head")[0],null!=F&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=F,P.elt.onerror=F):F()),null!=x&&x.appendChild(P.elt)):null!=F&&F()}else null!=F&&F()}else null!=F&&F();return g};Graph.getFontUrl=function(g,x){g=Graph.customFontElements[g.toLowerCase()];null!=g&&(x=g.url);return x};Graph.processFontAttributes=function(g){g=g.getElementsByTagName("*");for(var x=0;x<g.length;x++){var F=g[x].getAttribute("data-font-src");if(null!=F){var M= "FONT"==g[x].nodeName?g[x].getAttribute("face"):g[x].style.fontFamily;null!=M&&Graph.addFont(M,F)}}};Graph.processFontStyle=function(g){if(null!=g){var x=mxUtils.getValue(g,"fontSource",null);if(null!=x){var F=mxUtils.getValue(g,mxConstants.STYLE_FONTFAMILY,null);null!=F&&Graph.addFont(F,decodeURIComponent(x))}}return g};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
1),"image/png");c=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](n)};EditorUi.prototype.copyCells=function(c,e){var k=this.editor.graph;if(k.isSelectionEmpty())c.innerText="";else{var n=mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),p=mxUtils.getXml(k.encodeCells(n));mxUtils.setTextContent(c,encodeURIComponent(p));e?(k.removeCells(n,!1),k.lastPasteXml=null):(k.lastPasteXml= p,k.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,k,n){var p=this.editor.graph,t=null;p.lastPasteXml==c?p.pasteCounter++:(p.lastPasteXml=c,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(O){E=O};this.setAutoScroll=function(O){R=O};this.setOpenFill=function(O){I=O};this.setStopClickEnabled=function(O){k=O};this.setSelectInserted=function(O){n=O};this.setSmoothing=function(O){l=O};this.setPerfectFreehandMode=function(O){t=O};this.isPerfectFreehandMode=function(){return t};this.setBrushSize=function(O){p.size=O};this.getBrushSize=function(){return p.size};var y=function(O){e=O;b.getRubberband().setEnabled(!O);b.graphHandler.setSelectEnabled(!O);b.graphHandler.setMoveEnabled(!O);
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
n.model.getChildAt(e,A))};EditorUi.prototype.updatePageLink=function(c,e){if(Graph.isPageLink(e)){var k=c[e.substring(e.indexOf(",")+1)];e=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==e.substring(0,17))try{var n=JSON.parse(e.substring(17));if(null!=n.actions){for(var p=0;p<n.actions.length;p++){var t=n.actions[p];if(null!=t.open&&Graph.isPageLink(t.open)){var y=t.open.substring(t.open.indexOf(",")+1);k=c[y];null!=k?t.open="data:page/id,"+k:null==this.getPageById(y)&&delete t.open}}e= "data:action/json,"+JSON.stringify(n)}}catch(A){}return e};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,k,n,p){var t=mxUtils.bind(this,function(y){this.loadingExtensions=!1;null!=k?k(y):this.handleError(y)});this.createTimeout(null,mxUtils.bind(this,function(y){n=null!=n?n:c.name;var A=mxUtils.bind(this,function(C){y.clear()&&t(C)}),G=mxUtils.bind(this,function(){this.loadingExtensions=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(T,W,U,X,Z,Y){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+Z,W),this.lineTo(T+U-Z,W),this.quadTo(T+U,W,T+U,W+Y),this.lineTo(T+U,W+X-Y),this.quadTo(T+U,W+X,T+U-Z,W+X),this.lineTo(T+Z,W+X),this.quadTo(T,W+X,T,W+X-Y),this.lineTo(T,W+Y),this.quadTo(T,W,T+Z,W))};g.prototype.drawPath=function(T){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var W in T)this.nextShape.options[W]=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"4px";oa.style.marginBottom="4px";oa.style.whiteSpace="nowrap";oa.style.overflowX="auto";oa.style.overflowY="hidden";oa.appendChild(ia);oa.appendChild(Ja);da.appendChild(oa);da.appendChild(ma);return da}function G(){if(ra&&null!=c)l||b.hideDialog(),c(ra,Ba,m.value);else if(d)l||b.hideDialog(),d(ca,m.value,za,ba);else{var da=m.value;null!=da&&0<da.length&&b.pickFolder(b.mode,function(la){b.createFile(da,ca,null!=ba&&0<ba.length?ba:null,null,function(){b.hideDialog()},null,la,null,null!=fa&&0<fa.length? fa:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function C(da,la,ma,oa,ia,ja,va){null!=aa&&(aa.style.backgroundColor="transparent",aa.style.border="1px solid transparent");H.removeAttribute("disabled");ca=la;ba=ma;fa=ja;aa=da;ra=oa;za=va;Ba=ia;aa.style.backgroundColor=D;aa.style.border=L}function V(da,la,ma,oa,ia,ja,va,wa,Ja,Ha,ya){function La(Na,Ya){null==Ma?(Oa=Na,Oa=/^https?:\/\//.test(Oa)&&!b.editor.isCorsEnabledForUrl(Oa)?PROXY_URL+"?url="+encodeURIComponent(Oa):
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
D.appendChild(E);mxUtils.br(D);K=function(){z.freehand.setPerfectFreehandMode(L.checked);E.style.visibility=L.checked?"visible":"hidden"};mxEvent.addListener(L,"change",K);K();mxEvent.addListener(E,"change",function(){z.freehand.setBrushSize(parseInt(this.value))})}var R=mxUtils.button(mxResources.get("startDrawing"),function(){z.freehand.isDrawing()?z.freehand.stopDrawing():z.freehand.startDrawing()});R.setAttribute("title",mxResources.get("startDrawing")+" (X)");R.style.marginTop=u?"5px":"10px";
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(y.responseType="blob");y.onload=function(A){if(200<=this.status&&300>this.status)if("txt"==e)k(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(C){var V=new Image;V.onload=function(){try{var S=V.width,N=V.height;if(0==S&&0==N){var O=G.result,Q=O.indexOf(","),J=decodeURIComponent(escape(atob(O.substring(Q+1)))),m=mxUtils.parseXml(J).getElementsByTagName("svg");0<m.length&&(S=parseFloat(m[0].getAttribute("width")), N=parseFloat(m[0].getAttribute("height")))}k(G.result,S,N)}catch(v){n(v)}};V.src=G.result};G.onerror=function(C){n(C)}}else n(A)};y.onerror=function(A){n(A)};y.send()};EditorUi.prototype.insertAsPreText=function(c,e,k){var n=this.editor.graph,p=null;n.getModel().beginUpdate();try{p=n.insertVertex(null,null,"<pre>"+c+"</pre>",e,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(p,!0)}finally{n.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,k,n,p,t,y,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
else{var va=function(wa){qa&&b.sidebar.currentElt==da&&ia(wa,mxEvent.getClientX(ma),mxEvent.getClientY(ma));qa=!1;la.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=da;qa=!0;la.src="/images/aui-wait.gif";ka.isExt?L(ka,va,function(){k(mxResources.get("cantLoadPrev"));qa=!1;la.src="/images/icon-search.svg"}):oa(ka.url,va)}}function y(ka,da,la){if(null!=M){for(var ma=M.className.split(" "),oa=0;oa<ma.length;oa++)if(-1<ma[oa].indexOf("Active")){ma.splice(oa,1);break}M.className= ma.join(" ")}null!=ka?(M=ka,M.className+=" "+da,P=la,na.className="geTempDlgCreateBtn"):(P=M=null,na.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function A(ka,da){if(null!=P){var la=function(va){ja.isExternal?L(ja,function(wa){ma(wa,va)},oa):ja.url?mxUtils.get(TEMPLATE_PATH+"/"+ja.url,mxUtils.bind(this,function(wa){200<=wa.getStatus()&&299>=wa.getStatus()?ma(wa.getText(),va):oa()})):ma(b.emptyDiagramXml,va)},ma=function(va,wa){e||b.hideDialog(!0);f(va,wa,ja,da)},oa=function(){k(mxResources.get("cannotLoad"));
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
F=[];if(0<P.length){P=P.split(" ");for(var T={},W=0;W<P.length;W++)if(null==x||null!=x[P[W]])T[P[W]]=!0,F.push(P[W]);x=T}else return[]}return F};Graph.prototype.getTagsForCells=function(g){for(var x=[],F={},M=0;M<g.length;M++){var P=this.getTagsForCell(g[M]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==F[P[T]]&&(F[P[T]]=!0,x.push(P[T]))}}return x};Graph.prototype.getTagsForCell=function(g){return this.getAttributeForCell(g,"tags","")};Graph.prototype.addTagsForCells=function(g,x){if(0<
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
Graph.prototype.highlightCells=function(g,x,F,M){for(var P=0;P<g.length;P++)this.highlightCell(g[P],x,F,M)};Graph.prototype.highlightCell=function(g,x,F,M,P){x=null!=x?x:mxConstants.DEFAULT_VALID_COLOR;F=null!=F?F:1E3;g=this.view.getState(g);var T=null;null!=g&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,x,P,!1),null!=M&&(T.opacity=M),T.highlight(g),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style, "transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},1200)},F));return T};Graph.prototype.addSvgShadow=function(g,x,F,M){F=null!=F?F:!1;M=null!=M?M:!0;var P=g.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");W.setAttribute("in",
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
S();this.refreshComments=S;A=mxUtils.bind(this,function(){function N(v){var B=Q[v.id];if(null!=B)for(L(v,B),B=0;null!=v.replies&&B<v.replies.length;B++)N(v.replies[B])}if(this.window.isVisible()){for(var O=t.querySelectorAll(".geCommentDate"),Q={},J=0;J<O.length;J++){var m=O[J];Q[m.getAttribute("data-commentId")]=m}for(J=0;J<V.length;J++)N(V[J])}});setInterval(A,6E4);this.refreshCommentsTime=A;this.window=new mxWindow(mxResources.get("comments"),n,f,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
null,c,mxResources.get("ok"),e);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,k,n,p,t){c=null!=c?c:"";var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){y();null!=e&&e()},function(){y();null!=k&&k()},n,p,null,null,null,null,A);this.showDialog(c.container,340,46+A,!0,t);c.init()};EditorUi.prototype.showBanner=function(c,e,k,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);ImageDialog.filePicked=function(y){y.action==google.picker.Action.PICKED&&null!=y.docs[0].thumbnails&&(y=y.docs[0].thumbnails[y.docs[0].thumbnails.length-1],null!=y&&(R.value=y.url));R.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type",
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
"cells",[Q])),b.fireEvent(new mxEventObject("freehandInserted","cell",Q))}finally{b.model.endUpdate()}n&&b.setSelectionCells([Q])}}for(Q=0;Q<q.length;Q++)q[Q].parentNode.removeChild(q[Q]);d=null;q=[];z=[]}y(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,Q){O=Q.getProperty("eventName");Q=Q.getProperty("event");O==mxEvent.MOUSE_MOVE&&e&&(null!=Q.sourceState&&Q.sourceState.setCursor("crosshair"),Q.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(O,Q){if(b.isEnabled()&& !b.isCellLocked(b.getDefaultParent())&&(O=Q.getEvent(),e&&!mxEvent.isPopupTrigger(O)&&!mxEvent.isMultiTouchEvent(O))){var J=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var m=C();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",t?m:"none");d.setAttribute("stroke",m);d.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(m=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3", m=m.split(" ").map(function(v){return parseFloat(v)*J}).join(" "),d.setAttribute("stroke-dasharray",m));c=[];O=V(O);S(O);u="M"+O.x+" "+O.y;z.push(O);D=[];d.setAttribute("d",t?PerfectFreehand.getSvgPathFromStroke([[O.x,O.y]],p):u);f.appendChild(d);Q.consume()}}),mouseMove:mxUtils.bind(this,function(O,Q){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){O=Q.getEvent();O=V(O);S(O);var J=N(0);if(J)if(z.push(J),t){var m=[];for(J=0;J<z.length;J++)m.push([z[J].x,z[J].y]);D=[];for(var v=2;v<c.length;v+=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
t=65==(A?parseInt(A[2],10):!1)?!1:t}if(t||this.isOffline()){y.href=URL.createObjectURL(n?this.base64ToBlob(c,k):new Blob([c],{type:k}));t?y.download=e:y.setAttribute("target","_blank");document.body.appendChild(y);try{window.setTimeout(function(){URL.revokeObjectURL(y.href)},2E4),y.click(),y.parentNode.removeChild(y)}catch(G){}}else this.createEchoRequest(c,e,k,n,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,k,n,p,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL, c+(null!=k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(n?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var k=c.length,n=Math.ceil(k/1024),p=Array(n),t=0;t<n;++t){for(var y=1024*t,A=Math.min(y+1024,k),G=Array(A-y),C=0;y<A;++C,++y)G[C]=c[y].charCodeAt(0);p[t]=new Uint8Array(G)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,k,n,p,t,y,A){t=null!=t?t:!1;y=null!=y?
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
this.addMenuItem(B,"mergeCells"):(1<x.style.colspan||1<x.style.rowspan)&&this.addMenuItem(B,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container, 360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var V=e.getExportVariables;e.getExportVariables=function(){var B=V.apply(this,arguments),H=c.getCurrentFile();null!=H&&(B.filename=H.getTitle());B.pagecount=null!=c.pages?c.pages.length:1;B.page=null!=c.currentPage?c.currentPage.getName():"";B.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return B};var S=e.getGlobalVariable;e.getGlobalVariable=function(B){var H=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
y:Q.constObj.point.y,dx:Q.constObj.dx,dy:Q.constObj.dy};var J=0,m=0,v=I.geometry,B=mxUtils.format((Q.geometry.x+3-v.x)/v.width);Q=mxUtils.format((Q.geometry.y+3-v.y)/v.height);0>B?(J=B*v.width,B=0):1<B&&(J=(B-1)*v.width,B=1);0>Q?(m=Q*v.height,Q=0):1<Q&&(m=(Q-1)*v.height,Q=1);return{x:B,y:Q,dx:parseInt(J),dy:parseInt(m)}}function K(Q){if(1==R.getSelectionCount()){var J=R.getSelectionCell();Q&&(J.constObj=null);Q=L(J);V.value=100*Q.x;N.value=100*Q.y;S.value=Q.dx;O.value=Q.dy;C.style.visibility=""}else C.style.visibility=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
return M==m||0==F.length?E(J,m):P==T?K(J):L(J,m!=mxConstants.DIRECTION_NORTH&&m!=mxConstants.DIRECTION_WEST)}return V.apply(this,arguments)};e.getSubtree=function(J){var m=[J];!q(J)&&!d(J)||z(J)||e.traverse(J,!0,function(v,B){var H=null!=B&&e.isTreeEdge(B);H&&0>mxUtils.indexOf(m,B)&&m.push(B);(null==B||H)&&0>mxUtils.indexOf(m,v)&&m.push(v);return null==B||H});return m};var S=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){S.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&& !z(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell, mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);this.graph.isMouseDown=!0;c.hoverIcons.reset();mxEvent.consume(J)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
EditorUi.initMinimalTheme=function(){function b(I,c){if(EditorUi.windowed){var e=I.editor.graph;e.popupMenuHandler.hideMenu();null==I.formatWindow?(c=Math.max(10,I.diagramContainer.clientWidth-248),e=Math.min(566,e.container.clientHeight-10),I.formatWindow=new WrapperWindow(I,mxResources.get("format"),c,60,240,e,function(k){I.createFormat(k).init()}),I.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){I.formatWindow.window.fit()})),I.formatWindow.window.minimumSize=new mxRectangle(0, 0,240,80)):I.formatWindow.window.setVisible(null!=c?c:!I.formatWindow.window.isVisible())}else null==I.formatElt&&(I.formatElt=I.createSidebarContainer(),I.createFormat(I.formatElt).init(),I.formatElt.style.border="none",I.formatElt.style.width="240px",I.formatElt.style.borderLeft="1px solid gray",I.formatElt.style.right="0px"),e=I.diagramContainer.parentNode,null!=I.formatElt.parentNode?(I.formatElt.parentNode.removeChild(I.formatElt),e.style.right="0px"):(e.parentNode.appendChild(I.formatElt),e.style.right= I.formatElt.style.width)}function f(I,c){function e(p,t){var y=I.menus.get(p);p=k.addMenu(t,mxUtils.bind(this,function(){y.funct.apply(this,arguments)}));p.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";p.className="geTitle";c.appendChild(p);return p}var k=new Menubar(I,c);if(Editor.enableCustomLibraries&&("1"!=urlParams.embed||
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
x?null:{from:Math.max(0,Math.min(g-1,ca-1)),to:Math.max(0,Math.min(g-1,aa-1))}}d.downloadFile("pdf",null,null,!X.checked,m?!0:!M.checked&&null==ca,!Z.checked,null!=ba&&ba.checked,null,null,Y.checked,null!=fa&&fa.checked,ca)}),null,mxResources.get("export"));d.showDialog(v.container,300,B,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
if(isNaN(V)||isNaN(S))try{var N=C[0].getAttribute("viewBox").split(/\s+/);V=parseFloat(N[2]);S=parseFloat(N[3])}catch(O){V=V||100,S=S||100}k(this.convertDataUri(Editor.createSvgDataUri(G)),V,S)}else null!=p?p():n({message:mxResources.get("invalidInput")})}catch(O){n(O)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(G){A(G.svg)}).catch(function(G){null!=p?p(G):n(G)})}catch(G){n(G)}});"undefined"!==typeof mermaid||this.loadingMermaid||
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(F.click(),mxEvent.consume(M)):27==M.keyCode&&(x.click(),mxEvent.consume(M)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";g.appendChild(F);O.insertBefore(g,v);B.style.display="none";v.style.display="none";H.focus()}function L(N,O){O.innerText="";N=new Date(N.modifiedDate);var Q=b.timeSince(N);null==Q&&(Q=mxResources.get("lessThanAMinute"));mxUtils.write(O,mxResources.get("timeAgo", [Q],"{1} ago"));O.setAttribute("title",N.toLocaleDateString()+" "+N.toLocaleTimeString())}function K(N){var O=document.createElement("img");O.className="geCommentBusyImg";O.src=IMAGE_PATH+"/spin.gif";N.appendChild(O);N.busyImg=O}function E(N){N.style.border="1px solid red";N.removeChild(N.busyImg)}function R(N){N.style.border="";N.removeChild(N.busyImg)}function I(N,O,Q,J,m){function v(T,W,U){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
J.readAsText(Q)}else this.doImportVisio(Q,e,A,n)}catch(m){A(m)}else try{""==O.responseType||"text"==O.responseType?A({message:O.responseText}):(J=new FileReader,J.onload=function(){try{A({message:JSON.parse(J.result).Message})}catch(m){A(m)}},J.readAsText(O.response))}catch(m){A({})}});O.send(C)}else if(y.clear())try{this.doImportVisio(c,e,A,n)}catch(Q){A(Q)}}else A({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?G():(this.loadingExtensions=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(y.responseType="blob");y.onload=function(A){if(200<=this.status&&300>this.status)if("txt"==e)k(this.response);else{var G=new FileReader;G.readAsDataURL(this.response);G.onloadend=function(C){var V=new Image;V.onload=function(){try{var S=V.width,N=V.height;if(0==S&&0==N){var O=G.result,Q=O.indexOf(","),J=decodeURIComponent(escape(atob(O.substring(Q+1)))),m=mxUtils.parseXml(J).getElementsByTagName("svg");0<m.length&&(S=parseFloat(m[0].getAttribute("width")), N=parseFloat(m[0].getAttribute("height")))}k(G.result,S,N)}catch(v){n(v)}};V.src=G.result};G.onerror=function(C){n(C)}}else n(A)};y.onerror=function(A){n(A)};y.send()};EditorUi.prototype.insertAsPreText=function(c,e,k){var n=this.editor.graph,p=null;n.getModel().beginUpdate();try{p=n.insertVertex(null,null,"<pre>"+c+"</pre>",e,k,1,1,"text;html=1;align=left;verticalAlign=top;"),n.updateCellSize(p,!0)}finally{n.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(c,e,k,n,p,t,y,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
q.setAttribute("src","data:"+c+";base64,"+G);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");u.appendChild(q);mxClient.IS_FF||"image/png"!=c||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(k=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(G,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+ c+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(O){b.handleError(O)}))}),k.style.marginTop="6px",k.className="geBtn");L&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,null,null,function(N){mxEvent.isPopupTrigger(N)||t("_blank")}))}mxUtils.br(u);var C=document.createElement("div");C.style.textAlign="center";var V=0;C.style.marginTop=
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
Format.prototype.init;Format.prototype.init=function(){K.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var E=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?E.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(g){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
0,E.width,E.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");I.vertex=!0;R.addCell(I);R.dblClick=function(Q,J){if(null!=J&&J!=I)R.setSelectionCell(J);else{J=mxUtils.convertPoint(R.container,mxEvent.getClientX(Q),mxEvent.getClientY(Q));mxEvent.consume(Q);Q=R.view.scale;var m=R.view.translate;R.setSelectionCell(u((J.x-3*Q)/Q-m.x,(J.y-3*Q)/Q-m.y))}};q=new mxKeyHandler(R);q.bindKey(46,z);q.bindKey(8,z);R.getRubberband().isForceRubberbandEvent=function(Q){return 0==Q.evt.button&&
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
!1)))}var N=t=null;null!=G&&null!=G.helpLink?(t=mxResources.get("help"),N=mxUtils.bind(this,function(){return this.editor.graph.openLink(G.helpLink)})):null!=G&&null!=G.ownerEmail&&(t=mxResources.get("contactOwner"),y+=mxUtils.htmlEntities(" ("+t+": "+G.ownerEmail+")",!1),N=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(G.ownerEmail))}));this.showError(e,y,C,k,V,null,null,t,N,null,null,null,n?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,e,k){c=new ErrorDialog(this, null,c,mxResources.get("ok"),e);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,k,n,p,t){c=null!=c?c:"";var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){y();null!=e&&e()},function(){y();null!=k&&k()},n,p,null,null,null,null,A);this.showDialog(c.container,340,46+A,!0,t);c.init()};EditorUi.prototype.showBanner=function(c,e,k,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,k,n,p,t,y,A){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,k,n,p,t,y,A)};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(g,x,F,M,P,T,W,U,X,Z){if(null!=F&&null==mxMarker.markers[F]){var Y=this.getPackageForType(F);null!=Y&&mxStencilRegistry.getStencil(Y)}return J.apply(this,arguments)};var m=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(g,x,F,M,P,T){"1"==mxUtils.getValue(x.style,"lineShape",null)&&g.setFillColor(mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return m.apply(this,arguments)};PrintDialog.prototype.create=function(g,x){function F(){fa.value=Math.max(1,
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
V.style.display="none";u=mxUtils.button(u||mxResources.get("edit"),function(){d.apply(this,[R.value])});u.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.position="absolute";c.style.bottom="30px";c.style.right="40px";c.style.textAlign="right";e=document.createElement("div");e.className="geToolbarContainer";e.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function S(J){if(null!= J){var m=J.getAttribute("background");if(null==m||""==m||m==mxConstants.NONE)m=Editor.isDarkMode()?"transparent":"#ffffff";n.style.backgroundColor=m;(new mxCodec(J.ownerDocument)).decode(J,p.getModel());p.maxFitScale=1;p.fit(8);p.center()}return J}function N(J){null!=J&&(J=S(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(V,"change",function(J){A=parseInt(V.value);N(G[A]);mxEvent.consume(J)});if("mxfile"==y.nodeName){var O=y.getElementsByTagName("diagram");G=[];for(var Q=0;Q<O.length;Q++)G.push(O[Q]);
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
function(c){var e=E.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){e.refresh();this.restoreOpenLibraries()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){e.refresh();this.restoreOpenLibraries()}));return e};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var e=0;e<c.length;e++)this.libraryLoaded(c[e].file,c[e].images,c[e].title,null!=c[e].div?"none"!=c[e].div.style.display: c[e].expand)};var R=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){R.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),k=this.getSelectionState(),n=this.isDiagramActive(),p="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&p);this.actions.get("redo").setEnabled(this.canRedo()&&p);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable
App.prototype.createFile=function(b,f,l,d,q,u,z,D,L,K){d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;null==f||Editor.defaultCompressed||(f=this.uncompressPages(f));var E=mxUtils.bind(this,function(){this.spinner.stop()}),R=mxUtils.bind(this,function(I){E();null==I&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=I&&this.handleError(I)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null== z&&null!=this.stateArg&&null!=this.stateArg.folderId&&(z=this.stateArg.folderId),this.drive.insertFile(b,f,z,mxUtils.bind(this,function(I){E();this.fileCreated(I,l,u,q,L,K)}),R)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(I){E();this.fileCreated(I,l,u,q,L,K)}),R,!1,z):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(I){E();this.fileCreated(I,l,u,q,L,K)}),R,!1,z):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b, f,mxUtils.bind(this,function(I){E();this.fileCreated(I,l,u,q,L,K)}),R,!1,z):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(I){E();this.fileCreated(I,l,u,q,L,K)}),R):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(I){E();this.fileCreated(I,l,u,q,L,K)}),R,!1,z):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(I){E();this.fileCreated(I,l,u,q,L,K)}),R):!D&&d==App.MODE_DEVICE&& EditorUi.nativeFileSupport?(E(),this.showSaveFilePicker(mxUtils.bind(this,function(I,c){var e=new LocalFile(this,f,c.name,null,I,c);e.saveFile(c.name,!1,mxUtils.bind(this,function(){this.fileCreated(e,l,u,q,L,K)}),R,!0)}),mxUtils.bind(this,function(I){"AbortError"!=I.name&&R(I)}),this.createFileSystemOptions(b))):(E(),this.fileCreated(new LocalFile(this,f,b,null==d),l,u,q,L,K))}catch(I){E(),this.handleError(I)}}};
0
JavaScript
CWE-78
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.
https://cwe.mitre.org/data/definitions/78.html
vulnerable