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
function(la){try{f(la.target.result)}catch(X){M({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ma)}else this.doImportVisio(ma,f,M,u)}catch(la){M(la)}else try{""==ia.responseType||"text"==ia.responseType?M({message:ia.responseText}):(aa=new FileReader,aa.onload=function(){try{M({message:JSON.parse(aa.result).Message})}catch(la){M(la)}},aa.readAsText(ia.response))}catch(la){M({})}});ia.send(H)}else if(F.clear())try{this.doImportVisio(d,f,M,u)}catch(ma){M(ma)}}else M({message:mxResources.get("serviceUnavailableOrBlocked")})});
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var L=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.generateMermaidImage(da,null,mxUtils.bind(this,function(ca,ia,ma){this.tryAndHandle(mxUtils.bind(this,function(){B.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresponse:",ja,"\nresult:",da),this.spinner.stop(),f(da,ca,ia,ma))}),M)}),M,mxUtils.bind(this,function(ca){3>u++?B.clear()&&(this.spinner.stop(),A()):M(ca)}))}),M);else{var H={message:mxResources.get("error")+" "+O.getStatus()};try{H=JSON.parse(O.getText()),H=H.error}catch(ja){}M(H)}}),M)}),l)});A()};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(A){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,l,u,A,B,F){A=null!=A?A:this.maxImageSize;var M=Math.max(1,d.width),O=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=F?F:f.length,B))try{var H= Math.max(M/A,O/A);if(1<H){var ja=Math.round(M/H),da=Math.round(O/H),ca=document.createElement("canvas");ca.width=ja;ca.height=da;ca.getContext("2d").drawImage(d,0,0,ja,da);var ia=ca.toDataURL();if(ia.length<f.length){var ma=document.createElement("canvas");ma.width=ja;ma.height=da;var aa=ma.toDataURL();ia!==aa&&(f=ia,M=ja,O=da)}}}catch(la){}l(f,M,O)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,l){try{var u=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function V(){mxShape.call(this)}function d(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function f(){mxActor.call(this)}function l(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round");
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
B=mxEvent.getClientX(H);u.popupMenuHandler.hideMenu();mxEvent.consume(H)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(H){var ja=!1;null!=B&&(this.diagramContainer.style.width=Math.max(20,M+mxEvent.getClientX(H)-B)+"px",ja=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,O+mxEvent.getClientY(H)-F)+"px",ja=!0);ja&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}), "*"),this.inlineSizeChanged(),this.refresh())}),function(H){null==B&&null==F||mxEvent.consume(H);F=B=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";d.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(H){this.inlineSizeChanged();
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return B},getTarget:function(){return u.value},focus:function(){u.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,l,u,A,B,F){F=null!=F?F:[];u&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=A&&0<A.length&& F.push("edit="+encodeURIComponent(A)),B&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));l&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,l,u,A,B,F,M,O,H){O=this.createUrlParameters(d,f,l,u,A,B,O);d=this.getCurrentFile();f=!0;null!=F?l="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),M||null==d||d.constructor!=window.DriveFile?l="#R"+encodeURIComponent(l?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.addSplitHandler=function(b,e,g,n){function y(R){if(null!=E){var V=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));n(Math.max(0,K+(e?V.x-E.x:E.y-V.y)-g));mxEvent.consume(R);K!=L()&&(S=!0,G=null)}}function q(R){y(R);E=K=null}var E=null,K=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var L=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){E=new mxPoint(mxEvent.getClientX(R),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.extractMermaidMindmap=function(d){for(0<d[1].indexOf("orientation")&&d.splice(1,1);1<d.length&&""==d[1];)d.splice(1,1);for(var f=[],l=2;l<d.length;l++){var u=mxUtils.trim(d[l]);"["!=u&&"]"!=u&&"%%"!=u.substring(0,2)&&"##"!=u.substring(0,2)&&(u=d[l].replace(/[-|>]/g," "),""!=mxUtils.trim(u)&&" "==u.charAt(0)&&f.push(u))}return"mindmap\nroot(("+mxUtils.trim(d[1])+"))\n"+f.join("\n")};EditorUi.prototype.extractMermaidDeclaration=function(d){"o\n\n"==d.substring(0,3)&&(d=d.substring(3)); var f=d.split("```");f=1<f.length?f:d.split("<pre>");f=1<f.length?f:d.split("~~~");f=1<f.length?f:d.split("%%");f=1<f.length?f:d.split("(Begins)");f=mxUtils.trim(1>=f.length?d:f[1]);var l=f.split("\n");if(0<l.length&&"mermaid"==mxUtils.trim(l[0])||1<l.length&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l[1]))l.shift(),f=mxUtils.trim(l.join("\n")),l=f.split("\n");var u=l[0].split(" ")[0].replace(/:$/,"");try{"mindmap"==u&&2<l.length&&(f=this.extractMermaidMindmap(l))}catch(A){}"@"!=u.charAt(0)&& 0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,u)&&(f="classDiagram\n"+f);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",l,"\ntype:",u,"\nvalue:",d,"\ntext:",f);return f};EditorUi.prototype.removeMermaidComments=function(d){d=d.split("\n");for(var f=[],l=0;l<d.length;l++)"%%"!=d[l].substring(0,2)&&f.push(d[l]);return f.join("\n")};EditorUi.prototype.generateMermaidImage=function(d,f,l,u,A){d=this.removeMermaidComments(d);var B=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,t)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",M);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.close(),c.fill()),c.begin(),c.moveTo(p-C,0),c.lineTo(p-C,C),c.lineTo(p,C),c.end(),c.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(L,G);mxCellRenderer.registerShape("note2",L);L.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.cellWasClicked=!0,this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)))};mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(d){return null!=this.graph.view.getState(d)&&b.isVertex(d)&&null!=b.getGeometry(d)&&!b.getGeometry(d).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=E,GraphViewer.resizeSensorEnabled=!0,K.apply(this,arguments))};var S=y.editor.graph,G=S.container;G.style.overflow="hidden";this.lightboxChrome&&null==b?(G.style.border="1px solid #c0c0c0",G.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",q)):(e.style.display="none",g.style.display="none");var L=this;S.getImageFromBundles=function(V){return L.getImageUrl(V)};var R=y.createTemporaryGraph;
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.addRadiobox=function(d,f,l,u,A,B,F){return this.addCheckbox(d,l,u,A,B,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,l,u,A,B,F,M){B=null!=B?B:!0;var O=document.createElement("input");O.style.marginRight="8px";O.style.marginTop="16px";O.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();O.id=F;null!=M&&O.setAttribute("name",M);l&&(O.setAttribute("checked","checked"),O.defaultChecked=!0);u&&O.setAttribute("disabled","disabled");B&&(d.appendChild(O),l=document.createElement("label"),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia,ma,aa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia,ma,aa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d){var f=L.apply(this,arguments),l=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});Editor.enableCssDarkMode||this.addListener("darkModeChanged",l);this.addListener("sketchModeChanged",l);this.addListener("currentThemeChanged",l);return f};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var f=0;f<d.length;f++)this.libraryLoaded(d[f].file,d[f].images,d[f].title,null!=d[f].div?"none"!=d[f].div.style.display:
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
F.freehand){var ma=F.freehand.createStyle;F.freehand.createStyle=function(ha){return ma.apply(this,arguments)+"sketch=0;"}}B.editor.addListener("statusChanged",mxUtils.bind(this,function(){B.setStatusText(B.editor.getStatus())}));B.setStatusText(B.editor.getStatus());var aa=B.menus.get("viewZoom");if(null!=aa){var la=function(ha){if(mxEvent.isAltDown(ha))B.hideCurrentMenu(),B.actions.get("customZoom").funct(),mxEvent.consume(ha);else if("geMenuItem"==mxEvent.getSource(ha).className||mxEvent.isShiftDown(ha))B.hideCurrentMenu(), B.actions.get("smartFit").funct(),mxEvent.consume(ha)},X=B.actions.get("zoomIn"),P=B.actions.get("zoomOut"),U=B.actions.get("resetView"),k=B.actions.get("undo"),z=B.actions.get("redo"),J=d("",k.funct,null,mxResources.get("undo")+" ("+k.shortcut+")",k,Editor.undoImage),W=d("",z.funct,null,mxResources.get("redo")+" ("+z.shortcut+")",z,Editor.redoImage),T=d("",la,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",U,Editor.zoomFitImage);M.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
DrawioFile.prototype.fileSaved=function(b,e,g,n,y,q,E){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;q=null!=q?q:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(q),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(q,e,g,n,y,E)}catch(G){this.invalidChecksum= this.inConflictState=!0;this.descriptorChanged();null!=n&&n(G);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,G);else{var K=this.getCurrentUser(),S=null!=K?K.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}}catch(L){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=n&&n(G)}};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==K||"filledEdge"==K||"wire"==K)};Graph.prototype.isAutoSizeState=function(E){return"1"==mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){return null!=mxUtils.getValue(E.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,K){E=null!= E?E:!0;K=null!=K?K:!0;var S=this.model;return S.filterDescendants(function(G){return E&&S.isVertex(G)||K&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=function(E,K,S){E=this.getCellStyle(E).newEdgeStyle;if(null!=E){this.model.beginUpdate();try{var G=JSON.parse(E),L;for(L in G)this.setCellStyles(L,G[L],K),"edgeStyle"==L&&"elbowEdgeStyle"==G[L]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",K)}finally{this.model.endUpdate()}}};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
DrawioFile.prototype.patch=function(b,e,g,n){if(null!=b){var y=this.ui.editor.undoManager,q=y.history.slice(),E=y.indexOfNextAdd,K=this.ui.editor.graph;K.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=K.foldingEnabled,L=K.mathEnabled,R=K.cellRenderer.redraw;K.cellRenderer.redraw=function(A){A.view.graph.isEditing(A.cell)&&(A.view.graph.scrollCellToVisible(A.cell),A.view.graph.cellEditor.resize());R.apply(this,arguments)};K.model.beginUpdate();
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function E(){mxActor.call(this)}function K(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function R(){mxShape.call(this)}
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var n=this.getModel(),y=n.getChildCount(n.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function K(){n.isVisible(E)?(L.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(L.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
2))+"px";this.linkHint.style.top=Math.round(v.y+v.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var Ea=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Ea.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ka=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ka.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint= null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function E(){mxActor.call(this)}function K(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function R(){mxShape.call(this)}
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
E.style.backgroundPosition=d,E.style.backgroundImage=V,!R||null!=G.background&&G.background!=mxConstants.NONE?E.style.backgroundColor=L:(E.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E,K){for(K=this.graph.gridSize*this.scale*(null!=K?K:1);K<this.minGridSize;)K*=2;for(var S=this.gridSteps*K,G=[],L=1;L<this.gridSteps;L++){var R=L*K;G.push("M 0 "+R+" L "+S+" "+R+" M "+R+" 0 L "+R+" "+S)}return'<svg width="'+S+'" height="'+ S+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+S+'" height="'+S+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+S+" 0 L 0 0 0 "+S+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxGraphView.prototype.updateFloatingTerminalPoint=function(L,R,V,d){if(null==R||null==L||"1"!=R.style.snapToPoint&&"1"!=L.style.snapToPoint)K.apply(this,arguments);else{R=this.getTerminalPort(L,R,d);var f=this.getNextPoint(L,V,d),l=this.graph.isOrthogonal(L),u=mxUtils.toRadians(Number(R.style[mxConstants.STYLE_ROTATION]||"0")),A=new mxPoint(R.getCenterX(),R.getCenterY());if(0!=u){var B=Math.cos(-u),F=Math.sin(-u);f=mxUtils.getRotatedPoint(f,B,F,A)}B=parseFloat(L.style[mxConstants.STYLE_PERIMETER_SPACING]|| 0);B+=parseFloat(L.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(R,f,0==u&&l,B);0!=u&&(B=Math.cos(u),F=Math.sin(u),f=mxUtils.getRotatedPoint(f,B,F,A));L.setAbsoluteTerminalPoint(this.snapToAnchorPoint(L,R,V,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(L,R,V,d,f){if(null!=R&&null!=L){L=this.graph.getAllConnectionConstraints(R);d=V=null;if(null!=L)for(var l=0;l<L.length;l++){var u=this.graph.getConnectionPoint(R,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
1):"pagenumber"==l?K.currentPage+1:"pagecount"==l?S.length:L.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=function(l){this.handlingResize||(this.currentPage=mxUtils.mod(l,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(l){l=this.getIndexById(l);var u=0<=l;u&&this.selectPage(l);return u};G=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
ra);Z(k,ra);Z(k,4)}while(ra);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var K=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,z){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors); mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,z){var J=null;null!=k.editor.graph.getModel().getParent(z)?J=z.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Math.random()))):A.toUpperCase()!=A?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(A)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name"))); d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var u in d[EditorUi.DIFF_UPDATE]){var A=d[EditorUi.DIFF_UPDATE][u];null!=A.name&&(A.name=this.anonymizeString(A.name));null!=A.cells&&(f=mxUtils.bind(this,function(B){var F=A.cells[B];if(null!=F){for(var M in F)null!=F[M].value&&(F[M].value="["+F[M].value.length+"]"),null!=F[M].xmlValue&&(F[M].xmlValue="["+F[M].xmlValue.length+"]"),null!=F[M].style&&(F[M].style= "["+F[M].style.length+"]"),mxUtils.isEmptyObject(F[M])&&delete F[M];mxUtils.isEmptyObject(F)&&delete A.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(A.cells)&&delete A.cells);mxUtils.isEmptyObject(A)&&delete d[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&&
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxConstants.STYLE_DASHED,"0")&&L[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var R=this.state.view.graph.getFlowAnimationStyle();null!=R&&L[1].setAttribute("class",R.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(L,R){return n.apply(this,arguments)||null!=L.routedPoints&&null!=R.routedPoints&&!mxUtils.equalPoints(R.routedPoints,L.routedPoints)};var y=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
L||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){L=0;for(var V=g.length;L<V;L++)E(g[L],K)}else E(g,K);this.detach=function(){if(R)for(var d=0,f=g.length;d<f;d++)e.detach(g[d]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Actions.prototype.init=function(){function b(G){q.escape();G=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),G);null!=G&&q.setSelectionCells(G)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),L=0;L<G.length;L++)q.cellLabelChanged(G[L],"")}finally{q.getModel().endUpdate()}}}function g(G,L,R,V,d){d.getModel().beginUpdate();try{var f=d.getCellGeometry(G);null!=f&&R&&V&&(R/=V,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,d.getModel().setGeometry(G,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
A.setAttribute("value",u.key);mxUtils.write(A,u.title);K.appendChild(A)}var B=!1;y();b.appendChild(K);mxUtils.br(b);b.appendChild(S);b.appendChild(L);var F=g,M=function(O,H){O=d[K.value];null!=O.format?(R.value=O.format.width/100,V.value=O.format.height/100,L.style.display="none",S.style.display=""):(S.style.display="none",L.style.display="");O=parseFloat(R.value);if(isNaN(O)||0>=O)R.value=g.width/100;O=parseFloat(V.value);if(isNaN(O)||0>=O)V.value=g.height/100;O=new mxRectangle(0,0,Math.floor(100* parseFloat(R.value)),Math.floor(100*parseFloat(V.value)));"custom"!=K.value&&E.checked&&(O=new mxRectangle(0,0,O.height,O.width));H&&B||O.width==F.width&&O.height==F.height||(F=O,null!=n&&n(F))};mxEvent.addListener(e,"click",function(O){q.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(G,"click",function(O){E.checked=!0;M(O);mxEvent.consume(O)});mxEvent.addListener(R,"blur",M);mxEvent.addListener(R,"click",M);mxEvent.addListener(V,"blur",M);mxEvent.addListener(V,"click",M);mxEvent.addListener(E,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,t)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",M);mxUtils.extend(O,mxActor);O.prototype.size=.2;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c, m,x,p,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,t)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",O);mxUtils.extend(H,mxActor);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
qa.className="geCommentAction";var ra=document.createElement("a");ra.className="geCommentActionLnk";mxUtils.write(ra,Z);qa.appendChild(ra);mxEvent.addListener(ra,"click",function(pa){ba(pa,ca);pa.preventDefault();mxEvent.consume(pa)});T.appendChild(qa);ha&&(qa.style.display="none")}function P(){function Z(qa){ba.push(ha);if(null!=qa.replies)for(var ra=0;ra<qa.replies.length;ra++)ha=ha.nextSibling,Z(qa.replies[ra])}var ba=[],ha=k;Z(ca);return{pdiv:ha,replies:ba}}function U(Z,ba,ha,qa,ra){function pa(){G(za); ca.addReply(Ba,function(Ma){Ba.id=Ma;ca.replies.push(Ba);R(za);ha&&ha()},function(Ma){xa();L(za);b.handleError(Ma,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},qa,ra)}function xa(){K(Ba,za,function(Ma){pa()},!0)}var Ca=P().pdiv,Ba=b.newComment(Z,b.getCurrentUser());Ba.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var za=V(Ba,ca.replies,Ca,aa+1);ba?xa():pa()}if(la||!ca.isResolved){F.style.display="none";var k=document.createElement("div");k.className="geCommentContainer";
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(v){return null!=v&&S.apply(this,arguments)?this.isTableCell(v)||this.isTableRow(v)?this.isCellMovable(this.model.getParent(v)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(v){var N=this.model.getParent(v);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==N||!this.isTable(N))};var L=Graph.prototype.splitEdge;
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
l&&l()};EditorUi.prototype.alert=function(d,f,l){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,l||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,l,u,A,B){d=null!=d?d:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},M=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=l&&l()},u,A,null,null,null,null,M);this.showDialog(d.container,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d){var f=L.apply(this,arguments),l=mxUtils.bind(this,function(){f.refresh();this.restoreOpenLibraries()});Editor.enableCssDarkMode||this.addListener("darkModeChanged",l);this.addListener("sketchModeChanged",l);this.addListener("currentThemeChanged",l);return f};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var f=0;f<d.length;f++)this.libraryLoaded(d[f].file,d[f].images,d[f].title,null!=d[f].div?"none"!=d[f].div.style.display: d[f].expand)};var R=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){R.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),u=this.isDiagramActive(),A="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&A);this.actions.get("redo").setEnabled(this.canRedo()&&A);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d){var f=d.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?l.error&&l.error(d.error.errResp):l.callback&&l.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,l,u,A){var B=!0,F=window.setTimeout(mxUtils.bind(this,function(){B=!1;A({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),M=mxUtils.bind(this,function(){window.clearTimeout(F);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var L=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var l=document.createElement("div"),u=this.editor.graph,A=u.getLinkForCell(f);null!=A&&u.setLinkForCell(f,this.updatePageLink(d,A));if(u.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(u.getLabel(f));for(var B=l.getElementsByTagName("a"),F=!1,M=0;M<B.length;M++)A=B[M].getAttribute("href"),null!=A&&(B[M].setAttribute("href",this.updatePageLink(d,A)),F=!0);F&&u.labelChanged(f,l.innerHTML)}for(M= 0;M<u.model.getChildCount(f);M++)this.updatePageLinksForCell(d,u.model.getChildAt(f,M))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var l=d[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var u=JSON.parse(f.substring(17));if(null!=u.actions){for(var A=0;A<u.actions.length;A++){var B=u.actions[A];if(null!=B.open&&Graph.isPageLink(B.open)){var F=B.open.substring(B.open.indexOf(",")+1);l=d[F];null!=l?B.open=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.curveFitting=Editor.sketchDefaultCurveFitting,d.defaultEdgeStyle.jiggle=Editor.sketchDefaultJiggle,d.defaultEdgeStyle.hachureGap="4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var l= d.indexOf(",");0<l&&(f=this.getPageById(d.substring(l+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.installSettings=function(){if(Editor.isSettingsEnabled()){Editor.pagesVisible=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.prototype.getSvg=function(k,z,J,W,T,Z,ba,ha,qa,ra,pa,xa,Ca,Ba){var za=null,Ma=null,Qa=null;Editor.enableCssDarkMode||null==this.themes||null==xa||"dark"==xa==("darkTheme"==this.defaultThemeName)||(za=this.stylesheet,Ma=this.shapeForegroundColor,Qa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(), this.refresh());var Pa=null;Editor.enableCssDarkMode&&null!=this.backgroundImage&&(Pa=this.backgroundImage,this.backgroundImage=this.adaptBackgroundPage(Pa,xa));var ta=M.apply(this,arguments);if(Editor.enableCssDarkMode&&("dark"==xa||"auto"==xa)){var Da=Graph.createSvgDarkModeStyle(ta.ownerDocument,xa);ta.getElementsByTagName("defs")[0].appendChild(Da)}var Aa=this.getCustomFonts();if(pa&&0<Aa.length){var ya=ta.ownerDocument;Da=null!=ya.createElementNS?ya.createElementNS(mxConstants.NS_SVG,"style"): ya.createElement("style");null!=ya.setAttributeNS?Da.setAttributeNS("type","text/css"):Da.setAttribute("type","text/css");for(var Ra="",Wa="",La=0;La<Aa.length;La++){var ab=Aa[La].name,Ea=Aa[La].url;Graph.isCssFontUrl(Ea)?Ra+="@import url("+Ea+");\n":Wa+='@font-face {\nfont-family: "'+ab+'";\nsrc: url("'+Ea+'");\n}\n'}Da.appendChild(ya.createTextNode(Ra+Wa));ta.getElementsByTagName("defs")[0].appendChild(Da)}this.mathEnabled&&(document.body.appendChild(ta),Editor.MathJaxRender(ta),ta.parentNode.removeChild(ta)); null!=Pa&&(this.backgroundImage=Pa);null!=za&&(this.shapeBackgroundColor=Qa,this.shapeForegroundColor=Ma,this.stylesheet=za,this.refresh());return ta};var O=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){O.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var H=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
g.dialogs||0==g.dialogs.length)};y.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var E=null,K={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=y.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(n.isEnabled()){if(mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){var V=g.actions.get(g.altShiftActions[R.keyCode]);if(null!=V)return V.funct}if(null!=K[R.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(R)&& mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(n.model.isVertex(n.getSelectionCell()))return function(){var d=n.connectVertex(n.getSelectionCell(),K[R.keyCode],n.defaultEdgeLength,R,!0);null!=d&&0<d.length&&(1==d.length&&n.model.isEdge(d[0])?n.setSelectionCell(n.model.getTerminal(d[0],!1)):n.setSelectionCell(d[d.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode, mxEvent.isShiftDown(R)?n.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?n.gridSize:null)}}return S.apply(this,arguments)};y.bindAction=mxUtils.bind(this,function(R,V,d,f){var l=this.actions.get(d);null!=l&&(d=function(){l.isEnabled()&&l.funct.apply(this,arguments)},V?f?y.bindControlShiftKey(R,d):y.bindControlKey(R,d):f?y.bindShiftKey(R,d):y.bindKey(R,d))});var G=this,L=y.escape;y.escape=function(R){L.apply(this,arguments)};y.enter=function(){};y.bindControlShiftKey(36,function(){n.exitGroup()});
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxUtils.write(ia,mxResources.get("timeAgo",[ma],"{1} ago"));ia.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function G(ca){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ia);ca.busyImg=ia}function L(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function R(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function V(ca,ia,ma,aa,la){function X(Z,ba,ha){var qa=document.createElement("li");
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,K,S){for(var G=0;G<K.length;G++){if(this.graph.isTableCell(K[G])||this.graph.isTableRow(K[G]))return!1;if(this.graph.getModel().isVertex(K[G])){var L=this.graph.getCellGeometry(K[G]);if(null!=L&&L.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=g.apply(this,arguments);E.intersects=mxUtils.bind(this,function(K,S){return this.isConnecting()?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"["+F[M].style.length+"]"),mxUtils.isEmptyObject(F[M])&&delete F[M];mxUtils.isEmptyObject(F)&&delete A.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(A.cells)&&delete A.cells);mxUtils.isEmptyObject(A)&&delete d[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var l=0;l<d.attributes.length;l++)"as"!=d.attributes[l].name&& d.setAttribute(d.attributes[l].name,this.anonymizeString(d.attributes[l].value,f));if(null!=d.childNodes)for(l=0;l<d.childNodes.length;l++)this.anonymizeAttributes(d.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
0)}}catch(O){this.handleError(O)}}),!0);var A=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==l?!0:A.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,f,l){function u(O){return"simple"==
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
aa()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,function(){aa()}),ja)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(X){var P=mxEvent.getSource(X);P!=ia&&P!=ma?(null!=l&&l(),aa(),mxEvent.consume(X)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",M)}),ja/2);window.setTimeout(la,A?4E3:3E4);H=!0}return H};EditorUi.prototype.setCurrentFile=function(d){null!= d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,l,u){d=d.toDataURL("image/"+l);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<u&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",u));else throw{message:mxResources.get("unknownError")};return d};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){d=this.downloadRequestBuilder(d,f,l,u,A,B,F,M,O,H,ja,da,ca);f="";for(var ia in d)l=d[ia],null!=l&&(f+=ia+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){var ia=this.editor.graph,ma=ia.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==B?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var aa=null,la=null,X=null;if(ma.width*ma.height>
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,u,A){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f); if(A)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var F=B.model.cells,M;for(M in F){var O=F[M];null!=O&&null!=O.style&&(O.style+=";sketch=1;"+(-1==O.style.indexOf("fontFamily=")||-1<O.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(H){console.log(H)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(); this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=u?u:!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(d,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d,f,l,u,A,B,F){if(null!=d){A=null!=A?A:Error(d);A.stack=null!=A.stack?A.stack:"";B=null!=B?B:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>A.stack.indexOf("extension:")&&0>A.stack.indexOf("<anonymous>:")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: "")+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=u?":colno:"+encodeURIComponent(u):"")+(""!=A.stack?"&stack="+encodeURIComponent(A.stack):""))}catch(M){}try{F||null==window.console||console.error(B,d,f,l,u,A)}catch(M){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null==H||"object"!==typeof H||null==H.format||null==H.data&&null==H.url?(H=da(H),Pa(H,O)):this.loadDescriptor(H,mxUtils.bind(this,function(ta){Pa(Qa(),O)}),mxUtils.bind(this,function(ta){this.handleError(ta,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(B,"*");if("json"==urlParams.proto){var M=this.editor.graph.openLink;this.editor.graph.openLink=function(O,H,ja){M.apply(this, arguments);F.postMessage(JSON.stringify({event:"openLink",href:O,target:H,allowOpener:ja}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,f,l,u){var A="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,B=document.createElement("button");B.setAttribute("title",d+(null!=l?" ("+l+")":""));B.style.marginLeft="6px";mxUtils.write(B,d);A?(B.className=u?"gePrimaryBtn":"",B.style.marginLeft="8px",B.style.padding="6px"):B.className="geBigButton"+(u?"":" geBigStandardButton");
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d.appendChild(d.resizeSensor);"static"==q(d,"position")&&(d.style.position="relative");var l=d.resizeSensor.childNodes[0],u=l.childNodes[0],A=d.resizeSensor.childNodes[1],B=function(){u.style.width="100000px";u.style.height="100000px";l.scrollLeft=1E5;l.scrollTop=1E5;A.scrollLeft=1E5;A.scrollTop=1E5};B();var F=!1,M=function(){d.resizedAttached&&(F&&(d.resizedAttached.call(),F=!1),b(M))};b(M);var O,H,ja,da;f=function(){if((ja=d.offsetWidth)!=O||(da=d.offsetHeight)!=H)F=!0,O=ja,H=da;B()};var ca=function(ia, ma,aa){ia.attachEvent?ia.attachEvent("on"+ma,aa):ia.addEventListener(ma,aa)};ca(l,"scroll",f);ca(A,"scroll",f)}var K=function(){GraphViewer.resizeSensorEnabled&&n()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;K();S=null;G=!1},200))})).observe(g)}else{var L=Object.prototype.toString.call(g),R="[object Array]"===L||"[object NodeList]"===L||"[object HTMLCollection]"===
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.prototype.getCommonStyle=function(E){for(var K={},S=0;S<E.length;S++){var G=this.view.getState(E[S]);null!=G&&this.mergeStyle(G.style,K,0==S)}return K};Graph.prototype.mergeStyle=function(E,K,S){if(null!=E){var G={},L;for(L in E){var R=E[L];null!=R&&(G[L]=!0,null==K[L]&&S?K[L]=R:K[L]!=R&&delete K[L])}for(L in K)G[L]||delete K[L]}};Graph.prototype.getStartEditingCell=function(E,K){K=this.getCellStyle(E);K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)|| 0==K)&&""==this.getLabel(E)&&0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),K=this.getCellStyle(E),K=parseInt(mxUtils.getValue(K,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==K)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(K=0;K<this.model.getChildCount(E);K++){var S=this.model.getChildAt(E,K);if(this.isCellEditable(S)){E=S;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.prototype.visitTableCells=function(b,e){var g=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var y=0;y<n.length;y++){for(var q=this.getActualStartSize(n[y],!0),E=this.model.getChildCells(n[y],!0),K=this.getCellStyle(n[y],!0),S=null,G=[],L=0;L<E.length;L++){var R=this.getCellGeometry(E[L]),V={cell:E[L],rospan:1,colspan:1,row:y,col:L,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;V.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+q.x),R.height+(null!=g&&null!= g[0]?g[0].point.y:b.y+q.y));V.actual=V;null!=g&&null!=g[L]&&1<g[L].rowspan?(V.rowspan=g[L].rowspan-1,V.colspan=g[L].colspan,V.actual=g[L].actual):null!=S&&1<S.colspan?(V.rowspan=S.rowspan,V.colspan=S.colspan-1,V.actual=S.actual):(S=this.getCurrentCellStyle(E[L],!0),null!=S&&(V.rowspan=parseInt(S.rowspan||1),V.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(K,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(K,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(V,E.length, n.length,b.x+(S?q.x:0),b.y+(S?q.y:0));G.push(V);S=V}g=G}};Graph.prototype.getTableLines=function(b,e,g){var n=[],y=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(q,E,K,S,G){e&&q.row<K-1&&(null==n[q.row]&&(n[q.row]=[new mxPoint(S,q.point.y)]),1<q.rowspan&&n[q.row].push(null),n[q.row].push(q.point));g&&q.col<E-1&&(null==y[q.col]&&(y[q.col]=[new mxPoint(q.point.x,G)]),1<q.colspan&&y[q.col].push(null),y[q.col].push(q.point))}));return n.concat(y)};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
0);B+=parseFloat(L.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(R,f,0==u&&l,B);0!=u&&(B=Math.cos(u),F=Math.sin(u),f=mxUtils.getRotatedPoint(f,B,F,A));L.setAbsoluteTerminalPoint(this.snapToAnchorPoint(L,R,V,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(L,R,V,d,f){if(null!=R&&null!=L){L=this.graph.getAllConnectionConstraints(R);d=V=null;if(null!=L)for(var l=0;l<L.length;l++){var u=this.graph.getConnectionPoint(R, L[l]);if(null!=u){var A=(u.x-f.x)*(u.x-f.x)+(u.y-f.y)*(u.y-f.y);if(null==d||A<d)V=u,d=A}}null!=V&&(f=V)}return f};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(L,R,V){var d=S.apply(this,arguments);"1"==L.getAttribute("placeholders")&&null!=V.state&&(d=V.state.view.graph.replacePlaceholders(V.state.cell,d));return d};var G=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(L){if(null!=L.style&&"undefined"!==typeof pako){var R=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null,function(){B.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return l.checked?"blank"===B.value?"_blank":A:null},getEditInput:function(){return l},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=function(d,f){function l(){var M=document.createElement("div");
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"")+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(l)+(null!=u?":colno:"+encodeURIComponent(u):"")+(""!=A.stack?"&stack="+encodeURIComponent(A.stack):""))}catch(M){}try{F||null==window.console||console.error(B,d,f,l,u,A)}catch(M){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL? window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(l){}};EditorUi.sendReport=function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(l){}};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
(f.x+=e.offset.x,f.y+=e.offset.y),e=this.getCurrentCellStyle(a[d]),null!=f&&(e=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0),0!=e&&(f=mxUtils.getBoundingBox(f,e)));null!=f&&(null==c?c=mxRectangle.fromRectangle(f):c.add(f))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
A.setAttribute("value",e||"");A.style.marginLeft="4px";A.style.width=null!=R?R+"px":"180px";var B=mxUtils.button(g,function(){if(null==q||q(A.value))S&&b.hideDialog(),n(A.value)});B.className="geBtn gePrimaryBtn";this.init=function(){if(null!=y||null==E)if(null!=L?Editor.selectFilename(A):(A.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var F=d.parentNode;if(null!=F){var M=null;mxEvent.addListener(F,"dragleave", function(O){null!=M&&(M.style.backgroundColor="",M=null);O.stopPropagation();O.preventDefault()});mxEvent.addListener(F,"dragover",mxUtils.bind(this,function(O){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=A,M.style.backgroundColor="#ebf2f9");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(F,"drop",mxUtils.bind(this,function(O){null!=M&&(M.style.backgroundColor="",M=null);0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")&&(A.value=decodeURIComponent(O.dataTransfer.getData("text/uri-list")), B.click());O.stopPropagation();O.preventDefault()}))}}};u=document.createElement("td");u.style.whiteSpace="nowrap";u.appendChild(A);l.appendChild(u);if(null!=y||null==E)f.appendChild(l),null!=L&&(u.appendChild(FilenameDialog.createTypeHint(b,A,L)),null!=b.editor.diagramFileTypes&&(l=document.createElement("tr"),u=document.createElement("td"),u.style.textOverflow="ellipsis",u.style.textAlign="right",u.style.maxWidth="100px",u.style.fontSize="10pt",u.style.width="84px",mxUtils.write(u,mxResources.get("type")+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var E= this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";E!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,K){E=K.getProperty("edit").changes;for(K=0;K<E.length;K++)if(E[K]instanceof RenamePage||E[K]instanceof MovePage||E[K]instanceof mxRootChange){this.updateTabContainer(); break}}));var g=b.sizeDidChange,n=null,y=this;b.sizeDidChange=function(){var E=g.apply(this,arguments);null!=y.currentPage&&n!=y.currentPage&&(n=y.currentPage,y.pageSelected());return E};var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);this.editor.addListener("pageSelected", mxUtils.bind(this,function(E,K){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(E,K){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"&dpi="+F:"")+"&bg="+(null!=u?u:"none")+"&w="+da+"&h="+ca+"&border="+B+"&xml="+encodeURIComponent(H))})}else"png"==l?d.exportImage(A,null==u||"none"==u,!0,!1,!1,B,!0,!1,null,M,F):d.exportImage(A,!1,!0,!1,!1,B,!0,!1,"jpeg",M);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var u=d;this.currentPage!=this.pages[l]&&(u=this.createTemporaryGraph(d.getStylesheet()), this.updatePageRoot(this.pages[l]),u.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+u.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxUtils.htmlEntities(d));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(u);var A=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function V(){mxShape.call(this)}function d(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function f(){mxActor.call(this)}function l(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxActor.call(this)}function O(){mxActor.call(this)}function H(){mxActor.call(this)}function ja(){mxActor.call(this)}function da(c,m){this.canvas=c;this.canvas.setLineJoin("round"); this.canvas.setLineCap("round");this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,da.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,da.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,da.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,da.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo= mxUtils.bind(this,da.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,da.prototype.arcTo)}function ca(){mxRectangleShape.call(this)}function ia(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function aa(){mxActor.call(this)}function la(){mxActor.call(this)}function X(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function U(){mxCylinder.call(this)}function k(){mxShape.call(this)}function z(){mxShape.call(this)}function J(){mxEllipse.call(this)}
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,f,l){var u=null==d||null==f;l=null!=l?l:24;var A=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),B=A.spin;A.spin=function(M,O){var H= !1;this.active||(B.call(this,M),this.active=!0,null!=O&&(u&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),H=document.createElement("div"),H.style.position="absolute",H.style.whiteSpace="nowrap",H.style.background="#4B4243",H.style.color="white",H.style.fontFamily=Editor.defaultHtmlFont,H.style.fontSize="9pt",H.style.padding="6px",H.style.paddingLeft="10px",H.style.paddingRight="10px",H.style.zIndex=2E9,H.style.left=Math.max(0, d)+"px",H.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(H.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(H.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(H.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),H.innerHTML=O,M.appendChild(H),A.status=H),this.pause=mxUtils.bind(this,function(){var ja=function(){};this.active&&(ja=mxUtils.bind(this,function(){this.spin(M,O)})); this.stop();return ja}),H=!0);return H};var F=A.stop;A.stop=function(){F.call(this);this.active=!1;null!=A.status&&null!=A.status.parentNode&&A.status.parentNode.removeChild(A.status);A.status=null};A.pause=function(){return function(){}};return A};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
l.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(A=null,u=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,u,A,null!=A?l:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var l=0;l<d.length;l++)mxUtils.bind(this,function(u){var A=new FileReader;A.onload=mxUtils.bind(this,function(B){try{this.openFileHandle(B.target.result,u.name,u,f)}catch(F){this.handleError(F)}});A.onerror=mxUtils.bind(this,function(B){this.spinner.stop(); this.handleError(B);window.openFile=null});"image"!==u.type.substring(0,5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?A.readAsText(u):A.readAsDataURL(u)})(d[l])};EditorUi.prototype.openLocalFile=function(d,f,l,u,A){var B=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var M=mxUtils.parseXml(d);null!=M&&(this.editor.setGraphXml(M.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.createCellLookup(v)),Q);return ka.encode(oa)};Graph.prototype.isSwimlane=function(v,N){var Q=null;null==v||this.model.isEdge(v)||this.model.getParent(v)==this.model.getRoot()||(Q=this.getCurrentCellStyle(v,N)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var K=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(v){return null!=v&&K.apply(this,arguments)?this.isTableCell(v)||this.isTableRow(v)?this.isCellEditable(this.model.getParent(v)): !0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(v){return null!=v&&S.apply(this,arguments)?this.isTableCell(v)||this.isTableRow(v)?this.isCellMovable(this.model.getParent(v)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(v){var N=this.model.getParent(v);if(null!=N){var Q=this.getCurrentCellStyle(N);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==N||!this.isTable(N))};var L=Graph.prototype.splitEdge;
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):u.parseFileData(H,mxUtils.bind(this,function(ja){4==ja.readyState&&(200<=ja.status&&299>=ja.status?f(ja.responseText):l())}),d.name):l()}):O||l()}},function(B){l(B)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",A,null,null,null,l))};EditorUi.prototype.importFile=function(d,f,l,u,A,B,F,M,O,H,ja,da){H=null!= H?H:!0;var ca=!1,ia=null,ma=mxUtils.bind(this,function(aa){var la=null;null!=aa&&"<mxlibrary"==aa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,aa,F)):la=this.importXml(aa,l,u,H,null,null!=da?mxEvent.isControlDown(da):null);null!=M&&M(la)});"image"==f.substring(0,5)?(O=!1,"image/png"==f.substring(0,9)&&(f=ja?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(ia=this.importXml(f,l,u,H,null,null!=da?mxEvent.isControlDown(da):null),O=!0)),O||(f=this.editor.graph,O=d.indexOf(";"),0< O&&(d=d.substring(0,O)+d.substring(d.indexOf(",",O+1))),H&&f.isGridEnabled()&&(l=f.snap(l),u=f.snap(u)),ia=[f.insertVertex(null,null,"",l,u,A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(ca=!0,this.importGraphML(d,ma)):null!=O&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ca=!0,this.importVisio(O,ma)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+F})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(M){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(M){}}catch(M){this.fileLoadedError=M;if(null!= d)try{d.close()}catch(O){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+M.message,label:"stack_"+M.stack})}catch(O){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=u?this.fileLoaded(u)||B():B()});f?d():this.handleError(M,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else B(); return A};EditorUi.prototype.getHashValueForPages=function(d,f){var l=0,u=new mxGraphModel,A=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var F=d[B].node.cloneNode(!1);F.removeAttribute("name");u.root=d[B].root;var M=A.encode(u);this.editor.graph.saveViewState(d[B].viewState,M,!0);M.removeAttribute("pageWidth");M.removeAttribute("pageHeight");F.appendChild(M);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null,null!=z?z.value:null,X.value,"embedFonts"==ba.value,"lblToSvg"==ba.value)}),null,l,u);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);ia.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ia.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,l,u,A){var B=document.createElement("div");B.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var M=document.createElement("h3");mxUtils.write(M,f);M.style.cssText= "width:100%;text-align:center;margin-top:0px;margin-bottom:4px";B.appendChild(M)}var O=this.addCheckbox(B,mxResources.get("fit"),!0),H=this.addCheckbox(B,mxResources.get("shadow"),F.shadowVisible&&u,!u),ja=this.addCheckbox(B,l),da=this.addCheckbox(B,mxResources.get("lightbox"),!0),ca=this.addEditButton(B,da),ia=ca.getEditInput(),ma=1<F.model.getChildCount(F.model.getRoot()),aa=this.addCheckbox(B,mxResources.get("layers"),ma,!ma);aa.style.marginLeft=ia.style.marginLeft;aa.style.marginBottom="12px"; aa.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ma&&aa.removeAttribute("disabled"),ia.removeAttribute("disabled")):(aa.setAttribute("disabled","disabled"),ia.setAttribute("disabled","disabled"));ia.checked&&da.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,B,mxUtils.bind(this,function(){d(O.checked,H.checked,ja.checked,da.checked,ca.getLink(),aa.checked)}),null,mxResources.get("embed"), A);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,l,u,A,B,F,M){function O(ia){var ma=" ",aa="";u&&(ma=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
f=0,37==R?f=-V:38==R?l=-V:39==R?f=V:40==R&&(l=V),B.currentDx+=f*A,B.currentDy+=l*A,B.checkPreview(),B.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=B.first){var F=B.roundLength(B.currentDx/A),M=B.roundLength(B.currentDy/A);B.moveCells(B.cells,F,M);B.reset()}},400))}}}}var g=this,n=this.editor.graph,y=new mxKeyHandler(n),q=y.isEventIgnored;y.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)|| 90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&q.apply(this,arguments)};y.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&(null==
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.insertHandler(M,null,null,O.defaultVertexStyle,O.defaultEdgeStyle,!1,!0)}finally{O.model.endUpdate()}}}catch(U){if(A)throw U;this.handleError(U)}return M};EditorUi.prototype.updatePageLinks=function(d,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(d,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(d,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxUtils.write(ia,mxResources.get("timeAgo",[ma],"{1} ago"));ia.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function G(ca){var ia=document.createElement("img");ia.className="geCommentBusyImg";ia.src=IMAGE_PATH+"/spin.gif";ca.appendChild(ia);ca.busyImg=ia}function L(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function R(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function V(ca,ia,ma,aa,la){function X(Z,ba,ha){var qa=document.createElement("li");
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
U.checked,null!=ca?ca.value:null,null!=ia?ia.value:null,k.checked)}),null,mxResources.get("create"),F,M);this.showDialog(f.container,340,300+d,!0,!0);null!=ca?(ca.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)):ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,l,u,A){var B=document.createElement("div");B.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText= "width:100%;text-align:center;margin-top:0px;margin-bottom:"+(A?"10":"4")+"px";B.appendChild(F);if(A){mxUtils.write(B,mxResources.get("zoom")+":");var M=document.createElement("input");M.setAttribute("type","text");M.style.marginRight="16px";M.style.width="60px";M.style.marginLeft="4px";M.style.marginRight="12px";M.value=this.lastExportZoom||"100%";B.appendChild(M);mxUtils.write(B,mxResources.get("borderWidth")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight= "16px";O.style.width="60px";O.style.marginLeft="4px";O.value=this.lastExportBorder||"0";B.appendChild(O);mxUtils.br(B)}var H=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ja=u?null:this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var da=u?null:this.addCheckbox(B,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px"); d=new CustomDialog(this,B,mxUtils.bind(this,function(){var ca=parseInt(M.value)/100||1,ia=parseInt(O.value)||0;l(!H.checked,null!=ja?ja.checked:!1,null!=da?da.checked:!1,ca,ia)}),null,d,f);this.showDialog(d.container,300,(A?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,l,u,A,B,F,M,O){F=null!=F?F:Editor.defaultIncludeDiagram;var H=document.createElement("div");H.style.whiteSpace="nowrap";var ja=this.editor.graph,da="jpeg"==M?220:300,ca=document.createElement("h3");mxUtils.write(ca,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null!=G){var L=new ConnectionPointsDialog(n,G);n.showDialog(L.container,350,450,!0,!1,function(){L.destroy()});L.init()}},null,null,"Alt+Shift+Q").isEnabled=E};Actions.prototype.addAction=function(b,e,g,n,y){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var q=mxResources.get(b)+"..."}else q=mxResources.get(b);return this.put(b,new Action(q,e,g,n,y))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
M.push(function(H){l(null,H||"Unkown Error")}),this[u].apply(this,M);else{var O=this[u].apply(this,M);l([O])}}else l(null,"Invalid Call: "+u+" is not found.")}catch(H){l(null,"Invalid Call: An error occurred, "+H.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var u=l.open("database",2);u.onupgradeneeded=function(A){try{var B=u.result;1>A.oldVersion&&B.createObjectStore("objects",{keyPath:"key"}); 2>A.oldVersion&&(B.createObjectStore("files",{keyPath:"title"}),B.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};u.onsuccess=mxUtils.bind(this,function(A){try{var B=u.result;this.database=B;EditorUi.migrateStorageFiles&&(StorageFile.migrate(B),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
steps:ia.view.gridSteps,color:ia.view.gridColor});Graph.translateDiagram&&(A.diagramLanguage=Graph.diagramLanguage);return{format:f,from:aa,to:la,allPages:X,bg:null!=B?B:mxConstants.NONE,base64:u,embedXml:H,xml:l,filename:null!=d?d:"",extras:JSON.stringify(A),scale:F,border:M,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null}};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!= d&&1<d.length){var f=d.indexOf("#");0<=f&&(d=d.substring(0,f))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,f={};if(null!=d&&0<d.length){var l=d.lastIndexOf("#");if(0<l){d=decodeURIComponent(d.substring(l+1));try{f=JSON.parse(d)}catch(u){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&""!=this.currentFile.getHash()&&null!=this.currentPage&&0<this.getSelectedPageIndex()){var d=this.getHashObject();d.pageId=this.currentPage.getId();
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
M=F.getChildren(F.root);for(A=0;A<M.length;A++){var O=M[A];F.setVisible(O,f[O.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&& 0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,l,u,A,B,F,M,O,H,ja,da){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ca=this.getBaseFilename("remoteSvg"==d?!1:!A),ia=ca+("xml"==d||"pdf"==d&&ja?".drawio":"")+"."+d;if("xml"==d){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,A,null,null,null,f);this.saveData(ia,d,ma,"text/xml")}else if("html"==d)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
B(M),M==F)this.hideDialog();else{if(0<M.length){var O=JSON.parse(M);localStorage.setItem(f,JSON.stringify(O))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(H){this.handleError(H)}}),null,mxResources.get("close"),null,null,null,!0,null,null,A,l,u);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f,l,u){d=null!=d?d:mxUtils.bind(this,function(A,B,F,M){B||(A=new ChangePageSetup(this, u?F:null,A),A.ignoreColor=!u,null!=M&&u&&(A.shadowVisible=M),this.editor.graph.model.execute(A))});d=new BackgroundImageDialog(this,d,f,l,u);this.showDialog(d.container,400,u?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,l,u,A){d=new LibraryDialog(this,d,f,l,u,A);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
B.getGlobalVariable=function(ja){return"page"==ja?H.getName():"pagenumber"==ja?1:O.apply(this,arguments)};document.body.appendChild(B.container);B.model.setRoot(H.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ja){try{null==M&&(M=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=ja.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(M));d(da.substring(da.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ca){null!=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,f,l){f(null)};EditorUi.prototype.exportSvg=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca,ia){if(this.spinner.spin(document.body,mxResources.get("export")))try{var ma=this.editor.graph.isSelectionEmpty();l=null!=l?l:ma;var aa=f?null:this.editor.graph.background;aa==mxConstants.NONE&&(aa=null);null==aa&&0==f&&(aa="dark"!=ja||Editor.enableSvgDarkMode?"#ffffff":Editor.darkColor);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,l,u,A,B,F){d=new ImageDialog(this,d,f,l,u,A,B,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,f,l,u,A,B){var F=localStorage.getItem(f);d=new TextareaDialog(this,d,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(M){if(null!=M)try{if(null!=B&& B(M),M==F)this.hideDialog();else{if(0<M.length){var O=JSON.parse(M);localStorage.setItem(f,JSON.stringify(O))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(H){this.handleError(H)}}),null,mxResources.get("close"),null,null,null,!0,null,null,A,l,u);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f,l,u){d=null!=d?d:mxUtils.bind(this,function(A,B,F,M){B||(A=new ChangePageSetup(this,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Math.max(M/A,O/A);if(1<H){var ja=Math.round(M/H),da=Math.round(O/H),ca=document.createElement("canvas");ca.width=ja;ca.height=da;ca.getContext("2d").drawImage(d,0,0,ja,da);var ia=ca.toDataURL();if(ia.length<f.length){var ma=document.createElement("canvas");ma.width=ja;ma.height=da;var aa=ma.toDataURL();ia!==aa&&(f=ia,M=ja,O=da)}}}catch(la){}l(f,M,O)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,l){try{var u=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(L,R){R=null!=R?R:!0;var V=this.getState(L);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&!V.invalid&&this.updateLineJumps(V)&&this.graph.cellRenderer.redraw(V,!1,this.isRendering());V=e.apply(this, arguments);null!=V&&R&&this.graph.model.isEdge(V.cell)&&null!=V.style&&1!=V.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(V);return V};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(){g.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var L=this.node.getElementsByTagName("path");if(1<L.length){"1"!=mxUtils.getValue(this.state.style,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function y(){mxConnector.call(this)}function q(){mxCylinder.call(this)}function E(){mxActor.call(this)}function K(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function R(){mxShape.call(this)}
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(T,Z){try{var ba=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var ha=this.createDownloadRequest(T,d,u,Z,F,A,M,O,H,ja,da,P,U);this.editor.graph.pageVisible=ba;return ha}catch(qa){this.handleError(qa)}}))}else{var k=null,z=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ia,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(k)}))});if("svg"==
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var y=g.view.graph.tolerance,q=!0,E=null,K=mxUtils.bind(this,function(L){q=!0;E=new mxPoint(mxEvent.getClientX(L),mxEvent.getClientY(L))}),S=mxUtils.bind(this,function(L){q=q&&null!=E&&Math.abs(E.x-mxEvent.getClientX(L))<y&&Math.abs(E.y-mxEvent.getClientY(L))<y}),G=mxUtils.bind(this,function(L){if(q)for(var R=mxEvent.getSource(L);null!= R&&R!=n.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,L);break}R=R.parentNode}});mxEvent.addGestureListeners(n.node,K,S,G);mxEvent.addListener(n.node,"click",function(L){mxEvent.consume(L)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var n=mxEvent.getSource(g);"A"==n.nodeName&&(n=n.getAttribute("href"),null!= n&&this.graph.isCustomLink(n)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(n)&&mxEvent.consume(g))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(g,n){null!=this.container&&this.flowAnimationStyle&&(g=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(g))}));this.initLayoutManager()};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,L=this.graph.pageScale,R=G.width*L;G=G.height*L;L=Math.floor(Math.min(0,K)/R);var V=Math.floor(Math.min(0,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(){try{if(da>=ja.length)ca();else{var la=ja[da];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(X){null==X||".scratchpad"==la&&X==this.emptyLibraryXml?M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):ia()}),ia)}}catch(X){console.log(X)}}),aa=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title, data:la.data}],ia,ia,["filesInfo","files"])}catch(X){console.log(X)}});F=mxUtils.bind(this,function(la){try{if(la.source==M.contentWindow){var X={};try{X=JSON.parse(la.data)}catch(P){}"init"==X.event?(M.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),M.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=X.event||H||(O?null!=X.resp&&0<X.resp.length&&null!=X.resp[0]?(ja=X.resp[0],O=!1,ma()):
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"1"==urlParams.embed||this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var z=this.editorUi,J=z.editor.graph;if(J.isEnabled()){var W=z.getCurrentFile();null!=W&&W.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"), function(){return z.editor.autosave},function(ba){z.editor.setAutosave(ba);z.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(ba){this.listener=function(){ba(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&J.isEnabled()&&"undefined"!==typeof MathJax){var T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(ba){z.actions.get("mathematicalTypesetting").funct()}, {install:function(ba){this.listener=function(){ba(J.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});k.appendChild(T);var Z=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");Z.style.position="relative";Z.style.marginLeft="6px";T.appendChild(Z)}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"/"+(0<O.length?"?"+O.join("&"):"")+l};EditorUi.prototype.createHtml=function(d,f,l,u,A,B,F,M,O,H,ja,da){this.getBasenames();var ca={};""!=A&&A!=mxConstants.NONE&&(ca.highlight=A);"auto"!==u&&(ca.target=u);H||(ca.lightbox=!1);ca.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(ca.zoom=l/100);l=[];F&&(l.push("pages"),ca.resize=!0,null!=this.pages&&null!=this.currentPage&&(ca.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),ca.resize=!0);M&&l.push("layers"); O&&l.push("tags");0<l.length&&(H&&l.push("lightbox"),ca.toolbar=l.join(" "));null!=ja&&0<ja.length&&(ca.edit=ja);null!=d?ca.url=d:ca.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(B?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ca))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";da(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1": EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,l,u){var A=document.createElement("div");A.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("html"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";A.appendChild(B);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null!=B.viewState.backgroundImage.originalSrc&&(M=new mxCodec(mxUtils.createXmlDocument()),M=M.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,M,null,u),F=F.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(M))));d(F)}return A};EditorUi.prototype.anonymizeString=function(d,f){for(var l=[],u=0;u<d.length;u++){var A=d.charAt(u);0<=EditorUi.ignoredAnonymizedChars.indexOf(A)?l.push(A):isNaN(parseInt(A))?A.toLowerCase()!=A?l.push(String.fromCharCode(65+Math.round(25* Math.random()))):A.toUpperCase()!=A?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(A)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(A){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,l,u,A,B,F){A=null!=A?A:this.maxImageSize;var M=Math.max(1,d.width),O=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=F?F:f.length,B))try{var H=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d,f){function l(F){if(null!=F){var M=F.lastIndexOf(".");0<M&&(F=F.substring(M+1,F.length));null==f[F]&&(f[F]=!0)}}var u=this.editor.graph,A=u.getCellStyle(d);l(mxStencilRegistry.getBasenameForStencil(A[mxConstants.STYLE_SHAPE]));u.model.isEdge(d)&&(l(mxMarker.getPackageForType(A[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(A[mxConstants.STYLE_ENDARROW])));A=u.model.getChildCount(d);for(var B=0;B<A;B++)this.addBasenamesForCell(u.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
PageSetupDialog.addPageFormatPanel=function(b,e,g,n){function y(O,H,ja){if(ja||R!=document.activeElement&&V!=document.activeElement){O=!1;for(H=0;H<f.length;H++)ja=f[H],B?"custom"==ja.key&&(K.value=ja.key,B=!1):null!=ja.format&&("a4"==ja.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==ja.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width== ja.format.width&&g.height==ja.format.height?(K.value=ja.key,q.setAttribute("checked","checked"),q.defaultChecked=!0,q.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,O=!0):g.width==ja.format.height&&g.height==ja.format.width&&(K.value=ja.key,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,O=E.checked=!0));O?(S.style.display="",L.style.display="none"):(R.value=g.width/100,V.value=g.height/100,q.setAttribute("checked", "checked"),K.value="custom",S.style.display="none",L.style.display="")}}e="format-"+e;var q=document.createElement("input");q.setAttribute("name",e);q.setAttribute("type","radio");q.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var K=document.createElement("select");K.style.marginBottom="8px";K.style.borderRadius="4px";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.width=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(da,ca){},mouseUp:function(da,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<K&&Math.abs(this.scrollTop-E.container.scrollTop)<K&&Math.abs(this.startX-ca.getGraphX())<K&&Math.abs(this.startY-ca.getGraphY())<K&&(0<parseFloat(e.style.opacity||0)?y():q(30))}})}for(var S=this.toolbarItems,G=0,L=mxUtils.bind(this,function(da,ca,ia,ma){da=this.createToolbarButton(da,ca,ia,ma);e.appendChild(da);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),K=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,L=this.graph.pageScale,R=G.width*L;G=G.height*L;L=Math.floor(Math.min(0,K)/R);var V=Math.floor(Math.min(0, S)/G);return new mxRectangle(this.scale*(this.translate.x+L*R),this.scale*(this.translate.y+V*G),this.scale*(Math.ceil(Math.max(1,K+E.width/this.scale)/R)-L)*R,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/G)-V)*G)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.handleError(B);window.openFile=null});"image"!==u.type.substring(0,5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?A.readAsText(u):A.readAsDataURL(u)})(d[l])};EditorUi.prototype.openLocalFile=function(d,f,l,u,A){var B=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var M=mxUtils.parseXml(d);null!=M&&(this.editor.setGraphXml(M.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this, d,f||this.defaultFilename,l,u,A))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=u)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=u)&&null!=B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!= B&&B.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var l in d)f.push(l);return f};EditorUi.prototype.addBasenamesForCell=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(A){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,l,u,A,B,F){A=null!=A?A:this.maxImageSize;var M=Math.max(1,d.width),O=Math.max(1,d.height);if(u&&this.isResampleImageSize(null!=F?F:f.length,B))try{var H=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Actions.prototype.init=function(){function b(G){q.escape();G=q.deleteCells(q.getDeletableCells(q.getSelectionCells()),G);null!=G&&q.setSelectionCells(G)}function e(){if(!q.isSelectionEmpty()){q.getModel().beginUpdate();try{for(var G=q.getSelectionCells(),L=0;L<G.length;L++)q.cellLabelChanged(G[L],"")}finally{q.getModel().endUpdate()}}}function g(G,L,R,V,d){d.getModel().beginUpdate();try{var f=d.getCellGeometry(G);null!=f&&R&&V&&(R/=V,f=f.clone(),1<R?f.height=f.width/R:f.width=f.height*R,d.getModel().setGeometry(G,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable