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
"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(D),y=null):null==y?y=this.createAuthWin(D):y.location=D;null!=y?(window.onGoogleDriveCallback=mxUtils.bind(this,function(z,M){window.onGoogleDriveCallback=null;try{null==z?null!=l&&l({message:mxResources.get("accessDenied")}):this.updateAuthInfo(z,x,!0,k,l)}catch(I){null!=l&&l(I)}finally{null!=M&&M.close()}}),y.focus()):null!=l&&l({message:mxResources.get("allowPopups")})}}catch(z){if(null!=l)l(z);else throw z;
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
Editor.prototype.addFontCss=function(m,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var K=m.getElementsByTagName("defs"),R=m.ownerDocument;0==K.length?(K=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=m.firstChild?m.insertBefore(K,m.firstChild):m.appendChild(K)):K=K[0];m=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"style"):R.createElement("style");m.setAttribute("type","text/css");mxUtils.setTextContent(m,B);K.appendChild(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
this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var B in m)this.globalVars[B]=m[B]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var A=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var B=A.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[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
function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var n=g.clipboardData||g.originalEvent.clipboardData,t=!1,u=0;u<n.types.length;u++)if("text/"===n.types[u].substring(0,5)){t=!0;break}if(!t){var v=n.items;for(index in v){var A=v[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize, function(L,F,S,p,q,C){d.insertImage(L,q,C)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var F=0;F<L.length;F++)L[F]()});else{var H=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],H.x,H.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(L){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){n.innerHTML="&nbsp;";n.focus();document.execCommand("selectAll",!1,null)},0)}var g=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
function(m){this.model.beginUpdate();try{for(var B=0;B<m.length;B++)this.model.setVisible(m[B],!this.model.isVisible(m[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,B){this.model.beginUpdate();try{for(var K=0;K<m.length;K++)this.model.setVisible(m[K],B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,B,K,R){for(var U=0;U<m.length;U++)this.highlightCell(m[U],B,K,R)};Graph.prototype.highlightCell=function(m,B,K,R,U){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;
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.patchPages=function(b,e,f,c,k){var l={},x=[],y={},E={},D={},z={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var M in c[EditorUi.DIFF_UPDATE])l[M]=c[EditorUi.DIFF_UPDATE][M];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)E[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)y[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(M in e[EditorUi.DIFF_UPDATE])c= e[EditorUi.DIFF_UPDATE][M],null!=c.previous&&(z[c.previous]=M);if(null!=b){var I="";for(c=0;c<b.length;c++){var d=b[c].getId();D[d]=b[c];null!=z[I]||E[d]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][d]&&null!=e[EditorUi.DIFF_UPDATE][d].previous||(z[I]=d);I=d}}var g={},n=mxUtils.bind(this,function(u){var v=null!=u?u.getId():"";if(null!=u&&!g[v]){g[v]=!0;x.push(u);var A=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][v]:null;null!=A&&(this.updatePageRoot(u),null!=A.name&&u.setName(A.name), null!=A.view&&this.patchViewState(u,A.view),null!=A.cells&&this.patchPage(u,A.cells,l[u.getId()],k),!f||null==A.cells&&null==A.view||(u.needsUpdate=!0))}u=z[v];null!=u&&(delete z[v],n(D[u]));u=y[v];null!=u&&(delete y[v],t(u))}),t=mxUtils.bind(this,function(u){u=mxUtils.parseXml(u.data).documentElement;u=new DiagramPage(u);this.updatePageRoot(u);var v=D[u.getId()];null==v?n(u):(this.patchPage(v,this.diffPages([v],[u]),l[v.getId()],k),f&&(v.needsUpdate=!0))});n();for(M in z)n(D[z[M]]),delete z[M];for(M in y)t(y[M]), delete y[M];return x};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(C){z=C};this.setAutoScroll=function(C){M=C};this.setOpenFill=function(C){I=C};this.setStopClickEnabled=function(C){n=C};this.setSelectInserted=function(C){t=C};this.setSmoothing=function(C){f=C};this.setPerfectFreehandMode=function(C){v=C};this.isPerfectFreehandMode=function(){return v};this.setBrushSize=function(C){u.size=C};this.getBrushSize=function(){return u.size};var A=function(C){g=C;b.getRubberband().setEnabled(!C);b.graphHandler.setSelectEnabled(!C);b.graphHandler.setMoveEnabled(!C);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
za.className="gePropHeaderCell";var Ba=document.createElement("img");Ba.src=Sidebar.prototype.expandedImage;Ba.style.verticalAlign="middle";za.appendChild(Ba);mxUtils.write(za,mxResources.get("property"));ea.style.cursor="pointer";var Ca=function(){var oa=ma.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ba.src=Sidebar.prototype.collapsedImage;var sa="none";for(var va=m.childNodes.length-1;0<=va;va--)try{var Ea=m.childNodes[va],Da=Ea.nodeName.toUpperCase();"INPUT"!=Da&& "SELECT"!=Da||m.removeChild(Ea)}catch(Qa){}}else Ba.src=Sidebar.prototype.expandedImage,sa="";for(va=0;va<oa.length;va++)oa[va].style.display=sa};mxEvent.addListener(ea,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ca()});ea.appendChild(za);za=document.createElement("th");za.className="gePropHeaderCell";za.innerHTML=mxResources.get("value");ea.appendChild(za);ma.appendChild(ea);var ba=!1,fa=!1;ea=null;1==K.vertices.length&&0==K.edges.length?ea=K.vertices[0].id:
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
OneDriveFile.prototype.saveFile=function(b,e,f,c,k,l){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var x=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var y=l||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),E=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(D,z){this.setModified(this.getShadowModified()); this.savingFile=!1;this.meta=D;this.fileSaved(z,E,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(D,z){try{this.savingFile=!1,this.isConflict(z)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();x()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&& c(D)}catch(M){if(this.savingFile=!1,null!=c)c(M);else throw M;}}),y)}catch(D){if(this.savingFile=!1,null!=c)c(D);else throw D;}});x()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(y){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(y)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
ua.innerText=ka;ha.appendChild(ua);qa.appendChild(ha);mxEvent.addListener(ha,"click",function(){function Ma(){var Aa=Ia.querySelector(".geTemplateDrawioCatLink");null!=Aa?Aa.click():setTimeout(Ma,200)}da=!0;var Ia=N.querySelector(".geTemplatesList");Ia.style.display="block";Ca.style.width="";xa.style.display="";xa.value="";Z=null;Ma()});ma.style.display=ja.length<=la?"none":""}function p(ja,aa,la){function na(La,Xa){La=mxResources.get(La,null,La.substring(0,1).toUpperCase()+La.substring(1));var Sa= La+" ("+Xa.length+")",Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"&hellip;");return{lbl:La+" ("+Xa.length+")",fullLbl:Sa,lblOnly:Ta}}function pa(La,Xa,Sa,Ta,Pa){mxEvent.addListener(Sa,"click",function(){B!=Sa&&(null!=B?(B.style.fontWeight="normal",B.style.textDecoration="none"):(fa.style.display="none",ba.style.minHeight="100%"),B=Sa,B.style.fontWeight="bold",B.style.textDecoration="underline",Ca.scrollTop=0,T&&(m=!0),za.innerHTML=Xa,Ba.style.display="none",F(Pa?aa[La]:Ta?
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
TrelloClient.prototype.getFile=function(b,e,f,c,k){k=null!=k?k:!1;var l=mxUtils.bind(this,function(){var x=b.split(this.SEPARATOR),y=!0,E=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);Trello.cards.get(x[0]+"/attachments/"+x[1],mxUtils.bind(this,function(D){window.clearTimeout(E);if(y){var z=/\.png$/i.test(D.name),M={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(D.name)|| /\.gliffy$/i.test(D.name)||!this.ui.useCanvasForExport&&z?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(D.url),D.name,D.mimeType,this.extension,e,f,null,M):(y=!0,E=window.setTimeout(mxUtils.bind(this,function(){y=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(D.url),mxUtils.bind(this,function(I){window.clearTimeout(E);if(y){D.compoundId=b;if(0<(z?I.lastIndexOf(","):-1)){var d=this.ui.extractGraphModelFromPng(I);null!=d&&0<d.length&& (I=d)}k?e(new TrelloLibrary(this.ui,I,D)):e(new TrelloFile(this.ui,I,D))}}),mxUtils.bind(this,function(I,d){window.clearTimeout(E);y&&(401==d.status?this.authenticate(l,f,!0):f())}),z||null!=D.mimeType&&"image/"==D.mimeType.substring(0,6),null,null,null,M))}}),mxUtils.bind(this,function(D){window.clearTimeout(E);y&&(null!=D&&401==D.status?this.authenticate(l,f,!0):f())}))});this.authenticate(l,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,k){this.insertFile(b,e,f,c,!0,k)};
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!=this.currentState&&K.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(K){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&& mxClient.IS_FF&&mxClient.IS_WIN&&null==K.getState()&&mxEvent.isTouchEvent(K.getEvent())};var Y=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Y=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Y)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(K){return mxEvent.isMouseEvent(K.getEvent())};
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
mxAsyncCanvas.prototype.text=function(b,e,f,c,k,l,x,y,E,D,z,M){if(null!=k&&0!=k.length&&(b=this.state.scale,"html"==E&&"function"===typeof html2canvas)){this.incWaitCounter();var I=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(d){this.htmlCanvas.subCanvas[I]=d;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=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
"min"!=Editor.currentTheme||this.addMenuItems(p,["publishLink"],q);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(p.addSeparator(q),c.menus.addSubmenu("embed",p,q))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(p,q){function C(P){P.pickFile(function(O){c.spinner.spin(document.body,mxResources.get("loading"))&&P.getFile(O,function(N){var T="data:image/"==N.getData().substring(0,11)?G(N.getTitle()): "text/xml";/\.svg$/i.test(N.getTitle())&&!c.editor.isDataSvg(N.getData())&&(N.setData(Editor.createSvgDataUri(N.getData())),T="image/svg+xml");J(N.getData(),T,N.getTitle())},function(N){c.handleError(N,null!=N?mxResources.get("errorLoadingFile"):null)},P==c.drive)},!0)}var J=mxUtils.bind(this,function(P,O,N){var T=k.view,m=k.getGraphBounds(),B=k.snap(Math.ceil(Math.max(0,m.x/T.scale-T.translate.x)+4*k.gridSize)),K=k.snap(Math.ceil(Math.max(0,(m.y+m.height)/T.scale-T.translate.y)+4*k.gridSize));"data:image/"==
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
Editor.createRoughCanvas=function(m){var B=rough.canvas({getContext:function(){return m}});B.draw=function(K){var R=K.sets||[];K=K.options||this.getDefaultOptions();for(var U=0;U<R.length;U++){var W=R[U];switch(W.type){case "path":null!=K.stroke&&this._drawToContext(m,W,K);break;case "fillPath":this._drawToContext(m,W,K);break;case "fillSketch":this.fillSketch(m,W,K)}}};B.fillSketch=function(K,R,U){var W=m.state.strokeColor,Q=m.state.strokeWidth,V=m.state.strokeAlpha,X=m.state.dashed,Y=U.fillWeight;
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.bind(this,function(W){window.clearTimeout(R);K&&B(Editor.createSvgDataUri(W.getText()))}),function(){window.clearTimeout(R);K&&B(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(R);if(K)try{var W=document.createElement("canvas"),Q=W.getContext("2d");W.height=U.height;W.width=U.width;Q.drawImage(U,0,0);B(W.toDataURL())}catch(V){B(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(R); K&&B(Editor.svgBrokenImage.src)};U.src=m}}catch(W){B(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(m,B,K,R){null==R&&(R=this.createImageUrlConverter());var U=0,W=K||{};K=mxUtils.bind(this,function(Q,V){Q=m.getElementsByTagName(Q);for(var X=0;X<Q.length;X++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(V));if(null!=Z&&"data:"!=Z.substring(0,5)){var ca=W[Z];null==ca?(U++,this.convertImageToDataUri(Z,function(da){null!=da&&(W[Z]=da,Y.setAttribute(V,
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);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(U){B=null});this.isMouseInsertPoint=function(){return null!=B};var K=this.getInsertPoint;this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):K.apply(this,arguments)};var R=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var W=this.graph.getCellStyle(U);if(null!=W&&"rack"==W.childLayout){var Q=new mxStackLayout(this.graph,!1);Q.gridSize=null!=W.rackUnitSize?
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
"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(m){var B=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?B="mxgraph.er":"sysML"==m.substring(0,5)&&(B="mxgraph.sysml"));return B};var G=mxMarker.createMarker;mxMarker.createMarker=function(m,B,K,R,U,W,Q,V,X,Y){if(null!=K&&null==mxMarker.markers[K]){var Z=this.getPackageForType(K);null!=Z&& mxStencilRegistry.getStencil(Z)}return G.apply(this,arguments)};var P=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,B,K,R,U,W){"1"==mxUtils.getValue(B.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return P.apply(this,arguments)};PrintDialog.prototype.create=function(m,B){function K(){da.value=Math.max(1,Math.min(V,Math.max(parseInt(da.value),parseInt(ca.value))));ca.value=Math.max(1,Math.min(V,Math.min(parseInt(da.value),
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.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(u?"&edit=_blank":"")+(v?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),d&&(d=parseInt(H.getAttribute("width")),u=parseInt(H.getAttribute("height")),H.setAttribute("viewBox","-0.5 -0.5 "+d+" "+u),q+="max-width:100%;max-height:"+u+"px;",H.removeAttribute("height")),""!=q&&H.setAttribute("style",q),this.editor.addFontCss(H),this.editor.graph.mathEnabled&&this.editor.addMathCss(H),A(mxUtils.getXml(H))};EditorUi.prototype.timeSince=function(d){d= Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var n=null;if("diagram"==d.nodeName)n=
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.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=B.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,B){try{var K=!0,R=window.setTimeout(mxUtils.bind(this,function(){K=!1;B(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(m))mxUtils.get(m, mxUtils.bind(this,function(W){window.clearTimeout(R);K&&B(Editor.createSvgDataUri(W.getText()))}),function(){window.clearTimeout(R);K&&B(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(R);if(K)try{var W=document.createElement("canvas"),Q=W.getContext("2d");W.height=U.height;W.width=U.width;Q.drawImage(U,0,0);B(W.toDataURL())}catch(V){B(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(R); K&&B(Editor.svgBrokenImage.src)};U.src=m}}catch(W){B(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(m,B,K,R){null==R&&(R=this.createImageUrlConverter());var U=0,W=K||{};K=mxUtils.bind(this,function(Q,V){Q=m.getElementsByTagName(Q);for(var X=0;X<Q.length;X++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(V));if(null!=Z&&"data:"!=Z.substring(0,5)){var ca=W[Z];null==ca?(U++,this.convertImageToDataUri(Z,function(da){null!=da&&(W[Z]=da,Y.setAttribute(V,
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.update)};var z=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?z.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var M=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=M.apply(this,arguments);var B=this.editorUi, K=B.editor.graph;if(K.isEnabled()){var R=B.getCurrentFile();null!=R&&R.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(Q){B.editor.setAutosave(Q);B.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(Q){this.listener=function(){Q(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&K.isEnabled()&& "undefined"!==typeof MathJax){var U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(Q){B.actions.get("mathematicalTypesetting").funct()},{install:function(Q){this.listener=function(){Q(K.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});m.appendChild(U);var W=B.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");W.style.position="relative";W.style.marginLeft= "6px";U.appendChild(W)}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",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
EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d= this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
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
R));this.graph.isRelativeUrl(Q)&&(Q=null!=U?U+Q:window.location.protocol+"//"+window.location.hostname+("/"==Q.charAt(0)?"":m)+Q);B.push('url("'+Q+'"'+K[W].substring(R))}else B.push(K[W])}else B=[m]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(m,B,K){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+encodeURIComponent(B));K(m,B)};Editor.prototype.embedCssFonts=function(m,B){var K=m.split("url("),R=0;null==this.cachedFonts&&(this.cachedFonts={});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
return R};Editor.getDiagramNodeXml=function(m){var B=mxUtils.getTextContent(m),K=null;0<B.length?K=Graph.decompress(B):null!=m.firstChild&&(K=mxUtils.getXml(m.firstChild));return K};Editor.extractGraphModelFromPdf=function(m){m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var B=m.indexOf("EmbeddedFile");if(-1<B){var K=m.indexOf("stream",B)+9;if(0<m.substring(B,K).indexOf("application#2Fvnd.jgraph.mxfile"))return B=m.indexOf("endstream",
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return S.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var B="1"==mxUtils.getValue(m.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
[J]);return J};var G=new mxRubberband(this);this.getRubberband=function(){return G};var D=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var K=this.currentState;N.apply(this,arguments);K!=this.currentState?(D=(new Date).getTime(),F=0):F=(new Date).getTime()-D};var R=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(K){return mxEvent.isShiftDown(K.getEvent())&&mxEvent.isAltDown(K.getEvent())?!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
0>Y&&(Y=U.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(U.fill||"");m.setStrokeWidth(Y);m.setDashed(!1);this._drawToContext(K,R,U);m.setDashed(X);m.setStrokeWidth(Q);m.setStrokeColor(W);m.setStrokeAlpha(V)};B._drawToContext=function(K,R,U){K.begin();for(var W=0;W<R.ops.length;W++){var Q=R.ops[W],V=Q.data;switch(Q.op){case "move":K.moveTo(V[0],V[1]);break;case "bcurveTo":K.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":K.lineTo(V[0],V[1])}}K.end();"fillPath"===R.type&& U.filled?K.fill():K.stroke()};return B};(function(){function m(W,Q,V){this.canvas=W;this.rc=Q;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
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.appendChild(this.sidebar.createVertexTemplateFromCells(u,t.w,t.h,t.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==Editor.currentTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)", Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"==Editor.currentTheme&&(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,n,t,u,v,A){d=new ImageDialog(this,d,g,n,t,u,v,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};
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
mxStencilRegistry.getStencil(Z)}return G.apply(this,arguments)};var P=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,B,K,R,U,W){"1"==mxUtils.getValue(B.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return P.apply(this,arguments)};PrintDialog.prototype.create=function(m,B){function K(){da.value=Math.max(1,Math.min(V,Math.max(parseInt(da.value),parseInt(ca.value))));ca.value=Math.max(1,Math.min(V,Math.min(parseInt(da.value),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
document.createElement("canvas");J.width=S;J.height=p;var G=J.toDataURL();C!==G&&(g=C,H=S,L=p)}}}catch(P){}n(g,H,L)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,n){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;g(t)};null!=n&&(t.onerror=n);t.src=d}catch(u){if(null!=n)n(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="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
mxAsyncCanvas.prototype.text=function(b,e,f,c,k,l,x,y,E,D,z,M){if(null!=k&&0!=k.length&&(b=this.state.scale,"html"==E&&"function"===typeof html2canvas)){this.incWaitCounter();var I=this.canvasIndex++;html2canvas(k,{onrendered:mxUtils.bind(this,function(d){this.htmlCanvas.subCanvas[I]=d;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=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
e},ConnectionPointsDialog=function(b,e){function f(){null!=k&&k.destroy()}var c=document.createElement("div");c.style.userSelect="none";var k=null;this.init=function(){function l(J,G,P){J=new mxCell("",new mxGeometry(J,G,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");J.vertex=!0;J.cp=!0;J.constObj=P;return M.addCell(J)}function x(J){J=M.getSelectionCells();M.deleteCells(J)}function y(){var J=parseInt(S.value)||0;J=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
f&&f();this.ui.fileLoaded(I)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,M,E)}))});null!=x?y(x):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(E){y(E)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2";
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
p.setBackgroundImage(J.viewState.backgroundImage);p.getGlobalVariable=function(G){return"page"==G&&null!=J?J.getName():"pagenumber"==G?1:C.apply(this,arguments)};document.body.appendChild(p.container);null!=J&&p.model.setRoot(J.root)}}A=null!=A?A:this.getXmlFileData(u,v,F,S);L=null!=L?L:this.getCurrentFile();d=this.createFileData(A,p,L,window.location.href,d,g,n,t,u,H,F);p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);return d};EditorUi.prototype.getHtml=function(d,g,n,t,u,v){v=
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,A,mxResources.get("cancel"),mxResources.get("discardChanges")):A()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var n in d)g.push(n);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function n(A){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
function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(A,null,null,I,d,g)):(A=b.convertDataUri(A),H=null==H?120:H,L=null==L?100:L,b.hideDialog(),c(A,H,L,I,d,g))},t=function(A,H){if(null!=A){var L=k?null:D.getModel().getGeometry(D.getSelectionCell());null!=L?n(A,L.width,L.height,H):n(A,null,null,H)}else b.hideDialog(),c(null)};this.init=function(){M.focus();if(Graph.fileSupport){M.setAttribute("placeholder",
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
arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,B,K,R,U,W,Q,V,X,Y,Z){t.apply(this,arguments);Graph.processFontAttributes(Z)};var u=mxText.prototype.redraw;mxText.prototype.redraw=function(){u.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,B,K){function R(){for(var ea=Q.getSelectionCells(),za=[],Ba=0;Ba<ea.length;Ba++)Q.isCellVisible(ea[Ba])&& za.push(ea[Ba]);Q.setSelectionCells(za)}function U(ea){Q.setHiddenTags(ea?[]:V.slice());R();Q.refresh()}function W(ea,za){Y.innerText="";if(0<ea.length){var Ba=document.createElement("table");Ba.setAttribute("cellpadding","2");Ba.style.boxSizing="border-box";Ba.style.tableLayout="fixed";Ba.style.width="100%";var Ca=document.createElement("tbody");if(null!=ea&&0<ea.length)for(var ba=0;ba<ea.length;ba++)(function(fa){function qa(){var oa=Q.getCellsForTags([fa],null,null,!0);Q.isEnabled()?Q.setSelectionCells(oa):
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,E,k)}else k()}))):k({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,c,k){var l="/me/drive/root";null!=e&&(l=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+l+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(x){404==x.getStatus()?k(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){k(!0)},function(){k(!1)})): (this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){k(!1)}))}),function(x){k(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,f,c,k){try{var l=e.getData(),x=mxUtils.bind(this,function(E){var D=mxUtils.bind(this,function(M){f(M,l)}),z=this.getItemURL(e.getId());4E6<=E.length?this.writeLargeFile(z,E,D,c,k):this.writeFile(z+"/content/",E,"PUT",null,D,c,k)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var 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
mxEvent.getClientX(K),mxEvent.getClientY(K)),G.start(K.x,K.y)):null!=qa?this.addSelectionCells(qa):1<this.getSelectionCount()&&this.isCellSelected(L)&&this.removeSelectionCell(L);qa=null;U.consume()}}));this.connectionHandler.selectCells=function(K,U){this.graph.setSelectionCell(U||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,U){var L=K.view.graph;return U&&(L.isCellSelected(K.cell)||L.isTableRow(K.cell)&&L.selectionCellsHandler.isHandled(L.model.getParent(K.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
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(Q){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Q):Editor.mathJaxQueue.push(Q)};Editor.onMathJaxDone=function(){};var U=Editor.prototype.init;Editor.prototype.init=function(){U.apply(this,arguments);var Q=mxUtils.bind(this,function(V,X){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Q);this.graph.addListener(mxEvent.REFRESH,Q)};B=document.getElementsByTagName("script");
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.getCurrentCellStyle(G).treeMoving);return P}function l(G){var P=!1;null!=G&&(G=n.getParent(G),P=g.view.getState(G),P="tree"==(null!=P?P.style:g.getCellStyle(G)).containerType);return P}function x(G){var P=!1;null!=G&&(G=n.getParent(G),P=g.view.getState(G),g.view.getState(G),P=null!=(null!=P?P.style:g.getCellStyle(G)).childLayout);return P}function y(G){G=g.view.getState(G);if(null!=G){var P=g.getIncomingTreeEdges(G.cell);if(0<P.length&&(P=g.view.getState(P[0]),null!=P&&(P=P.absolutePoints,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
d;this.editor.updateGraphComponents();this.editor.graph.refresh();this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()|| !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,g,n){var t=null==d||null==g;n=null!=n?n:24;var u=new Spinner({lines:12,length:n,width:Math.round(n/3),radius:Math.round(n/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=u.spin;u.spin=function(H,L){var F=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"ready";A.postMessage(v,"*");if("json"==urlParams.proto){var H=this.editor.graph.openLink;this.editor.graph.openLink=function(L,F,S){H.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",href:L,target:F,allowOpener:S}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,n,t){var u="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,v=document.createElement("button");v.setAttribute("title",d+(null!=n?" ("+n+")":""));v.style.marginLeft="6px"; mxUtils.write(v,d);u?(v.className=t?"gePrimaryBtn":"",v.style.marginLeft="8px",v.style.padding="6px"):v.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(v,"click",g);return v};EditorUi.prototype.addEmbedButtons=function(){var d=document.createElement("div");d.style.display="inline-flex";d.style.alignItems="center";d.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(d.style.marginRight="66px",d.style["float"]=
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
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,k=[],l,x=[],y,E=!1,D=!0,z=!0,M=!0,I=!0,d=[],g=!1,n=!1,t=!1,u={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},v=!0;this.setClosedPath=function(C){E=C};this.setAutoClose=function(C){D=C};this.setAutoInsert=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var B=m.convert,K=this;m.convert=function(R){if(null!=R){var U="http://"==R.substring(0,7)||"https://"==R.substring(0,8);U&&!navigator.onLine?R=Editor.svgBrokenImage.src:!U||R.substring(0,m.baseUrl.length)== m.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=B.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,B){try{var K=!0,R=window.setTimeout(mxUtils.bind(this,function(){K=!1;B(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(m))mxUtils.get(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
J.translate(Math.floor((1-q.x)/C),Math.floor((1-q.y)/C));J.scale(1/C);var P=0,O=J.save;J.save=function(){P++;O.apply(this,arguments)};var N=J.restore;J.restore=function(){P--;N.apply(this,arguments)};var T=p.drawShape;p.drawShape=function(m){mxLog.debug("entering shape",m,P);T.apply(this,arguments);mxLog.debug("leaving shape",m,P)};p.drawState(k.getView().getState(k.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",P)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
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.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[e[A]])}}finally{f.getModel().endUpdate()}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(A){13==A.keyCode&&v.click()});l=document.createElement("div");l.style.marginTop="20px";l.style.textAlign="right";b.editor.cancelFirst?(l.appendChild(c),l.appendChild(v)):(l.appendChild(v),l.appendChild(c));k.appendChild(l);this.container=k},LibraryDialog=function(b,e,f,c,k,l){function x(S){for(S=document.elementFromPoint(S.clientX,
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
mxResources.get("pageWithNumber",[da+1]),mxUtils.write(ma,ea),ma.setAttribute("title",ea+" ("+D[da].getAttribute("id")+")"),ma.setAttribute("value",da),da==z&&ma.setAttribute("selected","selected"),N.appendChild(ma);T=function(){try{var Ca=parseInt(N.value);z=E=Ca;za(D[Ca])}catch(ba){N.value=E,b.handleError(ba)}}}else Ba(ea);da=V.lastModifyingUserName;null!=da&&20<da.length&&(da=da.substring(0,20)+"...");G.innerText="";mxUtils.write(G,(null!=da?da+" ":"")+X.toLocaleDateString()+" "+X.toLocaleTimeString());
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!=this.currentState&&K.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(K){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
J.translate(Math.floor((1-q.x)/C),Math.floor((1-q.y)/C));J.scale(1/C);var P=0,O=J.save;J.save=function(){P++;O.apply(this,arguments)};var N=J.restore;J.restore=function(){P--;N.apply(this,arguments)};var T=p.drawShape;p.drawShape=function(m){mxLog.debug("entering shape",m,P);T.apply(this,arguments);mxLog.debug("leaving shape",m,P)};p.drawState(k.getView().getState(k.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",P)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
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
X+O.x)*W,((J.y+ha)*L+O.y)*W,X*W,L*W));K=U.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,U){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var z=this.graphHandler.getCells;this.graphHandler.getCells=
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
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||v():v()});g?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else v();return u};EditorUi.prototype.getHashValueForPages=function(d,g){var n=0,t=new mxGraphModel,u=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var v=0;v<d.length;v++){this.updatePageRoot(d[v]);var A=d[v].node.cloneNode(!1);A.removeAttribute("name");t.root=d[v].root; var H=u.encode(t);this.editor.graph.saveViewState(d[v].viewState,H,!0);H.removeAttribute("pageWidth");H.removeAttribute("pageHeight");A.appendChild(H);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);n=(n<<5)-n+this.hashValue(A,function(L,F,S,p){return!p||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=F&&"y"!=F&&"width"!=F&&"height"!=F?p&&"mxCell"==L.nodeName&&"previous"==F?null:S:Math.round(S)},g)<<0}return n};EditorUi.prototype.hashValue=
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?4E3:3E4);F=!0}return F};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,g,n,t){d=d.toDataURL("image/"+n);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<t&&(d=Editor.writeGraphModelToPng(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.style.textAlign="right";g=document.createElement("div");g.className="geToolbarContainer";g.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function p(G){if(null!=G){var P=G.getAttribute("background");if(null==P||""==P||P==mxConstants.NONE)P=Editor.isDarkMode()?"transparent":"#ffffff";t.style.backgroundColor=P;(new mxCodec(G.ownerDocument)).decode(G,u.getModel());u.maxFitScale=1;u.fit(8);u.center()}return 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
Editor.createRoughCanvas=function(m){var B=rough.canvas({getContext:function(){return m}});B.draw=function(K){var R=K.sets||[];K=K.options||this.getDefaultOptions();for(var U=0;U<R.length;U++){var W=R[U];switch(W.type){case "path":null!=K.stroke&&this._drawToContext(m,W,K);break;case "fillPath":this._drawToContext(m,W,K);break;case "fillSketch":this.fillSketch(m,W,K)}}};B.fillSketch=function(K,R,U){var W=m.state.strokeColor,Q=m.state.strokeWidth,V=m.state.strokeAlpha,X=m.state.dashed,Y=U.fillWeight; 0>Y&&(Y=U.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(U.fill||"");m.setStrokeWidth(Y);m.setDashed(!1);this._drawToContext(K,R,U);m.setDashed(X);m.setStrokeWidth(Q);m.setStrokeColor(W);m.setStrokeAlpha(V)};B._drawToContext=function(K,R,U){K.begin();for(var W=0;W<R.ops.length;W++){var Q=R.ops[W],V=Q.data;switch(Q.op){case "move":K.moveTo(V[0],V[1]);break;case "bcurveTo":K.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":K.lineTo(V[0],V[1])}}K.end();"fillPath"===R.type&& U.filled?K.fill():K.stroke()};return B};(function(){function m(W,Q,V){this.canvas=W;this.rc=Q;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
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])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(u=0;u<n.length;u++)g.model.execute(new ChangePage(this,n[u],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,n,t,u,v,A,H,L,F,S){g=null!=g?g:this.editor.graph;u=null!=u?u:!1;L=null!=L?L:!0;S=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
l))}catch(u){k(u)}}),k)}),k)):c(new GitHubFile(this.ui,f,{org:E,repo:D,ref:z,name:e,path:M,sha:d,isNew:!0})):k()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,k){var l=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(x){l();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){k()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
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
if(null!=B&&0<B.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",m);B[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var B="",K=[""],R=0,U=!0,W;m=$jscomp.makeIterator(m);for(W=m.next();!W.done;W=m.next())W=W.value,'"'===W?(U&&W===B&&(K[R]+=W),U=!U):","===W&&U?W=K[++R]="":K[R]+=W,B=W;return K}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
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
"transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==u&&t()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var E=EditorUi.prototype.isFormatPanelVisible;
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
preview:aa.getAttribute("preview"),clibs:ha,tags:aa.getAttribute("tags")};ka.push(ha);null!=na&&(ka=va[pa],null==ka&&(ka={},va[pa]=ka),pa=ka[na],null==pa&&(pa=[],ka[na]=pa),pa.push(ha))}aa=aa.nextSibling}N.stop();p()}})};C.appendChild(qa);C.appendChild(ta);C.appendChild(fa);var Ua=!1,ja=z;/^https?:\/\//.test(ja)&&!b.editor.isCorsEnabledForUrl(ja)&&(ja=PROXY_URL+"?url="+encodeURIComponent(ja));N.spin(fa);null!=t?t(function(aa,la){Ea=aa;V=Da=la;Va()},Va):Va();Q=sa}mxEvent.addListener(P,"keypress",function(aa){b.dialog.container.firstChild==
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
J.y,null,null,null,null,mxUtils.bind(this,function(G){return g.getCenterInsertPoint(g.getBoundingBoxFromGeometry(G,!0))}),"simple"==d,!1)}mxEvent.consume(C)}));A.style.backgroundSize="24px";"simple"==d?A.style.flexShrink="0":A.style.marginBottom="4px";var F=!1,S=mxUtils.bind(this,function(C){if(C||document.body.contains(n)){C=function(O,N,T,m,B,K){null!=N&&O.setAttribute("title",N);O.style.cursor="pointer";O.style.margin="simple"==d?"0px":"8px 0px 8px 2px";O.style.display="simple"==d?"inline-block": "block";n.appendChild(O);"simple"==d?O.style.opacity="0.7":null!=m&&(N=B,N=null!=N?N:30,K=null!=K?K:26,O.style.position="relative",O.style.overflow="visible",T=document.createElement("div"),T.style.position="absolute",T.style.fontSize="8px",T.style.left=N+"px",T.style.top=K+"px",mxUtils.write(T,m),O.appendChild(T));return O};n.innerText="";if(!F){var J=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==d&&(this.sidebar.graph.cellRenderer.minSvgStrokeWidth=
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
v.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return n.checked?"blank"===v.value?"_blank":u:null},getEditInput:function(){return n},getEditSelect:function(){return v}}};EditorUi.prototype.addLinkSection=function(d,g){function n(){var H=document.createElement("div");H.style.width="100%";H.style.height="100%";H.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(H.style.border="1px solid black",H.style.backgroundColor=v):(H.style.backgroundPosition="center center", H.style.backgroundRepeat="no-repeat",H.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(H)}mxUtils.write(d,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));t.appendChild(u);u=document.createElement("option");
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
"cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}t&&b.setSelectionCells([J])}}for(J=0;J<k.length;J++)k[J].parentNode.removeChild(k[J]);c=null;k=[];x=[]}A(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(C,J){C=J.getProperty("eventName");J=J.getProperty("event");C==mxEvent.MOUSE_MOVE&&g&&(null!=J.sourceState&&J.sourceState.setCursor("crosshair"),J.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(C,J){if(b.isEnabled()&&
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
"geBtn gePrimaryBtn";var m=document.createElement("img");m.setAttribute("src",Sidebar.prototype.searchImage);m.setAttribute("title",mxResources.get("preview"));m.className="geActiveButton";m.style.position="absolute";m.style.cursor="default";m.style.padding="8px";m.style.right="0px";m.style.top="0px";var B=!1,K=null,R=!1;if(M||I){var U=[],W=null,Q=null,V=null,X=function(aa){T.setAttribute("disabled","disabled");for(var la=0;la<U.length;la++)U[la].className=la==aa?"geBtn gePrimaryBtn":"geBtn"};J=!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
mxUtils.bind(this,function(da){this.cachedFonts[X]=da;R--;U()}),mxUtils.bind(this,function(da){R--;U()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[m].substring(0,W)),Q)}U()}else B(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=B;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&& (m[B]=Graph.fontMapping[B]);return m};Editor.prototype.embedExtFonts=function(m){var B=this.graph.getCustomFonts();if(0<B.length){var K=[],R=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==R&&this.embedCssFonts(K.join(""),m)}),W=0;W<B.length;W++)mxUtils.bind(this,function(Q,V){Graph.isCssFontUrl(V)?null==this.cachedGoogleFonts[V]?(R++,this.loadUrl(V,mxUtils.bind(this,function(X){this.cachedGoogleFonts[V]=X;K.push(X+"\n");
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
N.spin(fa);var la=function(na,pa,ha){O=0;N.stop();Ga=na;ha=ha||{};var ka=0,ua;for(ua in ha)ka+=ha[ua].length;if(pa)fa.innerText=pa;else if(0==na.length&&0==ka)fa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(fa.innerText="",0<ka){ta.style.display="";fa.style.left="160px";ta.innerText="";Da=0;sa={"draw.io":na};for(ua in ha)sa[ua]=ha[ua];p()}else v(!0)};aa?I(Z.value,la):M(la)};M&&(q=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),n.appendChild(q),U.push(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
1024*v,H=Math.min(A+1024,n),L=Array(H-A),F=0;A<H;++F,++A)L[F]=d[A].charCodeAt(0);u[v]=new Uint8Array(L)}return new Blob(u,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,n,t,u,v,A,H){v=null!=v?v:!1;A=null!=A?A:"vsdx"!=u&&(!mxClient.IS_IOS||!navigator.standalone);u=this.getServiceCount(v);isLocalStorage&&u++;var L=4>=u?2:6<u?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(F,S){try{if("_blank"==S)if(null!=n&&"image/"==n.substring(0,6))this.openInNewWindow(d,n,t);else if(null!=n&&"text/html"== n.substring(0,9)){var p=new EmbedDialog(this,d);this.showDialog(p.container,450,240,!0,!0);p.init()}else{var q=window.open("about:blank");null==q?mxUtils.popup(d,!0):(q.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),q.document.close())}else S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,F,n,t,null,H):null!=F&&0<F.length&&this.pickFolder(S,mxUtils.bind(this,function(C){try{this.exportFile(d,F,n,t,S,C)}catch(J){this.handleError(J)}}))}catch(C){this.handleError(C)}}),mxUtils.bind(this, function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,v,A,null,1<u,L,d,n,t);v=this.isServices(u)?u>L?390:280:160;this.showDialog(g.container,420,v,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(d,g,n){var t=window.open("about:blank");null==t||null==t.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||n?(d=n?d:btoa(unescape(encodeURIComponent(d))),t.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+
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),aa,1),J=a.getDefaultTranslate(W);this.x0=W.x;this.y0=W.y;a.setScrollbarPositions(e.currentPage.viewState,J.x,J.y);if(J.x!=this.translate.x||J.y!=this.translate.y){this.setTranslate(J.x,J.y);return}}W=a.getPagePadding();J=a.getPageSize();this.translate.x=W.x-(this.x0||0)*J.width;this.translate.y=W.y-(this.y0||0)*J.height}V.apply(this,arguments)};if(!a.isViewer()){var da=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize(); if(!this.autoTranslate){var W=this.getPageLayout(),J=this.getDefaultTranslate(W),ha=this.view.translate.x,oa=this.view.translate.y;if(J.x!=ha||J.y!=oa){this.view.x0=W.x;this.view.y0=W.y;this.autoTranslate=!0;this.view.setTranslate(J.x,J.y);this.container.scrollLeft+=Math.round((J.x-ha)*this.view.scale);this.container.scrollTop+=Math.round((J.y-oa)*this.view.scale);this.autoTranslate=!1;return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=
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
"-rev_"+this.ui.hashValue(y):"")+(null!=u?"-latest_"+u:"")+(null!=n?"-latestRev_"+this.ui.hashValue(n.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+I,action:k,label:"user_"+M+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+"-size_"+this.getSize()})}catch(v){}}),b)}}catch(n){}};
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 BackgroundImageDialog=function(b,e,f,c,k){function l(){null==C||C==mxConstants.NONE?(q.style.display="none",S.checked=!1):(q.style.backgroundColor=C,q.style.display="",S.checked=!0)}var x=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var E=document.createElement("h2");mxUtils.write(E,mxResources.get("background"));E.style.marginTop="0px";y.appendChild(E);var D=null!=f&&null!=f.originalSrc;E=!1;var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";
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
"checked"):(I=parseInt(P[5]),A.value=I,t.setAttribute("checked","checked"),v.style.visibility="visible"):n.setAttribute("checked","checked")):f=null}else f=null}catch(U){}d.style=g+(f?f:k());d.vertex=!0;z.addCell(d,null,null,null,null);z.selectAll();z.addListener(mxEvent.CELLS_MOVED,F);z.addListener(mxEvent.CELLS_RESIZED,F);var B=z.graphHandler.mouseUp,K=z.graphHandler.mouseDown;z.graphHandler.mouseUp=function(){B.apply(this,arguments);D.style.backgroundColor="#fff9"};z.graphHandler.mouseDown=function(){K.apply(this, arguments);D.style.backgroundColor=""};z.dblClick=function(){};var R=z.getSelectionModel().changeSelection;z.getSelectionModel().changeSelection=function(){R.call(this,[d],[d])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";y.appendChild(E);x.appendChild(y);var D=document.createElement("div");D.style.width="300px";D.style.height="300px";D.style.overflow="hidden";D.style.backgroundColor="#fff9";x.appendChild(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
"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&y.appendChild(f);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(M.value=A.url));M.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("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
{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(m,B,K){if(null!=B){var R=function(W){if(null!=W)if(K)for(var Q=0;Q<W.length;Q++)B[W[Q].name]=W[Q];else for(var V in B){var X=!1;for(Q=0;Q<W.length;Q++)if(W[Q].name==V&&W[Q].type==B[V].type){X=!0;break}X||delete B[V]}},U=this.editorUi.editor.graph.view.getState(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
arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,B,K,R,U,W,Q,V,X,Y,Z){t.apply(this,arguments);Graph.processFontAttributes(Z)};var u=mxText.prototype.redraw;mxText.prototype.redraw=function(){u.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,B,K){function R(){for(var ea=Q.getSelectionCells(),za=[],Ba=0;Ba<ea.length;Ba++)Q.isCellVisible(ea[Ba])&&
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(J){this.spinner.stop();try{this.saveCanvas(J,u?this.getFileData(!0,null,null,null,n,H):null,L,null==this.pages||0==this.pages.length,S)}catch(G){this.handleError(G)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,n,d||1,g,t,null,null,v,A,F,p,q)}catch(J){this.spinner.stop(),this.handleError(J)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=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
window.console&&console.error(K,N,T)}}function k(N){if(b.shareCursorPosition&&!z.isMouseDown){var T=mxUtils.getOffset(z.container),m=z.view.translate,B=z.view.scale,K=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:K,x:Math.round((N.getX()-T.x+z.container.scrollLeft)/B-m.x),y:Math.round((N.getY()-T.y+z.container.scrollTop)/B-m.y)})}}function l(N,T){var m=null!=b.currentPage?b.currentPage.getId():null;if(null!=N&&null!=N.cursor&&null!=N.lastCursor)if(null!=N.lastCursor.hide||!b.isShowRemoteCursors()||
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
"#ffffff";u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var v=mxUtils.parseXml(f),A=b.editor.extractGraphModel(v.documentElement,!0),H=0,L=null,F=u.getGlobalVariable;u.getGlobalVariable=function(p){return"page"==p&&null!=L&&null!=L[H]?L[H].getAttribute("name"):"pagenumber"==p?H+1:"pagecount"==p?null!=L?L.length:1:F.apply(this,arguments)};u.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,
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
"keys",Da,"values",Qa,"cells",ca.getSelectionCells()))}finally{ca.getModel().endUpdate()}}function U(oa,sa,va){var Ea=mxUtils.getOffset(m,!0),Da=mxUtils.getOffset(oa,!0);sa.style.position="absolute";sa.style.left=Da.x-Ea.x+"px";sa.style.top=Da.y-Ea.y+"px";sa.style.width=oa.offsetWidth+"px";sa.style.height=oa.offsetHeight-(va?4:0)+"px";sa.style.zIndex=5}function W(oa,sa,va){var Ea=document.createElement("div");Ea.style.width="32px";Ea.style.height="4px";Ea.style.margin="2px";Ea.style.border="1px solid black"; Ea.style.background=sa&&"none"!=sa?sa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(Da){this.editorUi.pickColor(sa,function(Qa){Ea.style.background="none"==Qa?"url('"+Dialog.prototype.noColorImage+"')":Qa;R(oa,Qa,va)});mxEvent.consume(Da)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ea);return btn}function Q(oa,sa,va,Ea,Da,Qa,Fa){null!=sa&&(sa=sa.split(","),da.push({name:oa,values:sa,type:va,defVal:Ea,countProperty: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
else{var ua=function(wa){oa&&b.sidebar.currentElt==aa&&ha(wa,mxEvent.getClientX(na),mxEvent.getClientY(na));oa=!1;la.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=aa;oa=!0;la.src="/images/aui-wait.gif";ja.isExt?E(ja,ua,function(){n(mxResources.get("cantLoadPrev"));oa=!1;la.src="/images/icon-search.svg"}):pa(ja.url,ua)}}function A(ja,aa,la){if(null!=R){for(var na=R.className.split(" "),pa=0;pa<na.length;pa++)if(-1<na[pa].indexOf("Active")){na.splice(pa,1);break}R.className= na.join(" ")}null!=ja?(R=ja,R.className+=" "+aa,U=la,ia.className="geTempDlgCreateBtn"):(U=R=null,ia.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function H(ja,aa){if(null!=U){var la=function(ua){ka.isExternal?E(ka,function(wa){na(wa,ua)},pa):ka.url?mxUtils.get(TEMPLATE_PATH+"/"+ka.url,mxUtils.bind(this,function(wa){200<=wa.getStatus()&&299>=wa.getStatus()?na(wa.getText(),ua):pa()})):na(b.emptyDiagramXml,ua)},na=function(ua,wa){g||b.hideDialog(!0);e(ua,wa,ka,aa)},pa=function(){n(mxResources.get("cannotLoad"));
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
document.createElement("canvas");J.width=S;J.height=p;var G=J.toDataURL();C!==G&&(g=C,H=S,L=p)}}}catch(P){}n(g,H,L)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,n){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;g(t)};null!=n&&(t.onerror=n);t.src=d}catch(u){if(null!=n)n(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="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
y.getGlobalVariable=function(V){return"page"==V&&null!=D&&null!=D[z]?D[z].getAttribute("name"):"pagenumber"==V?z+1:"pagecount"==V?null!=D?D.length:1:M.apply(this,arguments)};y.getLinkForCell=function(){return null};Editor.MathJaxRender&&y.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(V,X){b.editor.graph.mathEnabled&&Editor.MathJaxRender(y.container)}));var I={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
0
JavaScript
CWE-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.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.createFontElement=function(m,B){var K=Graph.fontMapping[B];null==K&&Graph.isCssFontUrl(B)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",B)):(null==K&&(K='@font-face {\nfont-family: "'+ m+'";\nsrc: url("'+B+'");\n}'),m=document.createElement("style"),mxUtils.write(m,K));return m};Graph.addFont=function(m,B,K){if(null!=m&&0<m.length&&null!=B&&0<B.length){var R=m.toLowerCase();if("helvetica"!=R&&"arial"!=m&&"sans-serif"!=R){var U=Graph.customFontElements[R];null!=U&&U.url!=B&&(U.elt.parentNode.removeChild(U.elt),U=null);null==U?(U=B,"http:"==B.substring(0,5)&&(U=PROXY_URL+"?url="+encodeURIComponent(B)),U={name:m,url:B,elt:Graph.createFontElement(m,U)},Graph.customFontElements[R]=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
null!=I.errors&&0<I.errors.length&&(M="too_large"==I.errors[0].code)}catch(d){}c({message:mxResources.get(M?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(M){window.clearTimeout(D);E&&c(M)}))}),x=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){x(!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
R(!1)}),ea.className="geBtn",B.appendChild(ea));ea=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){m.hideDialog();R(!0)});ea.className="geBtn gePrimaryBtn";B.appendChild(ea);m.editor.cancelFirst||B.appendChild(Q);W.appendChild(B);this.container=W};var O=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background= this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else O.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled), this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var N=document.createElement("canvas"),T=new Image;T.onload=function(){try{N.getContext("2d").drawImage(T,0,0);var m=N.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(B){}};T.src="data:image/svg+xml;base64,"+
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;u.onerror=n;for(var v=0;v<t.length;v++)u.objectStore(t[v]).delete(d[v])}),n)};EditorUi.prototype.getDatabaseItem=function(d,g,n,t){this.openDatabase(mxUtils.bind(this,function(u){try{t=t||"objects";var v=u.transaction([t],"readonly").objectStore(t).get(d);v.onsuccess=function(){g(v.result)};v.onerror=n}catch(A){null!=n&&n(A)}}),n)};EditorUi.prototype.getDatabaseItems=function(d,g,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";var u=t.transaction([n],"readonly").objectStore(n).openCursor(IDBKeyRange.lowerBound(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
if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var K=mxUtils.parseXml(B).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(m,B,K){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
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
Q[X[Z]]&&Y++;Y=Y==W}Y&&(1!=R||this.isCellVisible(B[V]))&&U.push(B[V])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var B=null,K=[],R=0;R<m.length;R++){var U=this.getTagsForCell(m[R]);K=[];if(0<U.length){U=U.split(" ");for(var W={},Q=0;Q<U.length;Q++)if(null==B||null!=B[U[Q]])W[U[Q]]=!0,K.push(U[Q]);B=W}else return[]}return K};Graph.prototype.getTagsForCells=function(m){for(var 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,K),0<R.length&&(m=mxUtils.parseXml(R),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(R=m.getAttribute("content"),null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(cont,R))),null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R)),null!=R&&0<R.length)m=mxUtils.parseXml(R).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||B||(U=null,"diagram"==m.nodeName?U=m:"mxfile"==m.nodeName&&(R=m.getElementsByTagName("diagram"),0< R.length&&(U=R[Math.max(0,Math.min(R.length-1,urlParams.page||0))])),null!=U&&(m=Editor.parseDiagramNode(U,K)));null==m||"mxGraphModel"==m.nodeName||B&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,B){var K=mxUtils.trim(mxUtils.getTextContent(m)),R=null;0<K.length?(m=Graph.decompress(K,null,B),null!=m&&0<m.length&&(R=mxUtils.parseXml(m).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(R=mxUtils.createXmlDocument(),R.appendChild(R.importNode(m[0],!0)),R=R.documentElement));
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;A=mxUtils.button("",mxUtils.bind(this,function(H){this.pickColor(v||"none",function(L){v=L;n()});mxEvent.consume(H)}));n();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return v},getTarget:function(){return t.value},focus:function(){t.focus()}}};
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
"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(H){r="";for(i=0;i<H.length;i+=3)r=i+2==H.length?r+u(H.charCodeAt(i),H.charCodeAt(i+1),0):i+1==H.length?r+u(H.charCodeAt(i),0,0):r+u(H.charCodeAt(i),H.charCodeAt(i+1),H.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(H){if(200<=this.status&&300>this.status)if("txt"==g)n(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(F){var S= new Image;S.onload=function(){try{var p=S.width,q=S.height;if(0==p&&0==q){var C=L.result,J=C.indexOf(","),G=decodeURIComponent(escape(atob(C.substring(J+1)))),P=mxUtils.parseXml(G).getElementsByTagName("svg");0<P.length&&(p=parseFloat(P[0].getAttribute("width")),q=parseFloat(P[0].getAttribute("height")))}n(L.result,p,q)}catch(O){t(O)}};S.src=L.result};L.onerror=function(F){t(F)}}else t(H)};A.onerror=function(H){t(H)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,n){var t=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
function(m){this.model.beginUpdate();try{for(var B=0;B<m.length;B++)this.model.setVisible(m[B],!this.model.isVisible(m[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(m,B){this.model.beginUpdate();try{for(var K=0;K<m.length;K++)this.model.setVisible(m[K],B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,B,K,R){for(var U=0;U<m.length;U++)this.highlightCell(m[U],B,K,R)};Graph.prototype.highlightCell=function(m,B,K,R,U){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR; K=null!=K?K:1E3;m=this.view.getState(m);var W=null;null!=m&&(U=null!=U?U:4,U=Math.max(U+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,1)+U),W=new mxCellHighlight(this,B,U,!1),null!=R&&(W.opacity=R),W.highlight(m),window.setTimeout(function(){null!=W.shape&&(mxUtils.setPrefixedStyle(W.shape.node.style,"transition","all 1200ms ease-in-out"),W.shape.node.style.opacity=0);window.setTimeout(function(){W.destroy()},1200)},K));return W};Graph.prototype.addSvgShadow=function(m,B,K,R){K=null!=K?
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,!0)}finally{L.model.endUpdate()}}}catch(T){if(u)throw T;this.handleError(T)}return H};EditorUi.prototype.updatePageLinks=function(d,g){for(var n=0;n<g.length;n++)this.updatePageLinksForCell(d,g[n].root),null!=g[n].viewState&&this.updateBackgroundPageLink(d,g[n].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var n=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=n&&(g.originalSrc="data:page/id,"+ n)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(d,g){var n=document.createElement("div"),t=this.editor.graph,u=t.getLinkForCell(g);null!=u&&t.setLinkForCell(g,this.updatePageLink(d,u));if(t.isHtmlLabel(g)){n.innerHTML=Graph.sanitizeHtml(t.getLabel(g));for(var v=n.getElementsByTagName("a"),A=!1,H=0;H<v.length;H++)u=v[H].getAttribute("href"),null!=u&&(v[H].setAttribute("href",this.updatePageLink(d,u)),A=!0);A&&t.labelChanged(g,n.innerHTML)}for(H=0;H<t.model.getChildCount(g);H++)this.updatePageLinksForCell(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
v.scrollCellToVisible(v.getSelectionCell())}}}else{J=function(N){var T=P[N];null==T&&(T=new mxCell(N,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),T.vertex=!0,P[N]=T,F.push(T));return T};var P={};F=[];for(H=0;H<t.length;H++)if(";"!=t[H].charAt(0)){var O=t[H].split("->");2<=O.length&&(C=J(O[0]),G=J(O[O.length-1]),O=new mxCell(2<O.length?O[1]:"",new mxGeometry),O.edge=!0,C.insertEdge(O,!0),G.insertEdge(O,!1),F.push(O))}if(0<F.length){t=document.createElement("div");t.style.visibility="hidden";
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;l.connectionHandler.createEdgeState=function(n){n=l.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var y=l.getDefaultParent(),E=mxUtils.bind(this,function(n){var t=new mxCellOverlay(this.connectImage,"Add outgoing");t.cursor="hand";t.addListener(mxEvent.CLICK,function(u,v){l.connectionHandler.reset();l.clearSelection();var A=l.getCellGeometry(n),H;M(function(){H=l.insertVertex(y,null,"Entry",A.x,A.y,80,30,"rounded=1;");E(H);l.view.refresh(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
Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};M.style[f?"borderRight":"borderBottom"]="0.5px solid "+z.strokeClr;M.style.borderLeft="0.5px solid "+z.strokeClr});this.updateStyle();b.diagramContainer.appendChild(M);mxEvent.disableContextMenu(M);this.editorUiRefresh=b.refresh;b.refresh=function(A){D.editorUiRefresh.apply(b, arguments);k()};k();var I=document.createElement("canvas");I.width=M.offsetWidth;I.height=M.offsetHeight;M.style.overflow="hidden";I.style.position="relative";M.appendChild(I);var d=I.getContext("2d");this.ui=b;var g=b.editor.graph;this.graph=g;this.container=M;this.canvas=I;var n=function(A,H,L,F,S){A=Math.round(A);H=Math.round(H);L=Math.round(L);F=Math.round(F);d.beginPath();d.moveTo(A+.5,H+.5);d.lineTo(L+.5,F+.5);d.stroke();S&&(f?(d.save(),d.translate(A,H),d.rotate(-Math.PI/2),d.fillText(S,0,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
mxEvent.getClientX(C),mxEvent.getClientY(C))},p=function(C){for(d.push(C);d.length>f;)d.shift()},q=function(C){var J=d.length;if(1===J%2||J>=f){var G=0,P=0,O,N=0;for(O=C;O<J;O++)N++,C=d[O],G+=C.x,P+=C.y;return{x:G/N,y:P/N}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(N,T){try{if(!q){var m=e.file.getCurrentUser();if(p&&null!=m&&null!=m.displayName){var B={from:H,id:n,type:N,sessionId:e.clientId,userId:m.id,username:m.displayName,data:T,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};B={bytes:e.objectToString(B),data:"aes"};B=JSON.stringify(B);C&&"cursor"!=N&&EditorUi.debug("P2PCollab: sending to socket server",[B]);n++;m=!C&&("cursor"==N||"selectionChange"==N);S&&!m&&O("message",B);if(m)for(p2pId in F)F[p2pId].send(B)}}}catch(K){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
urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript("js/extensions.min.js",A,null,null,null,v))}),t)};EditorUi.prototype.createMermaidXml=function(d,g,n,t,u){var v=new Graph(document.createElement("div")); n=v.insertVertex(null,null,null,0,0,t,u,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+n+";");v.setAttributeForCell(n,"mermaidData",JSON.stringify({data:d,config:g},null,2));d=(new mxCodec).encode(v.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,n){var t=0,u=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.createTimeout(4E4,mxUtils.bind(this,function(v){EditorUi.logEvent({category:"OPENAI-DIAGRAM",
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var k=this.ui.editor.undoManager,l=k.history.slice(),x=k.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var E=this.changeListenerEnabled;this.changeListenerEnabled=f;var D=y.foldingEnabled,z=y.mathEnabled,M=y.cellRenderer.redraw;y.cellRenderer.redraw=function(I){I.view.graph.isEditing(I.cell)&&(I.view.graph.scrollCellToVisible(I.cell),I.view.graph.cellEditor.resize());M.apply(this,arguments)};y.model.beginUpdate();
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(K=B||mxResources.get("invalidChars"),B=m[0].getElementsByTagName("div"),0<B.length&&(K=mxUtils.getTextContent(B[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(m,B){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=B))};Editor.mermaidToDrawio=function(m,B,K){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,B,K)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=
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.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{v.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return n};EditorUi.prototype.getCopyFilename=function(d,g){var n=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var t=n.lastIndexOf(".");0<=t&&(d=n.substring(t),n=n.substring(0,t));if(g){g=n;var u=new Date;n=u.getFullYear();t=u.getMonth()+1;var v=u.getDate(),A=u.getHours(),H=u.getMinutes();u=u.getSeconds(); n=g+(" "+(n+"-"+t+"-"+v+"-"+A+"-"+H+"-"+u))}return n=mxResources.get("copyOf",[n])+d};EditorUi.prototype.fileLoaded=function(d,g,n){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var u=!1;this.hideDialog();null!=t&&(EditorUi.debug("File.closed",[t]),t.removeListener(this.descriptorChangedListener),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var v=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(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