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 |
---|---|---|---|---|---|---|---|
Editor.createRoughCanvas=function(g){var x=rough.canvas({getContext:function(){return g}});x.draw=function(F){var M=F.sets||[];F=F.options||this.getDefaultOptions();for(var Q=0;Q<M.length;Q++){var S=M[Q];switch(S.type){case "path":null!=F.stroke&&this._drawToContext(g,S,F);break;case "fillPath":this._drawToContext(g,S,F);break;case "fillSketch":this.fillSketch(g,S,F)}}};x.fillSketch=function(F,M,Q){var S=g.state.strokeColor,W=g.state.strokeWidth,T=g.state.strokeAlpha,X=g.state.dashed,Z=Q.fillWeight; | 1 | 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 | safe |
W};var Q=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(S,W,T,X,Z,Y){null!=S.handJiggle&&S.handJiggle.constructor==g?(S.handJiggle.passThrough=!0,Q.apply(this,arguments),S.handJiggle.passThrough=!1):Q.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),
{to:"string"})};Editor.extractGraphModel=function(g,x,F){if(null!=g&&"undefined"!==typeof pako){var M=g.ownerDocument.getElementsByTagName("div"),Q=[];if(null!=M&&0<M.length)for(var S=0;S<M.length;S++)if("mxgraph"==M[S].getAttribute("class")){Q.push(M[S]);break}0<Q.length&&(M=Q[0].getAttribute("data-mxgraph"),null!=M?(Q=JSON.parse(M),null!=Q&&null!=Q.xml&&(g=mxUtils.parseXml(Q.xml),g=g.documentElement)):(Q=Q[0].getElementsByTagName("div"),0<Q.length&&(M=mxUtils.getTextContent(Q[0]),M=Graph.decompress(M, | 1 | 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 | safe |
"...",function(){var Z=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(Q.value),parentChildSpacing:parseInt(T.value),siblingSpacing:parseInt(X.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(Z,null,2))});M.className="geBtn";F=new CustomDialog(d,F,function(){null==A&&(A=2);d.loadOrgChartLayouts(x)},null,null,null,M);d.showDialog(F.container,355,140,!0,!0)},v,null,u());m.addSeparator(v);m.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this, | 1 | 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 | safe |
function(g){if(null!=g){Editor.prototype.fontCss=g;var x=document.getElementsByTagName("script")[0];if(null!=x&&null!=x.parentNode){var F=document.createElement("style");F.setAttribute("type","text/css");F.appendChild(document.createTextNode(g));x.parentNode.insertBefore(F,x);g=g.split("url(");for(F=1;F<g.length;F++){var M=g[F].indexOf(")");M=Editor.trimCssUrl(g[F].substring(0,M));var Q=document.createElement("link");Q.setAttribute("rel","preload");Q.setAttribute("href",M);Q.setAttribute("as","font");
Q.setAttribute("crossorigin","");x.parentNode.insertBefore(Q,x)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var x=[],F=0;F<g;F++)x.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length))); | 1 | 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 | safe |
return V}),B=!0);return B};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< | 1 | 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 | safe |
[N],"{1} ago"));P.setAttribute("title",O.toLocaleDateString()+" "+O.toLocaleTimeString())}function K(O){var P=document.createElement("img");P.className="geCommentBusyImg";P.src=IMAGE_PATH+"/spin.gif";O.appendChild(P);O.busyImg=P}function E(O){O.style.border="1px solid red";O.removeChild(O.busyImg)}function U(O){O.style.border="";O.removeChild(O.busyImg)}function J(O,P,N,H,m){function v(S,W,T){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className= | 1 | 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 | safe |
Editor.createRoughCanvas=function(g){var x=rough.canvas({getContext:function(){return g}});x.draw=function(F){var M=F.sets||[];F=F.options||this.getDefaultOptions();for(var Q=0;Q<M.length;Q++){var S=M[Q];switch(S.type){case "path":null!=F.stroke&&this._drawToContext(g,S,F);break;case "fillPath":this._drawToContext(g,S,F);break;case "fillSketch":this.fillSketch(g,S,F)}}};x.fillSketch=function(F,M,Q){var S=g.state.strokeColor,W=g.state.strokeWidth,T=g.state.strokeAlpha,X=g.state.dashed,Z=Q.fillWeight;
0>Z&&(Z=Q.strokeWidth/2);g.setStrokeAlpha(g.state.fillAlpha);g.setStrokeColor(Q.fill||"");g.setStrokeWidth(Z);g.setDashed(!1);this._drawToContext(F,M,Q);g.setDashed(X);g.setStrokeWidth(W);g.setStrokeColor(S);g.setStrokeAlpha(T)};x._drawToContext=function(F,M,Q){F.begin();for(var S=0;S<M.ops.length;S++){var W=M.ops[S],T=W.data;switch(W.op){case "move":F.moveTo(T[0],T[1]);break;case "bcurveTo":F.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":F.lineTo(T[0],T[1])}}F.end();"fillPath"===M.type&& | 1 | 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 | safe |
e.parentNode&&e.parentNode.removeChild(e)}))};var E=!1;EditorUi.prototype.initFormatWindow=function(){if(!E&&null!=this.formatWindow){E=!0;var J=this.formatWindow.window.toggleMinimized,c=240;this.formatWindow.window.toggleMinimized=function(){J.apply(this,arguments);this.minimized?(c=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+c-140+"px"):(this.div.style.width=c+"px",this.table.style.width=this.div.style.width,
this.div.style.left=Math.max(0,parseInt(this.div.style.left)-c+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(e){mxEvent.getSource(e)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var U=EditorUi.prototype.init;EditorUi.prototype.init=function(){function J(T,X,Z){var Y=t.menus.get(T),ba=B.addMenu(mxResources.get(T),mxUtils.bind(this,function(){Y.funct.apply(this,arguments)}),G);ba.className="geMenuItem"; | 1 | 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 | safe |
"keys",Ea,"values",Ta,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function Q(qa,ta,ua){var Da=mxUtils.getOffset(g,!0),Ea=mxUtils.getOffset(qa,!0);ta.style.position="absolute";ta.style.left=Ea.x-Da.x+"px";ta.style.top=Ea.y-Da.y+"px";ta.style.width=qa.offsetWidth+"px";ta.style.height=qa.offsetHeight-(ua?4:0)+"px";ta.style.zIndex=5}function S(qa,ta,ua){var Da=document.createElement("div");Da.style.width="32px";Da.style.height="4px";Da.style.margin="2px";Da.style.border="1px solid black"; | 1 | 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 | safe |
[];this.traverse(q,!0,mxUtils.bind(this,function(D,L){var K=null!=L&&this.isTreeEdge(L);K&&u.push(L);D==q||null!=L&&!K||u.push(D);return(null==L||K)&&(D==q||!this.model.isCollapsed(D))}));this.model.setCollapsed(q,d);for(var z=0;z<u.length;z++)this.model.setVisible(u[z],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,q,u,z,D,L){return this.model.filterCells(this.getEdges(d,q,u,z,D,L),mxUtils.bind(this,
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(H){return k.isVertex(H)&&u(H)}function q(H){var m=!1;null!=H&&(m="1"== | 1 | 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 | safe |
EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),e=new mxDictionary,f=[],g=0;g<b.length;g++){var d=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==d||e.get(d)||(e.put(d,!0),f.push(d))}a.setSelectionCells(a.duplicateCells(f,!1))}catch(h){this.handleError(h)}}; | 1 | 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 | safe |
0,0,80,30,"ellipse");L(K)}finally{u.getModel().endUpdate()}if("horizontalTree"==l){var E=new mxCompactTreeLayout(u);E.edgeRouting=!1;E.levelDistance=30;z="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(E=new mxCompactTreeLayout(u,!1),E.edgeRouting=!1,E.levelDistance=30,z="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(E=new mxRadialTreeLayout(u,!1),E.edgeRouting=!1,E.levelDistance=80):"verticalFlow"==l?E=new mxHierarchicalLayout(u,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
l?E=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"circle"==l?E=new mxCircleLayout(u):(E=new mxFastOrganicLayout(u,!1),E.forceConstant=80);if(null!=E){var U=function(k,n){u.getModel().beginUpdate();try{null!=k&&k(),E.execute(u.getDefaultParent(),K)}catch(p){throw p;}finally{k=new mxMorphing(u),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=n&&n()})),k.startAnimation()}},J=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(k,n,
p,t,y){J.apply(this,arguments);U()};u.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);U()};u.connectionHandler.addListener(mxEvent.CONNECT,function(){U()})}var c=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=q.parentNode&&(u.destroy(),q.parentNode.removeChild(q));b.hideDialog()})});c.className="geBtn";b.editor.cancelFirst&&d.appendChild(c);var e=mxUtils.button(mxResources.get("insert"),function(k){u.clearCellOverlays(); | 1 | 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 | safe |
Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(g){return g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(g){return Graph.isGoogleFontUrl(g)};Graph.createFontElement=function(g,x){var F=Graph.fontMapping[x];null==F&&Graph.isCssFontUrl(x)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",x)):(null==F&&(F='@font-face {\nfont-family: "'+
g+'";\nsrc: url("'+x+'");\n}'),g=document.createElement("style"),mxUtils.write(g,F));return g};Graph.addFont=function(g,x,F){if(null!=g&&0<g.length&&null!=x&&0<x.length){var M=g.toLowerCase();if("helvetica"!=M&&"arial"!=g&&"sans-serif"!=M){var Q=Graph.customFontElements[M];null!=Q&&Q.url!=x&&(Q.elt.parentNode.removeChild(Q.elt),Q=null);null==Q?(Q=x,"http:"==x.substring(0,5)&&(Q=PROXY_URL+"?url="+encodeURIComponent(x)),Q={name:g,url:x,elt:Graph.createFontElement(g,Q)},Graph.customFontElements[M]=Q, | 1 | 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 | safe |
DiagramFormatPanel.prototype.addOptions=function(g){g=U.apply(this,arguments);var x=this.editorUi,F=x.editor.graph;if(F.isEnabled()){var M=x.getCurrentFile();null!=M&&M.isAutosaveOptional()&&g.appendChild(this.createOption(mxResources.get("autosave"),function(){return x.editor.autosave},function(W){x.editor.setAutosave(W);x.editor.autosave&&M.isModified()&&M.fileChanged()},{install:function(W){this.listener=function(){W(x.editor.autosave)};x.editor.addListener("autosaveChanged",this.listener)},destroy:function(){x.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&& | 1 | 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 | safe |
var Q=null;null!=M&&0<M.length&&(Q=M[0].getAttribute("href"));for(var S=1;S<F.length;S++)if(M=F[S].indexOf(")"),0<M){var W=Editor.trimCssUrl(F[S].substring(0,M));this.graph.isRelativeUrl(W)&&(W=null!=Q?Q+W:window.location.protocol+"//"+window.location.hostname+("/"==W.charAt(0)?"":g)+W);x.push('url("'+W+'"'+F[S].substring(M))}else x.push(F[S])}else x=[g]}return null!=x?x.join(""):null};Editor.prototype.mapFontUrl=function(g,x,F){/^https?:\/\//.test(x)&&!this.isCorsEnabledForUrl(x)&&(x=PROXY_URL+"?url="+
encodeURIComponent(x));F(g,x)};Editor.prototype.embedCssFonts=function(g,x){var F=g.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var Q=mxUtils.bind(this,function(){if(0==M){for(var X=[F[0]],Z=1;Z<F.length;Z++){var Y=F[Z].indexOf(")");X.push('url("');X.push(this.cachedFonts[Editor.trimCssUrl(F[Z].substring(0,Y))]);X.push('"'+F[Z].substring(Y))}x(X.join(""))}});if(0<F.length){for(g=1;g<F.length;g++){var S=F[g].indexOf(")"),W=null,T=F[g].indexOf("format(",S);0<T&&(W=Editor.trimCssUrl(F[g].substring(T+ | 1 | 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 | safe |
else if("sfnt"==W||/(\.sfnt)($|\?)/i.test(X))Z="application/font-sfnt";this.mapFontUrl(Z,X,mxUtils.bind(this,function(Y,ba){this.loadUrl(ba,mxUtils.bind(this,function(fa){this.cachedFonts[X]=fa;M--;Q()}),mxUtils.bind(this,function(fa){M--;Q()}),!0,null,"data:"+Y+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(F[g].substring(0,S)),W)}Q()}else x(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(x){this.resolvedFontCss=
x;null!=g&&g()})):null!=g&&g()};Editor.prototype.createGoogleFontCache=function(){var g={},x;for(x in Graph.fontMapping)Graph.isCssFontUrl(x)&&(g[x]=Graph.fontMapping[x]);return g};Editor.prototype.embedExtFonts=function(g){var x=this.graph.getCustomFonts();if(0<x.length){var F=[],M=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var Q=mxUtils.bind(this,function(){0==M&&this.embedCssFonts(F.join(""),g)}),S=0;S<x.length;S++)mxUtils.bind(this,function(W,T){Graph.isCssFontUrl(T)? | 1 | 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 | safe |
function(P){E=P};this.setAutoScroll=function(P){U=P};this.setOpenFill=function(P){J=P};this.setStopClickEnabled=function(P){k=P};this.setSelectInserted=function(P){n=P};this.setSmoothing=function(P){l=P};this.setPerfectFreehandMode=function(P){t=P};this.isPerfectFreehandMode=function(){return t};this.setBrushSize=function(P){p.size=P};this.getBrushSize=function(){return p.size};var y=function(P){e=P;b.getRubberband().setEnabled(!P);b.graphHandler.setSelectEnabled(!P);b.graphHandler.setMoveEnabled(!P); | 1 | 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 | safe |
p=-1,t=function(){null!=z?(null!=D&&D(p),p=z(n)):n()};this.drawRuler=t;this.sizeListener=f=u(function(){var y=e.container;l?(y=y.offsetHeight+L,J.height!=y&&(J.height=y,U.style.height=y+"px",t())):(y=y.offsetWidth+L,J.width!=y&&(J.width=y,U.style.width=y+"px",t()))},10);this.pageListener=function(){t()};this.scrollListener=d=u(function(){var y=l?e.container.scrollTop:e.container.scrollLeft;K.lastScroll!=y&&(K.lastScroll=y,t())},10);this.unitListener=function(y,C){K.setUnit(C.getProperty("unit"))}; | 1 | 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 | safe |
mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(v){d.spinner.stop();null!=v?(v=new EmbedDialog(d,'<img src="'+(m.constructor!=DriveFile?v:"https://drive.google.com/uc?id="+m.getId())+'"/>'),d.showDialog(v.container,450,240,!0,!0),v.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(m,v,A,I,g,x){d.spinner.spin(document.body,mxResources.get("loading"))&& | 1 | 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 | safe |
Ba(Editor.parseDiagramNode(ea)));return ea},Ba=function(ea){var ha=ea.getAttribute("background");if(null==ha||""==ha||ha==mxConstants.NONE)ha=D.defaultPageBackgroundColor;u.style.backgroundColor=ha;(new mxCodec(ea.ownerDocument)).decode(ea,D.getModel());D.maxFitScale=1;D.fit(8);D.center();return ea};A.style.display="none";A.innerText="";y=aa;C=ca;K=parseSelectFunction=null;E=0;if("mxfile"==ra.nodeName){aa=ra.getElementsByTagName("diagram");K=[];for(ca=0;ca<aa.length;ca++)K.push(aa[ca]);E=Math.min(L, | 1 | 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 | safe |
encodeURIComponent(x));F(g,x)};Editor.prototype.embedCssFonts=function(g,x){var F=g.split("url("),M=0;null==this.cachedFonts&&(this.cachedFonts={});var Q=mxUtils.bind(this,function(){if(0==M){for(var X=[F[0]],Z=1;Z<F.length;Z++){var Y=F[Z].indexOf(")");X.push('url("');X.push(this.cachedFonts[Editor.trimCssUrl(F[Z].substring(0,Y))]);X.push('"'+F[Z].substring(Y))}x(X.join(""))}});if(0<F.length){for(g=1;g<F.length;g++){var S=F[g].indexOf(")"),W=null,T=F[g].indexOf("format(",S);0<T&&(W=Editor.trimCssUrl(F[g].substring(T+
7,F[g].indexOf(")",T))));mxUtils.bind(this,function(X){if(null==this.cachedFonts[X]){this.cachedFonts[X]=X;M++;var Z="application/x-font-ttf";if("svg"==W||/(\.svg)($|\?)/i.test(X))Z="image/svg+xml";else if("otf"==W||"embedded-opentype"==W||/(\.otf)($|\?)/i.test(X))Z="application/x-font-opentype";else if("woff"==W||/(\.woff)($|\?)/i.test(X))Z="application/font-woff";else if("woff2"==W||/(\.woff2)($|\?)/i.test(X))Z="application/font-woff2";else if("eot"==W||/(\.eot)($|\?)/i.test(X))Z="application/vnd.ms-fontobject";
else if("sfnt"==W||/(\.sfnt)($|\?)/i.test(X))Z="application/font-sfnt";this.mapFontUrl(Z,X,mxUtils.bind(this,function(Y,ba){this.loadUrl(ba,mxUtils.bind(this,function(fa){this.cachedFonts[X]=fa;M--;Q()}),mxUtils.bind(this,function(fa){M--;Q()}),!0,null,"data:"+Y+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(F[g].substring(0,S)),W)}Q()}else x(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(x){this.resolvedFontCss= | 1 | 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 | safe |
(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresponse:",V,"\nresult:",R),this.spinner.stop(),e(R,O,P,N))}),C)}),C,mxUtils.bind(this,function(O){3>n++?t.clear()&&(this.spinner.stop(),p()):C(O)}))}),C);else{var B={message:mxResources.get("error")+" "+G.getStatus()};try{B=JSON.parse(G.getText()),B=B.error}catch(V){}C(B)}}),C)}),k)});p()};EditorUi.prototype.extractMermaidMindmap=function(c){for(0<c[1].indexOf("orientation")&&c.splice(1,1);1<c.length&&""==c[1];)c.splice(1,1); | 1 | 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 | safe |
g[x[F][Q]];null!=S?""!=S&&M.push(S):M.push(x[F][Q])}x[F]=M}};Graph.prototype.getCellsForAction=function(g,x){x=this.getCellsById(g.cells).concat(this.getCellsForTags(g.tags,null,x));if(null!=g.excludeCells){for(var F=[],M=0;M<x.length;M++)0>g.excludeCells.indexOf(x[M].id)&&F.push(x[M]);x=F}return x};Graph.prototype.getCellsById=function(g){var x=[];if(null!=g)for(var F=0;F<g.length;F++)if("*"==g[F]){var M=this.model.getRoot();x=x.concat(this.model.filterDescendants(function(S){return S!=M},M))}else{var Q=
this.model.getCell(g[F]);null!=Q&&x.push(Q)}return x};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(g))};Graph.prototype.setHiddenTags=function(g){this.hiddenTags=g;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(g){var x=mxUtils.indexOf(this.hiddenTags,g);0>x?this.hiddenTags.push(g):0<=x&&this.hiddenTags.splice(x,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; | 1 | 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 | safe |
v,"image(s) from",I.length,"cell(s): ",[I,A])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var m=new mxImageExport,v=q.getGraphBounds(),A=q.view.scale,I=mxUtils.createXmlDocument(),g=I.createElement("output");I.appendChild(g);I=new mxXmlCanvas2D(g);I.translate(Math.floor((1-v.x)/A),Math.floor((1-v.y)/A));I.scale(1/A);var x=0,F=I.save;I.save=function(){x++;
F.apply(this,arguments)};var M=I.restore;I.restore=function(){x--;M.apply(this,arguments)};var Q=m.drawShape;m.drawShape=function(S){mxLog.debug("entering shape",S,x);Q.apply(this,arguments);mxLog.debug("leaving shape",S,x)};m.drawState(q.getView().getState(q.model.root),I);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",x)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex- | 1 | 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 | safe |
ma=oa.substring(0,ia),null==la)){var ka=oa.indexOf("/",ia+1);-1<ka&&(la=oa.substring(ia+1,ka))}ia=Da[ma];null==ia&&(Sa++,ia=[],Da[ma]=ia);oa=ja.getAttribute("clibs");null!=da[oa]&&(oa=da[oa]);oa={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title")||ja.getAttribute("name"),preview:ja.getAttribute("preview"),clibs:oa,tags:ja.getAttribute("tags")};ia.push(oa);null!=la&&(ia=Ea[ma],null==ia&&(ia={},Ea[ma]=ia),ma=ia[la],null==ma&&(ma=[],ia[la]=ma),ma.push(oa))}ja=ja.nextSibling}R(Da,
Ta,Ia)}})}function P(ja){z&&(Ba.scrollTop=0,aa.innerText="",Ga.spin(aa),g=!1,I=!0,ra.innerText=mxResources.get("recentDiag"),Y=null,z(Va,function(){k(mxResources.get("cannotLoad"));Va([])},ja?null:u))}function N(ja){if(""==ja)null!=F&&(F.click(),F=null);else{if(null==TemplatesDialog.tagsList[d]){var da={};for(Ja in Da)for(var la=Da[Ja],ma=0;ma<la.length;ma++){var oa=la[ma];if(null!=oa.tags)for(var ia=oa.tags.toLowerCase().split(";"),ka=0;ka<ia.length;ka++)null==da[ia[ka]]&&(da[ia[ka]]=[]),da[ia[ka]].push(oa)}TemplatesDialog.tagsList[d]= | 1 | 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 | safe |
[N],"{1} ago"));P.setAttribute("title",O.toLocaleDateString()+" "+O.toLocaleTimeString())}function K(O){var P=document.createElement("img");P.className="geCommentBusyImg";P.src=IMAGE_PATH+"/spin.gif";O.appendChild(P);O.busyImg=P}function E(O){O.style.border="1px solid red";O.removeChild(O.busyImg)}function U(O){O.style.border="";O.removeChild(O.busyImg)}function J(O,P,N,H,m){function v(S,W,T){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className= | 1 | 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 | safe |
null,"Templates"),function(){xa.style.display="";pa.style.display="";ha.style.left="160px";X(0);ha.scrollTop=0;ha.innerText="";v=0;S!=Ia&&(Ia=S,ta=W,Ea=T,xa.innerText="",R(),S=null)});Q.push(O);k.appendChild(O);var Z=function(da){xa.style.display="none";pa.style.display="none";ha.style.left="30px";X(da?-1:1);null==S&&(S=Ia);ha.scrollTop=0;ha.innerText="";A.spin(ha);var la=function(ma,oa,ia){v=0;A.stop();Ia=ma;ia=ia||{};var ka=0,wa;for(wa in ia)ka+=ia[wa].length;if(oa)ha.innerText=oa;else if(0==ma.length&&
0==ka)ha.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ha.innerText="",0<ka){xa.style.display="";ha.style.left="160px";xa.innerText="";Ea=0;ta={"draw.io":ma};for(wa in ia)ta[wa]=ia[wa];R()}else t(!0)};da?J(Y.value,la):U(la)};U&&(O=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Z()}),k.appendChild(O),Q.push(O));if(J){O=document.createElement("span");O.style.marginLeft="10px";O.innerText=mxResources.get("search")+":";k.appendChild(O);var Y=document.createElement("input"); | 1 | 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 | safe |
Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var S=document.createElement("tbody"),W=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(L=mxUtils.indexOf(b.pages,b.currentPage));for(J=f.length-1;0<=J;J--){var T=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){c.stop();z.innerText="";var aa=mxUtils.parseXml(ca),ra=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=ra){var za=function(ea){null!=ea&&(ea=
Ba(Editor.parseDiagramNode(ea)));return ea},Ba=function(ea){var ha=ea.getAttribute("background");if(null==ha||""==ha||ha==mxConstants.NONE)ha=D.defaultPageBackgroundColor;u.style.backgroundColor=ha;(new mxCodec(ea.ownerDocument)).decode(ea,D.getModel());D.maxFitScale=1;D.fit(8);D.center();return ea};A.style.display="none";A.innerText="";y=aa;C=ca;K=parseSelectFunction=null;E=0;if("mxfile"==ra.nodeName){aa=ra.getElementsByTagName("diagram");K=[];for(ca=0;ca<aa.length;ca++)K.push(aa[ca]);E=Math.min(L, | 1 | 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 | safe |
"";T.style.textOverflow="";T.style.whiteSpace="";T.style.cursor="text";T.style.color="";T.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(T.style,"user-select","text");T.focus();document.execCommand("selectAll",!1,null);t=function(){T.removeAttribute("contentEditable");T.style.cursor="pointer";X.title=T.innerHTML;I()};mxEvent.consume(fa)}};mxEvent.addListener(T,"click",S);mxEvent.addListener(M,"dblclick",S);c.appendChild(M);mxEvent.addListener(M,"dragstart",function(fa){null==V&&null!= | 1 | 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 | safe |
za.push(ra[Ba]);T.setSelectionCells(za)}function S(ra){T.setHiddenTags(ra?[]:X.slice());Q();T.refresh()}function W(ra,za){Y.innerText="";if(0<ra.length){var Ba=document.createElement("table");Ba.setAttribute("cellpadding","2");Ba.style.boxSizing="border-box";Ba.style.tableLayout="fixed";Ba.style.width="100%";var ea=document.createElement("tbody");if(null!=ra&&0<ra.length)for(var ha=0;ha<ra.length;ha++)(function(pa){function na(){var ta=T.getCellsForTags([pa],null,null,!0);T.isEnabled()?T.setSelectionCells(ta):
T.highlightCells(ta,null,null,70)}var Aa=0>mxUtils.indexOf(T.hiddenTags,pa),Fa=document.createElement("tr"),xa=document.createElement("td");xa.style.align="center";xa.style.width="16px";var Ga=document.createElement("img");Ga.setAttribute("src",Aa?Editor.visibleImage:Editor.hiddenImage);Ga.setAttribute("title",mxResources.get(Aa?"hideIt":"show",[pa]));mxUtils.setOpacity(Ga,Aa?75:25);Ga.style.verticalAlign="middle";Ga.style.cursor="pointer";Ga.style.width="16px";if(x||Editor.isDarkMode())Ga.style.filter= | 1 | 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 | safe |
S[W];S.stroke!=mxConstants.NONE&&null!=S.stroke||delete this.nextShape.options.stroke;S.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};g.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};g.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};g.prototype.fillAndStroke=function(){this.passThrough?
this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};g.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke; | 1 | 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 | safe |
var X=this.fill,Z=this.stroke;this.stroke=this.fill=null;var Y=this.configurePointerEvents,ba=S.setStrokeColor;S.setStrokeColor=function(){};var fa=S.setFillColor;S.setFillColor=function(){};T||null==X||(this.configurePointerEvents=function(){});S.handJiggle.passThrough=!0;M.apply(this,arguments);S.handJiggle.passThrough=!1;S.setFillColor=fa;S.setStrokeColor=ba;this.configurePointerEvents=Y;this.stroke=Z;this.fill=X;S.restore();T&&null!=X&&(S.addTolerance=function(){})}M.apply(this,arguments);S.addTolerance= | 1 | 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 | safe |
l.style.verticalAlign="middle";l.className="geBtn";t.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&t.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(y){if(y.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=y.docs;var C=y.docs[0].url;"application/mxe"==y.docs[0].mimeType||null!=y.docs[0].mimeType&&
"application/vnd.jgraph."==y.docs[0].mimeType.substring(0,23)?C="https://www.draw.io/#G"+y.docs[0].id:"application/vnd.google-apps.folder"==y.docs[0].mimeType&&(C="https://drive.google.com/#folders/"+y.docs[0].id);E.value=C;E.focus()}else LinkDialog.selectedDocs=null;E.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this, | 1 | 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 | safe |
"simple"==Editor.currentTheme&&this.addMenuItems(A,["-","exitGroup","home"],null,g)};var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(A,I,g){if(c.editor.graph.isSelectionEmpty())B.apply(this,arguments),c.menus.addMenuItems(A,["copyAsImage"],null,g);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(A,I,g):this.addPopupMenuArrangeItems(A,I,g),this.addMenuItems(A,"- cut copy copyAsImage duplicate -".split(" "),null,g),this.isShowCellEditItems()||this.addPopupDeleteItem(A,
I,g),this.addMenuItems(A,["lockUnlock","-"],null,g),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(I)&&e.isCellEditable(I)&&(this.addSubmenu("editCell",A,null,mxResources.get("edit")),A.addSeparator(),e.getModel().isEdge(I))){this.addSubmenu("line",A);var x=e.getModel().getGeometry(I);null!=x&&null!=x.points&&0<x.points.length&&this.addMenuItems(A,["clearWaypoints"],null,g)}1==e.getSelectionCount()&&this.addMenuItems(A,["enterGroup"],null,g);x=c.getSelectionState();null!=x.mergeCell?
this.addMenuItem(A,"mergeCells"):(1<x.style.colspan||1<x.style.rowspan)&&this.addMenuItem(A,"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, | 1 | 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 | safe |
null!=l&&l();b.openLink(f,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=z.style.width;u.appendChild(D);mxUtils.br(u);mxUtils.br(u);mxUtils.write(u,mxResources.get("allowPopups"));this.container=u},ImageDialog=function(b,f,l,d,q,u,z,D){function L(){0<U.value.length?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}u=null!=u?u:!0;var K=b.editor.graph,E=document.createElement("div");mxUtils.write(E,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor= | 1 | 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 | safe |
function(){function S(){D(O,g,function(){K(g);O.editComment(O.content,function(){U(g)},function(W){E(g);S();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},O.isResolved),v(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(g);O.deleteComment(function(S){if(!0===S){S=g.querySelector(".geCommentTxt");S.innerText="";mxUtils.write(S,mxResources.get("msgDeleted"));var W=g.querySelectorAll(".geCommentAction");for(S= | 1 | 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 | safe |
function(R){return"page"==R&&null!=G&&null!=G[C]?G[C].getAttribute("name"):"pagenumber"==R?C+1:"pagecount"==R?null!=G?G.length:1:B.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)): | 1 | 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 | safe |
!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(C,G){var B=
!1;this.active||(t.call(this,C),this.active=!0,null!=G&&(n&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),B=document.createElement("div"),B.style.position="absolute",B.style.whiteSpace="nowrap",B.style.background="#4B4243",B.style.color="white",B.style.fontFamily=Editor.defaultHtmlFont,B.style.fontSize="9pt",B.style.padding="6px",B.style.paddingLeft="10px",B.style.paddingRight="10px",B.style.zIndex=2E9,B.style.left=Math.max(0,
c)+"px",B.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=G.substring(G.length-3,G.length)&&"!"!=G.charAt(G.length-1)&&(G+="..."),B.innerHTML=G,C.appendChild(B),p.status=B),this.pause=mxUtils.bind(this,function(){var V=function(){};this.active&&(V=mxUtils.bind(this,function(){this.spin(C,G)}));this.stop();
return V}),B=!0);return B};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< | 1 | 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 | safe |
"text/xml"):this.handleError({message:mxResources.get(413==Y.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):Z(I,g)}}));A.stopPropagation();A.preventDefault()})),mxEvent.addListener(G,"dragleave",function(A){G.style.cursor="";G.style.backgroundColor="";A.stopPropagation();A.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title", | 1 | 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 | safe |
I,g,x,F){u=mxEvent.isAltDown(k)?u:t.getCenterInsertPoint(new mxRectangle(0,0,x,F));var M=null;t.getModel().beginUpdate();try{M="txt"==I?b.insertAsPreText(g,u.x,u.y):t.insertVertex(null,null,null,u.x,u.y,x,F,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(g)+";"),t.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:A,format:I},null,2))}finally{t.getModel().endUpdate()}null!=M&&(t.setSelectionCell(M),t.scrollCellToVisible(M))},t=b.editor.graph,y="plantUmlTxt"== | 1 | 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 | safe |
this.createDarkStyle();this.createTimeout(null,mxUtils.bind(this,function(t){p.onerror=mxUtils.bind(this,function(y){t.clear()&&k(Error(mxResources.get("errorLoadingFile")+" "+p.getAttribute("href")))});p.onload=mxUtils.bind(this,function(){t.clear()&&(this.darkStyle=p,n())});document.getElementsByTagName("head")[0].appendChild(p)}),mxUtils.bind(this,function(){k(Error(mxResources.get("timeout")+" "+p.getAttribute("href")))}))}};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=
c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles=c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate, | 1 | 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 | safe |
this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){k.innerHTML=" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck", | 1 | 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 | safe |
mxUtils.write(v,mxResources.get("showStartScreen"));mxEvent.addListener(v,"click",function(I){mxEvent.getSource(I)!=m&&(m.checked=!m.checked)});header=v}v=[[mxResources.get("reset"),function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(I){d.handleError(I)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var A=d.actions.get("plugins");null==A||"sketch"!= | 1 | 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 | safe |
return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,k,n,p,t,y,C,G,B,V,R,O,P,N,H){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,k,n,p,t,y,C,G,B,V,R,O,P,N,H)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(c,e,k,n)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,k,n){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,k,n)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32"); | 1 | 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 | safe |
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(H){return k.isVertex(H)&&u(H)}function q(H){var m=!1;null!=H&&(m="1"== | 1 | 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 | safe |
6)this.curveTo(fa[ca],fa[ca+1],fa[ca+2],fa[ca+3],fa[ca+4],fa[ca+5]);this.lastX=Y;this.lastY=ba}};g.prototype.rect=function(S,W,T,X){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(S,W,T,X,this.getStyle(!0,!0)))};g.prototype.ellipse=function(S,W,T,X){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(S+T/2,W+X/2,T,X,this.getStyle(!0,!0)))};g.prototype.roundrect= | 1 | 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 | safe |
!1,!0)}finally{G.model.endUpdate()}}}catch(I){if(p)throw I;this.handleError(I)}return C};EditorUi.prototype.updatePageLinks=function(c,e){for(var k=0;k<e.length;k++)this.updatePageLinksForCell(c,e[k].root),null!=e[k].viewState&&this.updateBackgroundPageLink(c,e[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var k=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=k&&(e.originalSrc="data:page/id,"+ | 1 | 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 | safe |
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 Q=0;Q<M;Q++)g=Editor.crcTable[(g^x.charCodeAt(F+Q))&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,Q){function S(Y,ba){var fa=X;X+=ba;return Y.substring(fa,X)}function W(Y){Y=S(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+ | 1 | 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 | safe |
allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,k=this.remoteInvokeCallbacks[e.callbackId];if(null==
k)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,k,n,p){var t=!0,y=window.setTimeout(mxUtils.bind(this,function(){t=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(y);t&&n.apply(this,arguments)}),G=mxUtils.bind(this,function(){window.clearTimeout(y); | 1 | 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 | safe |
DrawioFile.prototype.sendErrorReport=function(b,f,l,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),u=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),z=this.getCurrentUser(),D=null!=z?this.ui.hashValue(z.id):"unknown",L=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),E=K.lastIndexOf(".");z="xml";0<E&&(z=K.substring(E));var U=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+z+")\nUser="+D+L+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+U+"\n\nShadow:\n"+q+"\n\nData:\n"+u,d)}catch(J){}}; | 1 | 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 | safe |
Math.min(T,Math.max(parseInt(fa.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(T,Math.min(parseInt(fa.value),parseInt(ba.value))))}function M(Ta){function Ka(ya,La,Ca,va){var Ma=ya.useCssTransforms,Oa=ya.currentTranslate,Xa=ya.currentScale,Qa=ya.view.translate,Ra=ya.view.scale;ya.useCssTransforms&&(ya.useCssTransforms=!1,ya.currentTranslate=new mxPoint(0,0),ya.currentScale=1,ya.view.translate=new mxPoint(0,0),ya.view.scale=1);var Pa=ya.getGraphBounds(),Na=0,Ya=0,Wa=Da.get(),ab=1/ya.pageScale,
$a=Ba.checked;if($a){ab=parseInt(ta.value);var gb=parseInt(ua.value);ab=Math.min(Wa.height*gb/(Pa.height/ya.view.scale),Wa.width*ab/(Pa.width/ya.view.scale))}else ab=parseInt(za.value)/(100*ya.pageScale),isNaN(ab)&&(Sa=1/ya.pageScale,za.value="100 %");Wa=mxRectangle.fromRectangle(Wa);Wa.width=Math.ceil(Wa.width*Sa);Wa.height=Math.ceil(Wa.height*Sa);ab*=Sa;!$a&&ya.pageVisible?(Pa=ya.getPageLayout(),Na-=Pa.x*Wa.width,Ya-=Pa.y*Wa.height):$a=!0;va=null!=va?"page/id,"+va:null;if(null==La){La=PrintDialog.createPrintPreview(ya, | 1 | 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 | safe |
0;za<this.customFonts.length;za++)if(this.customFonts[za].name==ca){ra=!1;break}ra&&(this.customFonts.push({name:ca,url:aa}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{T.getModel().endUpdate()}}}));this.editorUi.showDialog(Z.container,380,Editor.enableWebFonts?250:180,!0,!0);Z.init()}),v,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")}; | 1 | 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 | safe |
b.container.style.cursor=P?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){y(!0)};this.isDrawing=function(){return e};var C=mxUtils.bind(this,function(P){if(d){var N=D.length,H=k&&0<z.length&&null!=D&&2>D.length;H||z.push.apply(z,D);D=[];z.push(null);q.push(d);d=null;(H||E)&&this.stopDrawing();E&&(!H||2<=N)&&this.startDrawing();mxEvent.consume(P)}}),G=new mxCell;G.edge=!0;var B=function(){var P=b.getCurrentCellStyle(G);P=mxUtils.getValue(b.currentVertexStyle, | 1 | 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 | safe |
TEMPLATE_PATH+"/"+Oa,mxUtils.get(Oa,mxUtils.bind(this,function(Wa){200<=Wa.getStatus()&&299>=Wa.getStatus()&&(Ma=Wa.getText());Ya(Ma,Oa)}))):Ya(Ma,Oa)}function Ca(Na,Ya){if(null==da||x||b.sidebar.currentElt==va)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=F){var Wa="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+F.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+F.naturalWidth+
'" height="'+F.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";y(Wa,mxEvent.getClientX(Na),mxEvent.getClientY(Na),ma,da)}else b.sidebar.currentElt=va,x=!0,La(da,function(ab){x&&b.sidebar.currentElt==va&&y(ab,mxEvent.getClientX(Na),mxEvent.getClientY(Na),va,Ya);x=!1})}var va=document.createElement("div");va.className="geTemplate geAdaptiveAsset";va.style.position="relative";va.style.height=Ga+"px";va.style.width=qa+"px";va.style.border="1px solid transparent"; | 1 | 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 | safe |
Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,k,n,p,t,y){c=new ImageDialog(this,c,e,k,n,p,t,y);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,k,n,p,t){var y=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=y?JSON.stringify(JSON.parse(y),null,2):"",mxUtils.bind(this,function(C){if(null!=C)try{if(null!=t&&t(C),C==y)this.hideDialog(); | 1 | 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 | safe |
""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=n?n:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var e=this.editor.graph; | 1 | 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 | safe |
new mxRectangle(g.x+g.width-4*F,g.y+4*F,0,0):mxRectangle.fromPoint(g.view.getPoint(g));x.bounds.equals(g)&&x.value==M&&x.scale==F||(x.bounds=g,x.value=M,x.scale=F,x.redraw())}};var R=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){R.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var g=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||
"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",
g.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,g.ownerSVGElement))}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){O.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var P=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){P.apply(this, | 1 | 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 | safe |
n,"\nvalue:",c,"\ntext:",e);return e};EditorUi.prototype.removeMermaidComments=function(c){c=c.split("\n");for(var e=[],k=0;k<c.length;k++)"%%"!=c[k].substring(0,2)&&e.push(c[k]);return e.join("\n")};EditorUi.prototype.generateMermaidImage=function(c,e,k,n,p){c=this.removeMermaidComments(c);var t=mxUtils.bind(this,function(C){this.loadingMermaid=!1;null!=n?n(C):this.handleError(C)}),y=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig); | 1 | 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 | safe |
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,q=[],u,z=[],D,L=!1,K=!0,E=!0,U=!0,J=!0,c=[],e=!1,k=!1,n=!1,p={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},t=!0;this.setClosedPath=function(P){L=P};this.setAutoClose=function(P){K=P};this.setAutoInsert= | 1 | 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 | safe |
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(N,H,m){N=new mxCell("",new mxGeometry(N,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");N.vertex=!0;N.cp=!0;N.constObj=m;return U.addCell(N)}function z(N){N=U.getSelectionCells();U.deleteCells(N)} | 1 | 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 | safe |
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)}; | 1 | 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 | safe |
function(B){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";e.style.visibility="hidden";c.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var k=e.clipboardData||e.originalEvent.clipboardData,n=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){n=!0;break}if(!n){var t=k.items;for(index in t){var y=t[index];if("file"===y.kind){if(c.isEditing())this.importFiles([y.getAsFile()],0,0,this.maxImageSize,function(G,B,V,R,O,P){c.insertImage(G,O,P)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var B=0;B<G.length;B++)G[B]()});else{var C=
this.editor.graph.getInsertPoint();this.importFiles([y.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(G){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){k.innerHTML=" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck", | 1 | 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 | safe |
la=Ha;ia++}0==Ja.length?ra.innerText=mxResources.get("noResultsFor",[ja]):B(Ja,!0)}}function H(ja){if(Y!=ja||W!=ba)n(),Ba.scrollTop=0,aa.innerText="",ra.innerText=mxResources.get("searchResults")+' "'+ja+'"',Ua=null,fa?N(ja):D&&(ja?(Ga.spin(aa),g=!1,I=!0,D(ja,Va,function(){k(mxResources.get("searchFailed"));Va([])},W?null:u)):P(W)),Y=ja,ba=W}function m(ja){null!=Ua&&clearTimeout(Ua);13==ja.keyCode?H(Fa.value):Ua=setTimeout(function(){H(Fa.value)},1E3)}var v='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+ | 1 | 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 | safe |
Da;var Ea=ba.gridSize*ta.gridSteps*T,Ta=ba.getGraphBounds(),Ka=ta.translate.x*ua,Sa=ta.translate.y*ua,Ia=Ka+(Ta.x-Ka)/ua-fa,Va=Sa+(Ta.y-Sa)/ua-fa,Ua=new Image;Ua.onload=function(){try{for(var ja=-Math.round(Ea-mxUtils.mod((Ka-Ia)*T,Ea)),da=-Math.round(Ea-mxUtils.mod((Sa-Va)*T,Ea));ja<xa;ja+=Ea)for(var la=da;la<Ga;la+=Ea)qa.drawImage(Ua,ja/T,la/T);Aa()}catch(ma){null!=Q&&Q(ma)}};Ua.onerror=function(ja){null!=Q&&Q(ja)};Ua.src=Da}else Aa()}catch(ja){null!=Q&&Q(ja)}});pa.onerror=function(Aa){null!=Q&&
Q(Aa)};Z&&this.graph.addSvgShadow(ha);this.graph.mathEnabled&&this.addMathCss(ha);var na=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(ha,this.resolvedFontCss),pa.src=Editor.createSvgDataUri(mxUtils.getXml(ha))}catch(Aa){null!=Q&&Q(Aa)}});this.embedExtFonts(mxUtils.bind(this,function(Aa){try{null!=Aa&&this.addFontCss(ha,Aa),this.loadFonts(na)}catch(Fa){null!=Q&&Q(Fa)}}))}catch(Aa){null!=Q&&Q(Aa)}}),F,Y)}catch(ha){null!=Q&&Q(ha)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var u= | 1 | 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 | safe |
JSON.parse(x.substring(17));null!=F.actions&&(this.updateCustomLinkActions(g,F.actions),x="data:action/json,"+JSON.stringify(F))}catch(M){}return x};Graph.prototype.updateCustomLinkActions=function(g,x){for(var F=0;F<x.length;F++){var M=x[F],Q;for(Q in M)this.updateCustomLinkAction(g,M[Q],"cells"),this.updateCustomLinkAction(g,M[Q],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(g,x,F){if(null!=x&&null!=x[F]){for(var M=[],Q=0;Q<x[F].length;Q++)if("*"==x[F][Q])M.push(x[F][Q]);else{var S= | 1 | 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 | safe |
EditorUi.prototype.getPngFileProperties=function(c){var e=1,k=0;if(null!=c){if(c.hasAttribute("scale")){var n=parseFloat(c.getAttribute("scale"));!isNaN(n)&&0<n&&(e=n)}c.hasAttribute("border")&&(n=parseInt(c.getAttribute("border")),!isNaN(n)&&0<n&&(k=n))}return{scale:e,border:k}};EditorUi.prototype.getEmbeddedPng=function(c,e,k,n,p){try{var t=this.editor.graph,y=null!=t.themes&&"darkTheme"==t.defaultThemeName,C=null;if(null!=k&&0<k.length)t=this.createTemporaryGraph(y?t.getDefaultStylesheet():t.getStylesheet()), | 1 | 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 | safe |
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 Q=0;Q<M;Q++)g=Editor.crcTable[(g^x.charCodeAt(F+Q))&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,Q){function S(Y,ba){var fa=X;X+=ba;return Y.substring(fa,X)}function W(Y){Y=S(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+ | 1 | 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 | safe |
[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=k)for(p=0;p<k.length;p++)e.model.execute(new ChangePage(this,k[p],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,k,n,p,t,y,C,G,B,V){e=null!=e?e:this.editor.graph;p=null!=p?p:!1;G=null!=G?G:!0;V=null!= | 1 | 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 | safe |
Editor.selectFilename=function(a){var b=a.value.lastIndexOf(".");if(0<b){var e=a.value.substring(b+1);"drawio"!=e&&0<=mxUtils.indexOf(["png","svg","html","xml","pdf"],e)&&(e=a.value.lastIndexOf(".drawio.",b),0<e&&(b=e))}b=0<b?b:a.value.length;Editor.selectSubstring(a,0,b)}; | 1 | 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 | safe |
g);mxEvent.addListener(this.container,"mousemove",g);mxEvent.addListener(this.container,"mouseleave",function(Q){x=null});this.isMouseInsertPoint=function(){return null!=x};var F=this.getInsertPoint;this.getInsertPoint=function(){return null!=x?this.getPointForEvent(x):F.apply(this,arguments)};var M=this.layoutManager.getLayout;this.layoutManager.getLayout=function(Q){var S=this.graph.getCellStyle(Q);if(null!=S&&"rack"==S.childLayout){var W=new mxStackLayout(this.graph,!1);W.gridSize=null!=S.rackUnitSize? | 1 | 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 | safe |
this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,S,W,T,X),this.lastX=T,this.lastY=X)};g.prototype.curveTo=function(S,W,T,X,Z,Y){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,S,W,T,X,Z,Y),this.lastX=Z,this.lastY=Y)};g.prototype.arcTo=function(S,W,T,X,Z,Y,ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,S,W,T,X,Z,Y,ba);if(null!=fa)for(var ca=0;ca<fa.length;ca+= | 1 | 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 | safe |
"none",c.style.display="none");var n=document.createElement("option"),p=!1,t=!1,y=function(H,m){p||null!=H&&t||(U.checked?null!=m&&m(n.selected?null:c.value):""==J.value||b.isOffline()?(G.value="",B.value="",null!=m&&m("")):(J.value=mxUtils.trim(J.value),b.loadImage(J.value,function(v){G.value=v.width;B.value=v.height;null!=m&&m(J.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));G.value="";B.value="";null!=m&&m(null)})))},C=mxUtils.bind(this, | 1 | 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 | safe |
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 Q=[];if(null!=g){x=null!=x?x:this.model.getDescendants(this.model.getRoot());for(var S=0,W={},T=0;T<g.length;T++)0<g[T].length&&(W[g[T]]=!0,S++);for(T=0;T<x.length;T++)if(F&&this.model.getParent(x[T])==
this.model.root||this.model.isVertex(x[T])||this.model.isEdge(x[T])){var X=this.getTagsForCell(x[T]),Z=!1;if(0<X.length&&(X=X.split(" "),X.length>=g.length)){for(var Y=Z=0;Y<X.length&&Z<S;Y++)null!=W[X[Y]]&&Z++;Z=Z==S}Z&&(1!=M||this.isCellVisible(x[T]))&&Q.push(x[T])}}return Q};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 Q=this.getTagsForCell(g[M]); | 1 | 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 | safe |
"keys",Ea,"values",Ta,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}function Q(qa,ta,ua){var Da=mxUtils.getOffset(g,!0),Ea=mxUtils.getOffset(qa,!0);ta.style.position="absolute";ta.style.left=Ea.x-Da.x+"px";ta.style.top=Ea.y-Da.y+"px";ta.style.width=qa.offsetWidth+"px";ta.style.height=qa.offsetHeight-(ua?4:0)+"px";ta.style.zIndex=5}function S(qa,ta,ua){var Da=document.createElement("div");Da.style.width="32px";Da.style.height="4px";Da.style.margin="2px";Da.style.border="1px solid black"; | 1 | 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 | safe |
c.name):k()}):G||k()}},function(t){k(t)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p,null,null,null,k))};EditorUi.prototype.importFile=function(c,e,k,n,p,t,y,C,G,B,V,R){B=null!=B?B:!0;var O=!1,P=null,N=mxUtils.bind(this,function(H){var m=null;null!=H&&"<mxlibrary"==H.substring(0,10)?this.loadLibrary(new LocalLibrary(this,H,y)):m=this.importXml(H,k,n,B,null,null!=R?mxEvent.isControlDown(R):null);null!=
C&&C(m)});"image"==e.substring(0,5)?(G=!1,"image/png"==e.substring(0,9)&&(e=V?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(P=this.importXml(e,k,n,B,null,null!=R?mxEvent.isControlDown(R):null),G=!0)),G||(e=this.editor.graph,G=c.indexOf(";"),0<G&&(c=c.substring(0,G)+c.substring(c.indexOf(",",G+1))),B&&e.isGridEnabled()&&(k=e.snap(k),n=e.snap(n)),P=[e.insertVertex(null,null,"",k,n,p,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
c+";")])):/(\.*<graphml )/.test(c)?(O=!0,this.importGraphML(c,N)):null!=G&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?(O=!0,this.importVisio(G,N)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(O=!0,p=mxUtils.bind(this,function(H){4==H.readyState&&(200<=H.status&&299>=H.status?N(H.responseText):null!=C&&(C(null),this.showError(mxResources.get("error"),413==H.status? | 1 | 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 | safe |
Q.setAttribute("crossorigin","");x.parentNode.insertBefore(Q,x)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var x=[],F=0;F<g;F++)x.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length))); | 1 | 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 | safe |
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,C=Math.min(y+1024,k),G=Array(C-y),B=0;y<C;++B,++y)G[B]=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,C){t=null!=t?t:!1;y=null!=y?
y:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);var G=mxUtils.bind(this,function(V,R,O,P){try{if("_blank"==R)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,n);else if(null!=k&&"text/html"==k.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var H=window.open("about:blank");null==H?mxUtils.popup(c,!0):(H.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),H.document.close())}else if(R==App.MODE_DEVICE||"download"==
R)this.doSaveLocalFile(c,V,k,n,null,C);else if(null!=V&&0<V.length){var m=mxUtils.bind(this,function(v){try{this.exportFile(c,V,k,n,R,v)}catch(A){this.handleError(A)}});null!=P?m(P):this.pickFolder(R,m)}}catch(v){this.handleError(v)}});if("1"==urlParams["save-dialog"])p=[],t||p.push(App.MODE_BROWSER),y||p.push("_blank"),e=new SaveDialog(this,e,mxUtils.bind(this,function(V,R,O){G(V.value,R,V,O);this.hideDialog()}),p,c,k,n),this.showDialog(e.container,420,100,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));
else{p=this.getServiceCount(t);isLocalStorage&&p++;var B=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,G,mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,y,null,1<p,B,c,k,n);t=this.isServices(p)?p>B?390:280:160;this.showDialog(e.container,420,t,!0,!0)}e.init()};EditorUi.prototype.openInNewWindow=function(c,e,k){var n=window.open("about:blank");null==n||null==n.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e|| | 1 | 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 | safe |
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,p){var t=this.editor.graph,y=null;t.lastPasteXml==c?t.pasteCounter++:(t.lastPasteXml= | 1 | 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 | safe |
EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display=
"none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(y,C){StorageFile.listFiles(this,"F",y,C)});window.openBrowserFile=mxUtils.bind(this,function(y,C,G){StorageFile.getFileContent(this,y,C,G)});window.deleteBrowserFile=mxUtils.bind(this,function(y,C,G){StorageFile.deleteFile(this,y,C,G)});if(!e){var n=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=
new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(y=new Blob([y],{type:"application/octet-stream"}),this.importVisio(y,mxUtils.bind(this,function(G){this.importXml(G,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(y,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
function(){window.openFile=null});if(!e){var p=this.dialog,t=p.close;this.dialog.close=mxUtils.bind(this,function(y){Editor.useLocalStorage=n;t.apply(p,arguments);y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,e,k){var n=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))k();else{var y=0,C,G=!1;t.forEach(function(B,V){B= | 1 | 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 | safe |
64);EditorUi.initTheme=function(){"atlas"==Editor.currentTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"==Editor.currentTheme&&(Editor.configurationKey=".sketch-configuration",
Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,k,n,p,t,y){c=new ImageDialog(this,c,e,k,n,p,t,y);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,k,n,p,t){var y=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=y?JSON.stringify(JSON.parse(y),null,2):"",mxUtils.bind(this,function(C){if(null!=C)try{if(null!=t&&t(C),C==y)this.hideDialog(); | 1 | 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 | safe |
Editor.extractGraphModelFromXref(S));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!= | 1 | 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 | safe |
function(g,x,F,M,Q,S,W,T,X,Z){if(null!=F&&null==mxMarker.markers[F]){var Y=this.getPackageForType(F);null!=Y&&mxStencilRegistry.getStencil(Y)}return H.apply(this,arguments)};var m=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(g,x,F,M,Q,S){"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, | 1 | 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 | safe |
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;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var k in c)e.push(k);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function k(y){if(null!=y){var C=y.lastIndexOf(".");0<C&&(y=y.substring(C+1,y.length));null==e[y]&&(e[y]=!0)}}var n=this.editor.graph,p=n.getCellStyle(c);k(mxStencilRegistry.getBasenameForStencil(p[mxConstants.STYLE_SHAPE]));n.model.isEdge(c)&& | 1 | 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 | safe |
g);x[0].parentNode.appendChild(S)}}};Editor.prototype.csvToArray=function(g){if(0<g.length){var x="",F=[""],M=0,Q=!0,S;g=$jscomp.makeIterator(g);for(S=g.next();!S.done;S=g.next())S=S.value,'"'===S?(Q&&S===x&&(F[M]+=S),Q=!Q):","===S&&Q?S=F[++M]="":F[M]+=S,x=S;return F}return[]};Editor.prototype.getProxiedUrl=function(g){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(g)){var x=/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g);
x=/\.png$/i.test(g)||/\.pdf$/i.test(g)||x;var F="t="+(new Date).getTime();g=PROXY_URL+"?url="+encodeURIComponent(g)+"&"+F+(x?"&base64=1":"")}return g};Editor.prototype.isCorsEnabledForUrl=function(g){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||g.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(g)||"https://raw.githubusercontent.com/"=== | 1 | 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 | safe |
arguments);null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var z=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(J,c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?J.firstChild.nextSibling.setAttribute("title",
c.shortcut):z.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(J){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=J?J:!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(); | 1 | 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 | safe |
this.model.getCell(g[F]);null!=Q&&x.push(Q)}return x};var N=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return N.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(g))};Graph.prototype.setHiddenTags=function(g){this.hiddenTags=g;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(g){var x=mxUtils.indexOf(this.hiddenTags,g);0>x?this.hiddenTags.push(g):0<=x&&this.hiddenTags.splice(x,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))}; | 1 | 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 | safe |
Q.setAttribute("crossorigin","");x.parentNode.insertBefore(Q,x)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(g){g=null!=g?g:Editor.GUID_LENGTH;for(var x=[],F=0;F<g;F++)x.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));
return x.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)", | 1 | 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 | safe |
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,C,G,B,V,R,O){G=null!=G?G:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var P=this.editor.graph.isSelectionEmpty();k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,
function(N){this.spinner.stop();try{this.saveCanvas(N,p?this.getFileData(!0,null,null,null,k,C):null,G,null==this.pages||0==this.pages.length,V)}catch(H){this.handleError(H)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){this.spinner.stop();this.handleError(N)}),null,k,c||1,e,n,null,null,t,y,B,R,O)}catch(N){this.spinner.stop(),this.handleError(N)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c, | 1 | 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 | safe |
46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var q=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(J){q.apply(this,
arguments);null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var z=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(J,c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?J.firstChild.nextSibling.setAttribute("title", | 1 | 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 | safe |
App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)}; | 1 | 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 | safe |
function(P){E=P};this.setAutoScroll=function(P){U=P};this.setOpenFill=function(P){J=P};this.setStopClickEnabled=function(P){k=P};this.setSelectInserted=function(P){n=P};this.setSmoothing=function(P){l=P};this.setPerfectFreehandMode=function(P){t=P};this.isPerfectFreehandMode=function(){return t};this.setBrushSize=function(P){p.size=P};this.getBrushSize=function(){return p.size};var y=function(P){e=P;b.getRubberband().setEnabled(!P);b.graphHandler.setSelectEnabled(!P);b.graphHandler.setMoveEnabled(!P);
b.container.style.cursor=P?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){y(!0)};this.isDrawing=function(){return e};var C=mxUtils.bind(this,function(P){if(d){var N=D.length,H=k&&0<z.length&&null!=D&&2>D.length;H||z.push.apply(z,D);D=[];z.push(null);q.push(d);d=null;(H||E)&&this.stopDrawing();E&&(!H||2<=N)&&this.startDrawing();mxEvent.consume(P)}}),G=new mxCell;G.edge=!0;var B=function(){var P=b.getCurrentCellStyle(G);P=mxUtils.getValue(b.currentVertexStyle, | 1 | 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 | safe |
"4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(T=function(){ba.isEnabled()?(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",T),y.addListener("enabledChanged",T),T());return ca}function e(T,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px"; | 1 | 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 | safe |
function(){window.clearTimeout(M);F&&x(Editor.svgBrokenImage.src)});else{var Q=new Image;this.crossOriginImages&&(Q.crossOrigin="anonymous");Q.onload=function(){window.clearTimeout(M);if(F)try{var S=document.createElement("canvas"),W=S.getContext("2d");S.height=Q.height;S.width=Q.width;W.drawImage(Q,0,0);x(S.toDataURL())}catch(T){x(Editor.svgBrokenImage.src)}};Q.onerror=function(){window.clearTimeout(M);F&&x(Editor.svgBrokenImage.src)};Q.src=g}}catch(S){x(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages= | 1 | 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 | safe |
t&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:G});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var k=mxUtils.bind(this,function(B,V){var R={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=V?R.error={errResp:V}:null!=B&&(R.resp=
B);this.remoteWin.postMessage(JSON.stringify(R),"*")});try{var n=c.funtionName,p=this.remoteInvokableFns[n];if(null!=p&&"function"===typeof this[n]){if(p.allowedDomains){for(var t=!1,y=0;y<p.allowedDomains.length;y++)if(e=="https://"+p.allowedDomains[y]){t=!0;break}if(!t){k(null,"Invalid Call: "+n+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)||(C=[]);if(p.isAsync)C.push(function(){k(Array.prototype.slice.apply(arguments))}),C.push(function(B){k(null,B||"Unkown Error")}),this[n].apply(this,
C);else{var G=this[n].apply(this,C);k([G])}}else k(null,"Invalid Call: "+n+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var n=k.open("database",2);n.onupgradeneeded=function(p){try{var t=n.result;1>p.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>p.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}), | 1 | 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 | safe |
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.setGraphDarkMode=function(c,e,k){c.view.defaultGridColor=k?mxGraphView.prototype.defaultDarkGridColor: | 1 | 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 | safe |
2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(y.responseType="blob");y.onload=function(C){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(B){var V=new Image;V.onload=function(){try{var R=V.width,O=V.height;if(0==R&&0==O){var P=G.result,N=P.indexOf(","),H=decodeURIComponent(escape(atob(P.substring(N+1)))),m=mxUtils.parseXml(H).getElementsByTagName("svg");0<m.length&&(R=parseFloat(m[0].getAttribute("width")),
O=parseFloat(m[0].getAttribute("height")))}k(G.result,R,O)}catch(v){n(v)}};V.src=G.result};G.onerror=function(B){n(B)}}else n(C)};y.onerror=function(C){n(C)};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, | 1 | 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 | safe |
f.appendChild(U);f.appendChild(l);E.appendChild(f);var J=D,c,e,k=function(y,C,G,B){var V="data:"==y.substring(0,5);!b.isOffline()||V&&"undefined"===typeof chrome?0<y.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(y,function(R){b.spinner.stop();b.hideDialog();var O=!1===B?1:null!=C&&null!=G?Math.max(C/R.width,G/R.height):Math.min(1,Math.min(520/R.width,520/R.height));u&&(y=b.convertDataUri(y));d(y,Math.round(Number(R.width)*O),Math.round(Number(R.height)*O),J,c,e)},
function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(y,null,null,J,c,e)):(y=b.convertDataUri(y),C=null==C?120:C,G=null==G?100:G,b.hideDialog(),d(y,C,G,J,c,e))},n=function(y,C){if(null!=y){var G=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=G?k(y,G.width,G.height,C):k(y,null,null,C)}else b.hideDialog(),d(null)};this.init=function(){U.focus();if(Graph.fileSupport){U.setAttribute("placeholder", | 1 | 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 | safe |
v,"image(s) from",I.length,"cell(s): ",[I,A])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var m=new mxImageExport,v=q.getGraphBounds(),A=q.view.scale,I=mxUtils.createXmlDocument(),g=I.createElement("output");I.appendChild(g);I=new mxXmlCanvas2D(g);I.translate(Math.floor((1-v.x)/A),Math.floor((1-v.y)/A));I.scale(1/A);var x=0,F=I.save;I.save=function(){x++; | 1 | 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 | safe |
L;this.okButton=q;this.container=J},TemplatesDialog=function(b,f,l,d,q,u,z,D,L,K,E,U,J,c,e){function k(ja){xa.innerText=ja;xa.style.display="block";setTimeout(function(){xa.style.display="none"},4E3)}function n(){null!=x&&(x.style.fontWeight="normal",x.style.textDecoration="none",F=x,x=null)}function p(ja,da,la,ma,oa,ia,ka){if(-1<ja.className.indexOf("geTempDlgRadioBtnActive"))return!1;ja.className+=" geTempDlgRadioBtnActive";A.querySelector(".geTempDlgRadioBtn[data-id="+ma+"]").className="geTempDlgRadioBtn "+ | 1 | 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 | safe |
"cells",[N])),b.fireEvent(new mxEventObject("freehandInserted","cell",N))}finally{b.model.endUpdate()}n&&b.setSelectionCells([N])}}for(N=0;N<q.length;N++)q[N].parentNode.removeChild(q[N]);d=null;q=[];z=[]}y(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(P,N){P=N.getProperty("eventName");N=N.getProperty("event");P==mxEvent.MOUSE_MOVE&&e&&(null!=N.sourceState&&N.sourceState.setCursor("crosshair"),N.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(P,N){if(b.isEnabled()&& | 1 | 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 | safe |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.