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 |
|---|---|---|---|---|---|---|---|
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 |
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 |
"gray";B.statusContainer.style.cursor="default";var ja=B.hideCurrentMenu;B.hideCurrentMenu=function(){ja.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var da=B.descriptorChanged;B.descriptorChanged=function(){da.apply(this,arguments);var ha=B.getCurrentFile();if(null!=ha&&null!=ha.getTitle()){var qa=ha.getMode();"google"==qa?qa="googleDrive":"github"==qa?qa="gitHub":"gitlab"==qa?qa="gitLab":"onedrive"==qa&&(qa="oneDrive");qa=mxResources.get(qa);M.setAttribute("title",ha.getTitle()+
(null!=qa?" ("+qa+")":""))}else M.removeAttribute("title")};B.setStatusText(B.editor.getStatus());M.appendChild(B.statusContainer);B.buttonContainer=document.createElement("div");B.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";M.appendChild(B.buttonContainer);B.menubarContainer=B.buttonContainer;B.tabContainer=document.createElement("div");B.tabContainer.className= | 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;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=
"data:page/id,"+l:null==this.getPageById(F)&&delete B.open}}f="data:action/json,"+JSON.stringify(u)}}catch(M){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,l,u,A){var B=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){u=null!=u?u:d.name;var M=mxUtils.bind(this,function(H){F.clear()&& | 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.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var z=F.apply(this,arguments);null==z&&null!=this.globalVars&&(z=this.globalVars[k]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};Graph.prototype.adaptBackgroundPage=function(k,z){if(null!=
k&&null!=k.src){var J=Graph.getSvgFromDataUri(k.src);if(null!=J)try{var W=(new DOMParser).parseFromString(J,"text/xml"),T=W.getElementsByTagName("style");for(J=0;J<T.length;J++)if(T[J].innerHTML==Graph.svgDarkModeCss){T[J].parentNode.removeChild(T[J]);break}if("dark"==z||"auto"==z){var Z=Graph.createSvgDarkModeStyle(W,z);W.getElementsByTagName("defs")[0].appendChild(Z)}k=new mxImage(Editor.createSvgDataUri(mxUtils.getXml(W.documentElement)),k.width,k.height,k.x,k.y)}catch(ba){}}return k};var M=Graph.prototype.getSvg; | 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, | 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.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 |
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 |
"mousemove",function(da){mxEvent.consume(da)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(da){q(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(da){q(100);mxEvent.consume(da)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(da){mxEvent.isTouchEvent(da)||q(30)}));var E=this.graph,K=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(da,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=
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 |
this.scale,0,0,0):null};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,Math.max(0,m*this.scale))}return null};mxUtils.extend(M,mxActor);M.prototype.size=.2;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,m,x,p,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.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 |
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 |
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"+
(null!=ja?"&page="+ja:"")+(A?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",aa+="cursor:pointer;");d&&(aa+="max-width:100%;");var la="";l&&(la=' width="'+Math.round(H.width)+'" height="'+Math.round(H.height)+'"');F('<img src="'+ia+'"'+la+(""!=aa?' style="'+aa+'"':"")+ma+"/>")}var H=this.editor.graph.getGraphBounds(),ja=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ia){var ma=u?this.getFileData(!0):null;ia=this.createImageDataUri(ia, | 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+";"))}}),mxUtils.bind(this,function(){var ca=null;O.getModel().beginUpdate();try{ca=O.insertVertex(O.getDefaultParent(),null,d,O.snap(f),O.snap(l),1,1,"text;"+(u?"html=1;":"")),O.updateCellSize(ca),O.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{O.getModel().endUpdate()}O.setSelectionCell(ca)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,l,B,null,M);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,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 |
L.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",L.height/n))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(q[0]))}}}catch(R){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return 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 |
EditorUi.prototype.showError=function(b,e,g,n,y,q,E,K,S,G,L,R,V){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),n,y,q,E,R,K,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,L||100+20*e,!0,!1,V);b.init()};EditorUi.prototype.showDialog=function(b,e,g,n,y,q,E,K,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,n,y,q,E,K,S,G);this.dialogs.push(this.dialog)}; | 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?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 |
function(B){try{A=A||"objects";Array.isArray(A)||(A=[A],d=[d],f=[f]);var F=B.transaction(A,"readwrite");F.oncomplete=l;F.onerror=u;for(B=0;B<A.length;B++)F.objectStore(A[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(M){null!=u&&u(M)}}),u)};EditorUi.prototype.removeDatabaseItem=function(d,f,l,u){this.openDatabase(mxUtils.bind(this,function(A){u=u||"objects";Array.isArray(u)||(u=[u],d=[d]);A=A.transaction(u,"readwrite");A.oncomplete=f;A.onerror=l;for(var B=0;B<u.length;B++)A.objectStore(u[B]).delete(d[B])}),
l)};EditorUi.prototype.getDatabaseItem=function(d,f,l,u){this.openDatabase(mxUtils.bind(this,function(A){try{u=u||"objects";var B=A.transaction([u],"readonly").objectStore(u).get(d);B.onsuccess=function(){f(B.result)};B.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(d,f,l){this.openDatabase(mxUtils.bind(this,function(u){try{l=l||"objects";var A=u.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),B=[];A.onsuccess=function(F){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.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 |
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 |
function(L){y.apply(this,arguments);this.graph.model.isEdge(L.cell)&&1!=L.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(L)};mxGraphView.prototype.updateLineJumps=function(L){var R=L.absolutePoints;if(Graph.lineJumpsEnabled){var V=null!=L.routedPoints,d=null;if(null!=R&&null!=this.validEdges&&"none"!==mxUtils.getValue(L.style,"jumpStyle","none")){var f=function(ia,ma,aa){var la=new mxPoint(ma,aa);la.type=ia;d.push(la);la=null!=L.routedPoints?L.routedPoints[d.length-1]:null;return null==la||
la.type!=ia||la.x!=ma||la.y!=aa},l=.5*this.scale;V=!1;d=[];for(var u=0;u<R.length-1;u++){for(var A=R[u+1],B=R[u],F=[],M=R[u+2];u<R.length-2&&mxUtils.ptSegDistSq(B.x,B.y,M.x,M.y,A.x,A.y)<1*this.scale*this.scale;)A=M,u++,M=R[u+2];V=f(0,B.x,B.y)||V;for(var O=0;O<this.validEdges.length;O++){var H=this.validEdges[O],ja=H.absolutePoints;if(null!=ja&&mxUtils.intersects(L,H)&&"1"!=H.style.noJump)for(H=0;H<ja.length-1;H++){var da=ja[H+1],ca=ja[H];for(M=ja[H+2];H<ja.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,
M.x,M.y,da.x,da.y)<1*this.scale*this.scale;)da=M,H++,M=ja[H+2];M=mxUtils.intersection(B.x,B.y,A.x,A.y,ca.x,ca.y,da.x,da.y);if(null!=M&&(Math.abs(M.x-B.x)>l||Math.abs(M.y-B.y)>l)&&(Math.abs(M.x-A.x)>l||Math.abs(M.y-A.y)>l)){da=M.x-B.x;ca=M.y-B.y;M={distSq:da*da+ca*ca,x:M.x,y:M.y};for(da=0;da<F.length;da++)if(F[da].distSq>M.distSq){F.splice(da,0,M);M=null;break}null==M||0!=F.length&&F[F.length-1].x===M.x&&F[F.length-1].y===M.y||F.push(M)}}}for(H=0;H<F.length;H++)V=f(1,F[H].x,F[H].y)||V}M=R[R.length-
1];V=f(0,M.x,M.y)||V}L.routedPoints=d;return V}return!1};var q=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(L,R,V){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)q.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))- | 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 |
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),
mxEvent.getClientY(R));K=L();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var V=null!=G?G-g:0;G=L();n(V);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,y,q);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,y,q)})}; | 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 |
var PageSetupDialog=function(b){function e(){var l=R;null!=l&&null!=l.originalSrc&&(l=b.createImageForPageLink(l.originalSrc,null));null!=l&&null!=l.src?(L.style.backgroundImage="url("+l.src+")",L.style.display="inline-block"):(L.style.backgroundImage="",L.style.display="none");L.style.backgroundColor="";null!=V&&V!=mxConstants.NONE&&(L.style.backgroundColor=V,L.style.display="inline-block")}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var y=document.createElement("tbody"); | 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!= | 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 |
PrintDialog.prototype.create=function(b){function e(d){var f=E.checked||G.checked,l=parseInt(R.value)/100;isNaN(l)&&(l=1,R.value="100%");mxClient.IS_SF&&(l*=.75);var u=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,A=1/g.pageScale;if(f){var B=E.checked?1:parseInt(L.value);isNaN(B)||(A=mxUtils.getScaleForPageCount(B,g,u))}var F=B=0;u=mxRectangle.fromRectangle(u);u.width=Math.ceil(u.width*l);u.height=Math.ceil(u.height*l);A*=l;!f&&g.pageVisible?(l=g.getPageLayout(),B-=l.x*u.width,F-=l.y*u.height):
f=!0;f=PrintDialog.createPrintPreview(g,A,u,0,B,F,f);f.open();d&&PrintDialog.printPreview(f)}var g=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var y=document.createElement("tbody");var q=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var K=document.createElement("td");K.setAttribute("colspan","2");K.style.fontSize="10pt";K.appendChild(E);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage")); | 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);var q=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();q.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,L){var R=L.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?E.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(V,d,f){var l=b.getCompositeParent(S.cell);V=b.getCellGeometry(l);for(L.consume();null!=l&&b.model.isVertex(l)&&null!=V&&V.relative;)cell= | 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,null,null,null,u)},null,null,null,u)},null,null,null,u)},null,null,null,u):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",l,null,null,null,u))}),onerror)};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var l=d.split("\n"),u=[],A=[],B=[],F={};if(0<l.length){var M={},O=this.editor.graph,H=null,ja=null,da=null,ca=null,ia=null,ma=null,aa=null,la="whiteSpace=wrap;html=1;",X=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 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 |
f&&f(ca)}}),null,null,null,mxUtils.bind(this,function(ja){null!=f&&f(ja)}),null,null,u,null,B.shadowVisible,null,B,A,null,null,null,"diagram",null)}catch(ja){null!=f&&f(ja)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,l,u,A,B,F,M,O,H,ja,da,ca){M=null!=M?M:!0;ja=null!=ja?ja:0;F=null!=O?O:f.background;F==mxConstants.NONE&&(F=null);B=f.getSvg(F,H,ja,null,null,B,null,null,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(B,null,null,0==ja);null!=d&&B.setAttribute("content",
d);null!=l&&B.setAttribute("resource",l);var ia=mxUtils.bind(this,function(ma){ma=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ma);null!=A&&A(ma);return ma});f.mathEnabled&&this.editor.addMathCss(B);if(null!=A)this.embedFonts(B,mxUtils.bind(this,function(ma){M?this.editor.convertImages(ma,mxUtils.bind(this,function(aa){ia(aa)})):ia(ma)}));else return ia(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{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 |
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 |
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()||
"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"), | 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(",")+
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 | 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]);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 |
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var g=
new mxRectangle(e[0].x,e[0].y,0,0),k=1;k<e.length;k++)f(e[k]);f=g}else k=this.model.getParent(a[d]),e.relative?this.model.isVertex(k)&&k!=this.view.currentRoot&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f=new mxRectangle(e.x*g.width,e.y*g.height,e.width,e.height),0<=mxUtils.indexOf(a,k)&&(f.x+=g.x,f.y+=g.y))):(f=mxRectangle.fromRectangle(e),this.model.isVertex(k)&&0<=mxUtils.indexOf(a,k)&&(g=this.getBoundingBoxFromGeometry([k],!1),null!=g&&(f.x+=g.x,f.y+=g.y))),null!=f&&null!=e.offset&&
(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 |
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 |
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 |
mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=null;if(this.model.isEdge(a[d])){f=function(l){null!=l&&(null==g?g=new mxRectangle(l.x,l.y,0,0):g.add(new mxRectangle(l.x,l.y,0,0)))};null==this.model.getTerminal(a[d],!0)&&f(e.getTerminalPoint(!0));null==this.model.getTerminal(a[d],!1)&&f(e.getTerminalPoint(!1));e=e.points;if(null!=e&&0<e.length)for(var 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 |
mxGraphHandler.prototype.mouseDown=function(a,b){this.mouseDownX=b.getX();this.mouseDownY=b.getY();!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())&&(a=this.getInitialCellForEvent(b),this.delayedSelection=this.isDelayedSelection(a,b),this.cell=null,this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(a,b.getEvent()),this.isMoveEnabled()&&(this.delayedSelection?this.cell=a:this.start(a,b.getX(),b.getY()),
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 |
(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 |
(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 |
function anonymizeHtml(html)
{
div.innerHTML = html;
replaceTextContent(div);
return div.innerHTML;
}; | 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 isAllowedFile(file) {
const allowedFiles = ['manifest.json'];
const allowedPath = '/assets/';
const alwaysDeny = ['.hbs'];
const ext = path.extname(file);
const base = path.basename(file);
return allowedFiles.includes(base) || (file.startsWith(allowedPath) && !alwaysDeny.includes(ext));
} | 0 | JavaScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. | https://cwe.mitre.org/data/definitions/22.html | vulnerable |
$scope.removeXdebugCookie = function(){
$.removeCookie('XDEBUG_TRIGGER');
$scope.hasXdebugCookie = false;
}; | 0 | JavaScript | CWE-614 | Sensitive Cookie in HTTPS Session Without 'Secure' Attribute | The Secure attribute for sensitive cookies in HTTPS sessions is not set, which could cause the user agent to send those cookies in plaintext over an HTTP session. | https://cwe.mitre.org/data/definitions/614.html | vulnerable |
$scope.setXdebugCookie = function(){
$.cookie('XDEBUG_TRIGGER', 'true');
$scope.hasXdebugCookie = true;
}; | 0 | JavaScript | CWE-614 | Sensitive Cookie in HTTPS Session Without 'Secure' Attribute | The Secure attribute for sensitive cookies in HTTPS sessions is not set, which could cause the user agent to send those cookies in plaintext over an HTTP session. | https://cwe.mitre.org/data/definitions/614.html | vulnerable |
function initialize(){destroy();if(!window.Clipboard){pasteCatcher=document.createElement('div');pasteCatcher.id='screenshot-pastezone';pasteCatcher.contentEditable=!0;pasteCatcher.style.opacity=0;pasteCatcher.style.position='fixed';pasteCatcher.style.top=0;pasteCatcher.style.right=0;pasteCatcher.style.width=0;document.body.insertBefore(pasteCatcher,document.body.firstChild);pasteCatcher.focus();document.addEventListener('click',setFocus);document.getElementById('screenshot-zone').addEventListener('click',setFocus)}
window.addEventListener('paste',onPaste,!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 |
function initialize() {
destroy();
if (! window.Clipboard) {
// Insert the content editable at the top to avoid scrolling down in the board view
pasteCatcher = document.createElement('div');
pasteCatcher.id = 'screenshot-pastezone';
pasteCatcher.contentEditable = true;
pasteCatcher.style.opacity = 0;
pasteCatcher.style.position = 'fixed';
pasteCatcher.style.top = 0;
pasteCatcher.style.right = 0;
pasteCatcher.style.width = 0;
document.body.insertBefore(pasteCatcher, document.body.firstChild);
pasteCatcher.focus();
// Set the focus when clicked anywhere in the document
document.addEventListener('click', setFocus);
// Set the focus when clicked in screenshot dropzone
document.getElementById('screenshot-zone').addEventListener('click', setFocus);
}
window.addEventListener('paste', onPaste, false);
} | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.