code
stringlengths
14
2.05k
label
int64
0
1
programming_language
stringclasses
7 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
98
description
stringlengths
36
379
url
stringlengths
36
48
label_name
stringclasses
2 values
this.menus.findReplaceWindow,this.menus.commentsWindow]));return c};EditorUi.prototype.fitWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.fit()};EditorUi.prototype.hideWindows=function(){for(var c=this.getWindows(),e=0;e<c.length;e++)null!=c[e]&&c[e].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
t(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();t(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?t(C.responseText):this.handleError({message:mxResources.get(413==C.status? "drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,e,q)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
x,null,null,null,t)):mxscript("js/extensions.min.js",x,null,null,null,t))};EditorUi.prototype.generatePlantUmlImage=function(c,e,k,q){function p(C,I,B){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|B>>6;c4=B&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var x=new XMLHttpRequest;x.open("GET",("txt"==e?PLANT_URL+
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
G.createVertexHandler=function(){var P=T.apply(this,arguments);P.livePreview=!1;return P};if(null!=m)try{if("inset"==m.substring(0,5)){var l=c.geometry,n=K.width,z=K.height,E=(300-n)/2,A=(300-z)/2,N=m.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),Q=parseFloat(N[0]),L=parseFloat(N[1]),U=parseFloat(N[2]),g=parseFloat(N[3]);isFinite(Q)&&isFinite(L)&&isFinite(U)&&isFinite(g)?(l.x=g/100*n+E,l.y=Q/100*z+A,l.width=(100-L)/100*n+E-l.x,l.height=(100-U)/100*z+A-l.y,"round"==N[4]?"50%"==N[5]?p.setAttribute("checked",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
!1;v.connectionHandler.createEdgeState=function(k){k=v.createEdge(null,null,null,null,null,D);return new mxCellState(this.graph.view,k,this.graph.getCellStyle(k))};var F=v.getDefaultParent(),K=mxUtils.bind(this,function(k){var q=new mxCellOverlay(this.connectImage,"Add outgoing");q.cursor="hand";q.addListener(mxEvent.CLICK,function(p,t){v.connectionHandler.reset();v.clearSelection();var x=v.getCellGeometry(k),C;S(function(){C=v.insertVertex(F,null,"Entry",x.x,x.y,80,30,"rounded=1;");K(C);v.view.refresh(C);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
null==U.getTerminal(g[y],!0)){U.setTerminal(g[y],A,!0);var H=e.getCellGeometry(g[y]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return g}}var I={67:c.actions.get("selectChildren"),88:c.actions.get("selectDescendants"),80:c.actions.get("selectParent"),83:c.actions.get("selectSiblings")},B=c.onKeyDown;c.onKeyDown=function(A){try{var N=e.getSelectionCell();if(e.isEnabled()&&!e.isEditing()&&null!=N){var Q=mxEvent.isAltDown(A)&&mxEvent.isShiftDown(A)? I[A.keyCode]:null;null!=Q?(Q.funct(A),mxEvent.consume(A)):d(N)&&(Q=null,0<e.getIncomingTreeEdges(N).length&&(9==A.which?Q=mxEvent.isShiftDown(A)?M(N):G(N):13==A.which&&(Q=K(N,!mxEvent.isShiftDown(A)))),null!=Q&&0<Q.length?(1==Q.length&&e.model.isEdge(Q[0])?e.setSelectionCell(e.model.getTerminal(Q[0],!1)):e.setSelectionCell(Q[Q.length-1]),null!=c.hoverIcons&&c.hoverIcons.update(e.view.getState(N)),e.startEditingAtCell(N),mxEvent.consume(A)):37==A.keyCode?(J(N,mxConstants.DIRECTION_WEST),mxEvent.consume(A)): 38==A.keyCode?(J(N,mxConstants.DIRECTION_NORTH),mxEvent.consume(A)):39==A.keyCode?(J(N,mxConstants.DIRECTION_EAST),mxEvent.consume(A)):40==A.keyCode&&(J(N,mxConstants.DIRECTION_SOUTH),mxEvent.consume(A)))}}catch(L){c.handleError(L)}mxEvent.isConsumed(A)||B.apply(this,arguments)};var T=e.connectVertex;e.connectVertex=function(A,N,Q,L,U,g,y){var H=e.getIncomingTreeEdges(A);if(d(A)){var O=F(A),P=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST,V=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.update)};var G=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?G.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(g){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var S=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(g){g=S.apply(this,arguments);var y=this.editorUi,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(O){mxEvent.isConsumed(O)||((mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O))&&13==O.keyCode?(H.click(),mxEvent.consume(O)):27==O.keyCode&&(y.click(),mxEvent.consume(O)))}));H.focus();H.className="geCommentEditBtn gePrimaryBtn";g.appendChild(H);z.insertBefore(g,Q);L.style.display="none";Q.style.display="none";U.focus()}function K(n,z){z.innerText="";n=new Date(n.modifiedDate);var E=b.timeSince(n);null==E&&(E=mxResources.get("lessThanAMinute"));mxUtils.write(z,mxResources.get("timeAgo", [E],"{1} ago"));z.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString())}function M(n){var z=document.createElement("img");z.className="geCommentBusyImg";z.src=IMAGE_PATH+"/spin.gif";n.appendChild(z);n.busyImg=z}function G(n){n.style.border="1px solid red";n.removeChild(n.busyImg)}function S(n){n.style.border="";n.removeChild(n.busyImg)}function J(n,z,E,A,N){function Q(V,R,W){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(V){return new g(V,Editor.createRoughCanvas(V),this)};var y=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(V){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?y.apply(this,arguments):"comic"==mxUtils.getValue(this.style, "sketchStyle","rough")?this.createComicCanvas(V):this.createRoughCanvas(V)};var H=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(V,R,W,X,Z){null!=V.handJiggle&&V.handJiggle.passThrough||H.apply(this,arguments)};var O=mxShape.prototype.paint;mxShape.prototype.paint=function(V){var R=V.addTolerance,W=!0;null!=this.style&&(W="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=V.handJiggle&&V.handJiggle.constructor==g&&!this.outline){V.save();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(e,x,B,k,T,null,null,t,n,null,null,null,q?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,e,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,k,q,p,t){c=null!=c?c:"";var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(220,28*Math.ceil(Math.max(1,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
!0,!0,null,null,null,null,!0);z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,k,q,p){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=this.editor.graph;if(null!=e){var C=document.createElement("h3");mxUtils.write(C,e);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(C)}var I=this.addCheckbox(t,mxResources.get("fit"), !0),B=this.addCheckbox(t,mxResources.get("shadow"),x.shadowVisible&&q,!q),T=this.addCheckbox(t,k),l=this.addCheckbox(t,mxResources.get("lightbox"),!0),n=this.addEditButton(t,l),z=n.getEditInput(),E=1<x.model.getChildCount(x.model.getRoot()),A=this.addCheckbox(t,mxResources.get("layers"),E,!E);A.style.marginLeft=z.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?(E&&A.removeAttribute("disabled"),z.removeAttribute("disabled")): (A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&l.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(I.checked,B.checked,T.checked,l.checked,n.getLink(),A.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,k,q,p,t,x,C){function I(z){var E=" ",A="";q&&(E=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(c,e){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
ha=document.createElement("img");ha.setAttribute("src",ja);ha.setAttribute("alt",oa);ha.style.maxWidth=Qa+"px";ha.style.maxHeight=pa+"px";H=ha;var Xa=ja.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ra.appendChild(ha);ha.onerror=function(){this.src!=Xa?this.src=Xa:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(Na){B(ra,null,null,aa,sa,ya)}),null,null);mxEvent.addListener(ra,"dblclick",function(Na){I();mxEvent.consume(Na)})}else if(!Ga&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
R};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,R,W,X,Z,Y){null!=V.handJiggle&&V.handJiggle.constructor==g?(V.handJiggle.passThrough=!0,P.apply(this,arguments),V.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
App.prototype.start=function(){try{var b=this;null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();window.onerror=function(v,D,F,K,M){"ResizeObserver loop limit exceeded"!=v&&(EditorUi.logError("Uncaught: "+(null!=v?v:""),D,F,K,M,null,!0),b.handleError({message:v},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
p=-1,t=function(){null!=D?(null!=F&&F(p),p=D(q)):q()};this.drawRuler=t;this.sizeListener=f=v(function(){var x=e.container;m?(x=x.offsetHeight+K,J.height!=x&&(J.height=x,S.style.height=x+"px",t())):(x=x.offsetWidth+K,J.width!=x&&(J.width=x,S.style.width=x+"px",t()))},10);this.pageListener=function(){t()};this.scrollListener=d=v(function(){var x=m?e.container.scrollTop:e.container.scrollLeft;M.lastScroll!=x&&(M.lastScroll=x,t())},10);this.unitListener=function(x,C){M.setUnit(C.getProperty("unit"))};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
x,e.container.scrollTop=C,this.pasteCells(t,k,!1,!0)}catch(I){this.handleError(I)}}),0)}}catch(I){this.handleError(I)}}),!0);var p=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==k?!0:p.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(){b.spinner.stop();if(null==b.linkPicker){var x=b.drive.createLinkPicker();b.linkPicker=x.setCallback(function(C){LinkDialog.filePicked(C)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&F(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(x){G.value=x[0].link;G.focus()}})});null!=b.oneDrive&&F(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
window.location.hash=null!=e?e.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(c){null!=c?(this.fileLoaded(new StorageFile(this,c,b)),null!=d&&d()):K({message:mxResources.get("fileNotFound")})}),K)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}));else if(null!=m)this.spinner.stop(),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,k,q,p){var t="jpeg"==k?"jpg":k;q=this.getBaseFilename(q)+(null!=e?".drawio":"")+"."+t;c=this.createImageDataUri(c,e,k,p);this.saveData(q,t,c.substring(c.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
[E],"{1} ago"));z.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString())}function M(n){var z=document.createElement("img");z.className="geCommentBusyImg";z.src=IMAGE_PATH+"/spin.gif";n.appendChild(z);n.busyImg=z}function G(n){n.style.border="1px solid red";n.removeChild(n.busyImg)}function S(n){n.style.border="";n.removeChild(n.busyImg)}function J(n,z,E,A,N){function Q(V,R,W){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className= "geCommentActionLnk";mxUtils.write(Z,V);X.appendChild(Z);mxEvent.addListener(Z,"click",function(Y){R(Y,n);Y.preventDefault();mxEvent.consume(Y)});P.appendChild(X);W&&(X.style.display="none")}function L(){function V(X){R.push(W);if(null!=X.replies)for(var Z=0;Z<X.replies.length;Z++)W=W.nextSibling,V(X.replies[Z])}var R=[],W=g;V(n);return{pdiv:W,replies:R}}function U(V,R,W,X,Z){function Y(){M(da);n.addReply(na,function(za){na.id=za;n.replies.push(na);S(da);W&&W()},function(za){ea();G(da);b.handleError(za,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
(q<<5)-q+this.hashValue(c.childNodes[p],e,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=k&&(k.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<0;q^=e}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,k,q,p,t,x){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
H,0,H.length);P+=W(H.length)+y+H+W(O^4294967295);P+=g.substring(X-8,g.length);break}P+=g.substring(X-8,X-4+Z);V(g,Z);V(g,4)}while(Z);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var F=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(g,y){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var K=ColorDialog.resetRecentColors;
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.cellEditor.textarea.getElementsByTagName("font");y=Graph.getFontUrl(g,y);for(var O=0;O<H.length;O++)H[O].getAttribute("face")==g&&H[O].getAttribute("data-font-src")!=y&&H[O].setAttribute("data-font-src",y)}};var t=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return t.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!= this.globalVars?mxUtils.clone(this.globalVars):{};var g=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=g)for(var y in g)this.globalVars[y]=g[y]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var x=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(g){var y=x.apply(this,arguments);null==y&&null!=this.globalVars&&(y=this.globalVars[g]);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(M){return this.isTreeEdge(M)}))};Graph.prototype.getIncomingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(A){return k.isVertex(A)&&v(A)}function u(A){var N=!1;null!=A&&(N="1"== e.getCurrentCellStyle(A).treeMoving);return N}function v(A){var N=!1;null!=A&&(A=k.getParent(A),N=e.view.getState(A),N="tree"==(null!=N?N.style:e.getCellStyle(A)).containerType);return N}function D(A){var N=!1;null!=A&&(A=k.getParent(A),N=e.view.getState(A),e.view.getState(A),N=null!=(null!=N?N.style:e.getCellStyle(A)).childLayout);return N}function F(A){A=e.view.getState(A);if(null!=A){var N=e.getIncomingTreeEdges(A.cell);if(0<N.length&&(N=e.view.getState(N[0]),null!=N&&(N=N.absolutePoints,null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
c+";"))}}),mxUtils.bind(this,function(){var n=null;I.getModel().beginUpdate();try{n=I.insertVertex(I.getDefaultParent(),null,c,I.snap(e),I.snap(k),1,1,"text;"+(q?"html=1;":"")),I.updateCellSize(n),I.fireEvent(new mxEventObject("textInserted","cells",[n]))}finally{I.getModel().endUpdate()}I.setSelectionCell(n)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,k,t,null,C);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,V,R,W,X),this.lastX=W,this.lastY=X)};g.prototype.curveTo=function(V,R,W,X,Z,Y){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,V,R,W,X,Z,Y),this.lastX=Z,this.lastY=Y)};g.prototype.arcTo=function(V,R,W,X,Z,Y,ea){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var fa=mxUtils.arcToCurves(this.lastX,this.lastY,V,R,W,X,Z,Y,ea);if(null!=fa)for(var na=0;na<fa.length;na+=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
g)this.editPlantUmlData(L,U,g);else if(g=this.graph.getAttributeForCell(L,"mermaidData"),null!=g)this.editMermaidData(L,U,g);else{var y=e.getCellStyle(L);"1"==mxUtils.getValue(y,"metaEdit","0")?c.showDataDialog(L):k.apply(this,arguments)}}catch(H){c.handleError(H)}};e.getLinkTitle=function(L){return c.getLinkTitle(L)};e.customLinkClicked=function(L){var U=!1;try{c.handleCustomLink(L),U=!0}catch(g){c.handleError(g)}return U};var q=e.parseBackgroundImage;e.parseBackgroundImage=function(L){var U=q.apply(this,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var k=this.getCurrentFile();null!=k?k.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,k){var q=this.getCurrentFile();null!=q?q.addComment(c,e,k):e(Date.now())};EditorUi.prototype.canReplyToReplies=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
parentChildSpacing:parseInt(H.value),siblingSpacing:parseInt(O.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(P,null,2))});L.className="geBtn";Q=new CustomDialog(d,Q,function(){null==z&&(z=2);d.loadOrgChartLayouts(N)},null,null,null,L);d.showDialog(Q.container,355,140,!0,!0)},n,null,v());l.addSeparator(n);l.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var z=new mxParallelEdgeLayout(u);z.checkOverlap=!0;d.prompt(mxResources.get("spacing"),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(e,x,B,k,T,null,null,t,n,null,null,null,q?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(c,e,k){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,k||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,k,q,p,t){c=null!=c?c:"";var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(220,28*Math.ceil(Math.max(1,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
EditorUi.prototype.chromelessWindowResize=function(){};var M=Menus.prototype.init;Menus.prototype.init=function(){M.apply(this,arguments);var J=this.editorUi;EditorUi.enablePlantUml&&!J.isOffline()&&J.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var k=new ParseDialog(J,mxResources.get("plantUml")+"...","plantUml");J.showDialog(k.container,620,420,!0,!1);k.init()}));J.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var k=new ParseDialog(J, mxResources.get("mermaid")+"...","mermaid");J.showDialog(k.container,620,420,!0,!1);k.init()}));var c="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),e=function(k,q,p,t){k.addItem(p,null,mxUtils.bind(this,function(){var x=new CreateGraphDialog(J,p,t);J.showDialog(x.container,620,420,!0,!1);x.init()}),q)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(k,q){for(var p=0;p<c.length;p++)"-"==c[p]?k.addSeparator(q):e(k,q,mxResources.get(c[p])+ "...",c[p])})))};EditorUi.prototype.installFormatToolbar=function(J){var c=this.editor.graph,e=document.createElement("div");e.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";c.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,q){0<c.getSelectionCount()?(J.appendChild(e),e.innerHTML="Selected: "+c.getSelectionCount()):null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
ColorDialog.resetRecentColors=function(){K.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(g,y){var H=null;null!=g.editor.graph.getModel().getParent(y)?H=y.getId():null!=g.currentPage&&(H=g.currentPage.getId());return H});if(null!=window.StyleFormatPanel){var M=Format.prototype.init;Format.prototype.init=function(){M.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(c){var e=f.apply(this,arguments);if(null==e)try{var k=c.indexOf("&lt;mxfile ");if(0<=k){var q=c.lastIndexOf("&lt;/mxfile&gt;");q>k&&(e=c.substring(k,q+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var p=mxUtils.parseXml(c),t=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=t?mxUtils.getXml(t):""}}catch(x){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(e,k,q,p){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(p)try{var t=this.editor.graph;t.setGridEnabled(!1); t.pageVisible=!1;var x=t.model.cells,C;for(C in x){var I=x[C];null!=I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(B){console.log(B)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear(); this.editor.modified=null!=q?q:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
(A.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"));z.checked&&l.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(I.checked,B.checked,T.checked,l.checked,n.getLink(),A.checked)}),null,mxResources.get("embed"),p);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,k,q,p,t,x,C){function I(z){var E=" ",A="";q&&(E=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+ EditorUi.lightboxHost+"/?client=1"+(null!=T?"&page="+T:"")+(p?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",A+="cursor:pointer;");c&&(A+="max-width:100%;");var N="";k&&(N=' width="'+Math.round(B.width)+'" height="'+Math.round(B.height)+'"');x('<img src="'+z+'"'+N+(""!=A?' style="'+A+'"':"")+E+"/>")}var B=this.editor.graph.getGraphBounds(),T=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(z){var E=q?this.getFileData(!0):null;z=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
c.style.textAlign="right";e=document.createElement("div");e.className="geToolbarContainer";e.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function l(A){if(null!=A){var N=A.getAttribute("background");if(null==N||""==N||N==mxConstants.NONE)N=Editor.isDarkMode()?"transparent":"#ffffff";q.style.backgroundColor=N;(new mxCodec(A.ownerDocument)).decode(A,p.getModel());p.maxFitScale=1;p.fit(8);p.center()}return A}
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(fa){"true"!=W.getAttribute("contentEditable")&&mxEvent.consume(fa)});V=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var na=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(da){null!=da&&(X.title=da,U())},mxResources.get("enterValue"));b.showDialog(na.container,300,80,!0,!0);na.init();mxEvent.consume(fa)}else if("true"!=W.getAttribute("contentEditable")){null!=t&&(t(),t=null);if(null==X.title||0==X.title.length)W.innerText= "";W.style.textOverflow="";W.style.whiteSpace="";W.style.cursor="text";W.style.color="";W.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(W.style,"user-select","text");W.focus();document.execCommand("selectAll",!1,null);t=function(){W.removeAttribute("contentEditable");W.style.cursor="pointer";X.title=W.innerHTML;U()};mxEvent.consume(fa)}};mxEvent.addListener(W,"click",V);mxEvent.addListener(O,"dblclick",V);c.appendChild(O);mxEvent.addListener(O,"dragstart",function(fa){null==T&&null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
document.createElement("canvas");E.width=T;E.height=l;var A=E.toDataURL();z!==A&&(e=z,C=T,I=l)}}}catch(N){}k(e,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,k){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;e(q)};null!=k&&(q.onerror=k);q.src=c}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(g){return"orthogonalEdgeStyle"==mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
g.ownerSVGElement))}};var n=Graph.prototype.refresh;Graph.prototype.refresh=function(){n.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var z=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){z.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
c?c:"",extras:JSON.stringify(p),scale:x,border:C,w:l&&isFinite(l)?l:null,h:n&&isFinite(n)?n:null}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var e=c.indexOf("#");0<=e&&(c=c.substring(0,e))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,e={};if(null!=c&&0<c.length){var k=c.lastIndexOf("#");if(0<k){c=decodeURIComponent(c.substring(k+
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.loadImage(Z.target.result,mxUtils.bind(this,function(ca){this.resizeImage(ca,Z.target.result,mxUtils.bind(this,function(qa,ka,Aa){P(R,mxUtils.bind(this,function(){if(null!=qa&&qa.length<B){var xa=E&&this.isResampleImageSize(W.size,T)?Math.min(1,Math.min(q/ka,q/Aa)):1;return p(qa,W.type,e+R*g,k+R*g,Math.round(ka*xa),Math.round(Aa*xa),W.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),E,q,T,W.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Y=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
c.appendChild(m));M.appendChild(c);M.appendChild(e);this.container=M},FindWindow=function(b,f,m,d,u,v){function D(U,g,y,H){if("object"===typeof g.value&&null!=g.value.attributes){g=g.value.attributes;for(var O=0;O<g.length;O++)if("label"!=g[O].nodeName){var P=mxUtils.trim(g[O].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(H&&0<=P.indexOf(y)||!H&&P.substring(0,y.length)===y)||null!=U&&U.test(P))return!0}}return!1}function F(){c?(N.removeAttribute("disabled"),Q.removeAttribute("disabled")):
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(c,e,k,q,p,t,x){if(null!=c){p=null!=p?p:Error(c);p.stack=null!=p.stack?p.stack:"";t=null!=t?t:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>p.stack.indexOf("extension:")&&0>p.stack.indexOf("<anonymous>:")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: "")+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(k)+(null!=q?":colno:"+encodeURIComponent(q):"")+(""!=p.stack?"&stack="+encodeURIComponent(p.stack):""))}catch(C){}try{x||null==window.console||console.error(t,c,e,k,q,p)}catch(C){}}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
document.createElement("canvas");E.width=T;E.height=l;var A=E.toDataURL();z!==A&&(e=z,C=T,I=l)}}}catch(N){}k(e,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,k){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;e(q)};null!=k&&(q.onerror=k);q.src=c}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
EditorUi.prototype.createParentLookup=function(b,f){function m(M){var G=d[M];null==G&&(G={inserted:[],moved:{}},d[M]=G);return G}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var u=0;u<f[EditorUi.DIFF_INSERT].length;u++){var v=f[EditorUi.DIFF_INSERT][u],D=null!=v.parent?v.parent:"",F=null!=v.previous?v.previous:"";m(D).inserted[F]=v}if(null!=f[EditorUi.DIFF_UPDATE])for(var K in f[EditorUi.DIFF_UPDATE])v=f[EditorUi.DIFF_UPDATE][K],null!=v.previous&&(D=v.parent,null==D&&(u=b.getCell(K),null!=u&&(u=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
za.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";za.appendChild(Ca);mxUtils.write(za,mxResources.get("property"));da.style.cursor="pointer";var Ba=function(){var pa=na.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var ua="none";for(var va=g.childNodes.length-1;0<=va;va--)try{var Ea=g.childNodes[va],Da=Ea.nodeName.toUpperCase();"INPUT"!=Da&& "SELECT"!=Da||g.removeChild(Ea)}catch(Ta){}}else Ca.src=Sidebar.prototype.expandedImage,ua="";for(va=0;va<pa.length;va++)pa[va].style.display=ua};mxEvent.addListener(da,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;Ba()});da.appendChild(za);za=document.createElement("th");za.className="gePropHeaderCell";za.innerHTML=mxResources.get("value");da.appendChild(za);na.appendChild(da);var ba=!1,ca=!1;da=null;1==H.vertices.length&&0==H.edges.length?da=H.vertices[0].id:
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,m,d,u,v,D,F,K,M,G){var S=document.createElement("div");S.style.textAlign="center";G=null!=G?G:44;var J=document.createElement("div");J.style.padding="6px";J.style.overflow="auto";J.style.maxHeight=G+ "px";J.style.lineHeight="1.2em";mxUtils.write(J,f);S.appendChild(J);null!=M&&(J=document.createElement("div"),J.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",M),J.appendChild(f),S.appendChild(J));M=document.createElement("div");M.style.textAlign="center";M.style.whiteSpace="nowrap";var c=document.createElement("input");c.setAttribute("type","checkbox");v=mxUtils.button(v||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(c.checked)});v.className="geBtn"; null!=F&&(v.innerHTML=F+"<br>"+v.innerHTML,v.style.paddingBottom="8px",v.style.paddingTop="8px",v.style.height="auto",v.style.width="40%");b.editor.cancelFirst&&M.appendChild(v);var e=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=m&&m(c.checked)});M.appendChild(e);null!=D?(e.innerHTML=D+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";b.editor.cancelFirst|| M.appendChild(v);S.appendChild(M);K?(M.style.marginTop="10px",J=document.createElement("p"),J.style.marginTop="20px",J.style.marginBottom="0px",J.appendChild(c),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),J.appendChild(u),S.appendChild(J),mxEvent.addListener(u,"click",function(k){c.checked=!c.checked;mxEvent.consume(k)})):M.style.marginTop="12px";this.init=function(){e.focus()};this.container=S},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===t.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function k(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=t):(C.style.backgroundPosition="center center",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
""),mxUtils.bind(this,function(e){window.clearTimeout(c);J&&(200<=e.getStatus()&&299>=e.getStatus()?null!=m&&m():d({message:mxResources.get("realtimeCollaboration")+(0!=e.getStatus()?": "+e.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",M,S.length,"bytes","from",F,"to",K,"etag",this.file.getCurrentEtag(),"checksum",G)}}this.file.setShadowPages(b);this.scheduleCleanup()};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
x,null,null,null,t)):mxscript("js/extensions.min.js",x,null,null,null,t))};EditorUi.prototype.generatePlantUmlImage=function(c,e,k,q){function p(C,I,B){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|B>>6;c4=B&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var x=new XMLHttpRequest;x.open("GET",("txt"==e?PLANT_URL+ "/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+p(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+p(C.charCodeAt(i),0,0):r+p(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(x.responseType="blob");x.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==e)k(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(B){var T= new Image;T.onload=function(){try{var l=T.width,n=T.height;if(0==l&&0==n){var z=I.result,E=z.indexOf(","),A=decodeURIComponent(escape(atob(z.substring(E+1)))),N=mxUtils.parseXml(A).getElementsByTagName("svg");0<N.length&&(l=parseFloat(N[0].getAttribute("width")),n=parseFloat(N[0].getAttribute("height")))}k(I.result,l,n)}catch(Q){q(Q)}};T.src=I.result};I.onerror=function(B){q(B)}}else q(C)};x.onerror=function(C){q(C)};x.send()};EditorUi.prototype.insertAsPreText=function(c,e,k){var q=this.editor.graph,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640, 520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var e=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(k){if(0<k.length)try{var q=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(q));this.customLayoutConfig=q;this.hideDialog()}catch(p){this.handleError(p)}}),null,null,null,null,mxUtils.bind(this,function(k,q){var p=mxUtils.button(mxResources.get("copy"),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
[E],"{1} ago"));z.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString())}function M(n){var z=document.createElement("img");z.className="geCommentBusyImg";z.src=IMAGE_PATH+"/spin.gif";n.appendChild(z);n.busyImg=z}function G(n){n.style.border="1px solid red";n.removeChild(n.busyImg)}function S(n){n.style.border="";n.removeChild(n.busyImg)}function J(n,z,E,A,N){function Q(V,R,W){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
!this.isCorsEnabledForUrl(g)){var y=/(\.v(dx|sdx?))($|\?)/i.test(g)||/(\.vs(x|sx?))($|\?)/i.test(g);y=/\.png$/i.test(g)||/\.pdf$/i.test(g)||y;var H="t="+(new Date).getTime();g=PROXY_URL+"?url="+encodeURIComponent(g)+"&"+H+(y?"&base64=1":"")}return g};Editor.prototype.isCorsEnabledForUrl=function(g){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||g.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors))); return null!=this.corsRegExp&&this.corsRegExp.test(g)||"https://raw.githubusercontent.com/"===g.substring(0,34)||"https://fonts.googleapis.com/"===g.substring(0,29)||"https://fonts.gstatic.com/"===g.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var g=new mxUrlConverter;g.updateBaseUrl();var y=g.convert,H=this;g.convert=function(O){if(null!=O){var P="http://"==O.substring(0,7)||"https://"==O.substring(0,8);P&&!navigator.onLine?O=Editor.svgBrokenImage.src:!P||O.substring(0,g.baseUrl.length)==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=e.getFunction,q=this.editor.graph,p=this;e.getFunction=function(t){if(q.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var x= p.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<x&&p.movePage(x,x-1)};if(38==t.keyCode)return function(){0<x&&p.movePage(x,0)};if(39==t.keyCode)return function(){x<p.pages.length-1&&p.movePage(x,x+1)};if(40==t.keyCode)return function(){x<p.pages.length-1&&p.movePage(x,p.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)){if(37==t.keyCode)return function(){0<x&&p.selectNextPage(!1)};if(38==t.keyCode)return function(){0< x&&p.selectPage(p.pages[0])};if(39==t.keyCode)return function(){x<p.pages.length-1&&p.selectNextPage(!0)};if(40==t.keyCode)return function(){x<p.pages.length-1&&p.selectPage(p.pages[p.pages.length-1])}}}return!(65<=t.keyCode&&90>=t.keyCode)||q.isSelectionEmpty()||mxEvent.isAltDown(t)||mxEvent.isShiftDown(t)||mxEvent.isControlDown(t)||mxClient.IS_MAC&&mxEvent.isMetaDown(t)?k.apply(this,arguments):null}}return e};var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(E){this.spinner.stop();try{this.saveCanvas(E,p?this.getFileData(!0,null,null,null,k,C):null,I,null==this.pages||0==this.pages.length,T)}catch(A){this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,k,c||1,e,q,null,null,t,x,B,l,n)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"10px";G.style.resize="none";G.style.height="150px";G.style.width="440px";G.style.border="1px solid gray";G.value=mxResources.get("updatingDocument");d.appendChild(G);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(G.value=f,G.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?G.select():document.execCommand("selectAll",!1,null)):(G.setAttribute("readonly","true"),G.value=mxResources.get("tooLargeUseDownload"))},0)};v=document.createElement("div");v.style.position=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
g.prototype.lineTo=function(V,R){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,V,R),this.lastX=V,this.lastY=R)};g.prototype.moveTo=function(V,R){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,V,R),this.lastX=V,this.lastY=R,this.firstX=V,this.firstY=R)};g.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};g.prototype.quadTo=function(V,R,W,X){this.passThrough?
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
Editor.extractGraphModelFromXref(V));null!=H&&(H=decodeURIComponent(H.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return H};Editor.extractGraphModelFromXref=function(g){var y=g.trailer,H=null;null!=y&&(y=/.* \/Info (\d+) (\d+) R/g.exec(y.join("\n")),null!=y&&0<y.length&&(y=g[y[1]],null!=y&&(y=/.* \/Subject (\d+) (\d+) R/g.exec(y.join("\n")),null!=y&&0<y.length&&(g=g[y[1]],null!=g&&(g=g.join("\n"),H=g.substring(1,g.length-1))))));return H};Editor.extractParserError=function(g,y){var H=null;g=null!= g?g.getElementsByTagName("parsererror"):null;null!=g&&0<g.length&&(H=y||mxResources.get("invalidChars"),y=g[0].getElementsByTagName("div"),0<y.length&&(H=mxUtils.getTextContent(y[0])));return null!=H?mxUtils.trim(H):H};Editor.addRetryToError=function(g,y){null!=g&&(g=null!=g.error?g.error:g,null==g.retry&&(g.retry=y))};Editor.mermaidToDrawio=function(g,y,H){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(g,y,H)};Editor.configure=function(g){if(null!=g){Editor.config=g;Editor.configVersion=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
(q<<5)-q+this.hashValue(c.childNodes[p],e,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=k&&(k.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<0;q^=e}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,k,q,p,t,x){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(H,O){if(null==O){var P=mxEvent.getSource(H);"a"==P.nodeName.toLowerCase()&&(O=P.getAttribute("href"))}null!=O&&e.isCustomLink(O)&&(mxEvent.isTouchEvent(H)||!mxEvent.isPopupTrigger(H))&&e.customLinkClicked(O)&&mxEvent.consume(H);null!=y&&y(H,O)};C.call(this,L,U,g)};v.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(L,U,g){e.isSelectionEmpty()&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"transform-origin",null);0==p&&q()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var K=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():K.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var e= this.container.clientWidth;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth);var k=this.getDiagramContainerOffset();var q=k.x;var p=k.y;"simple"==Editor.currentTheme&&(p+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=p+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top= this.hsplit.style.top,e=Math.max(0,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,e-this.splitSize-40))),this.sidebarContainer.style.width=e+"px",this.diagramContainer.style.left=e+q+"px",this.tabContainer.style.left=e+"px",this.tabContainer.style.right=this.formatWidth+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=e+"px",this.diagramContainer.style.right= this.formatWidth+"px",this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=k.x+"px",this.diagramContainer.style.right="0")}c&&this.editor.graph.sizeDidChange()}else M.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(c){var e=mxUtils.bind(this,function(q){q=this.createMenu(q,null,"geTitle");
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
e.location.href.substring(0,8)!=c.substring(0,8)&&(e.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(q){}}),m||500)}catch(q){b.handleError({message:q.message||mxResources.get("drawingTooLarge")})}else{var k=window.open();k=null!=k?k.document:null;null!=k?(k.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),k.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===t.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function k(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=t):(C.style.backgroundPosition="center center", C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");x.innerText="";x.appendChild(C)}mxUtils.write(c,mxResources.get("links")+":");var q=document.createElement("select");q.style.width="100px";q.style.padding="0px";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";var p=document.createElement("option");p.setAttribute("value","auto");mxUtils.write(p,mxResources.get("automatic"));q.appendChild(p);p=document.createElement("option"); p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("openInNewWindow"));q.appendChild(p);p=document.createElement("option");p.setAttribute("value","self");mxUtils.write(p,mxResources.get("openInThisWindow"));q.appendChild(p);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),q.appendChild(e));c.appendChild(q);mxUtils.write(c,mxResources.get("borderColor")+":");var t="#0000ff",x= null;x=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(t||"none",function(I){t=I;k()});mxEvent.consume(C)}));k();x.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";x.style.marginLeft="4px";x.style.height="22px";x.style.width="22px";x.style.position="relative";x.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";x.className="geColorBtn";c.appendChild(x);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return q.value},focus:function(){q.focus()}}};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var T=e.getExportVariables;e.getExportVariables=function(){var L=T.apply(this,arguments),U=c.getCurrentFile();null!=U&&(L.filename=U.getTitle()); L.pagecount=null!=c.pages?c.pages.length:1;L.page=null!=c.currentPage?c.currentPage.getName():"";L.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return L};var l=e.getGlobalVariable;e.getGlobalVariable=function(L){var U=c.getCurrentFile();return"filename"==L&&null!=U?U.getTitle():"page"==L&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==L?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==L?null!=c.pages?
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};S.style[m?"borderRight":"borderBottom"]="0.5px solid "+G.strokeClr;S.style.borderLeft="0.5px solid "+G.strokeClr});this.updateStyle();b.diagramContainer.appendChild(S);mxEvent.disableContextMenu(S);this.editorUiRefresh=b.refresh;b.refresh=function(x){M.editorUiRefresh.apply(b, arguments);u()};u();var J=document.createElement("canvas");J.width=S.offsetWidth;J.height=S.offsetHeight;S.style.overflow="hidden";J.style.position="relative";S.appendChild(J);var c=J.getContext("2d");this.ui=b;var e=b.editor.graph;this.graph=e;this.container=S;this.canvas=J;var k=function(x,C,I,B,T){x=Math.round(x);C=Math.round(C);I=Math.round(I);B=Math.round(B);c.beginPath();c.moveTo(x+.5,C+.5);c.lineTo(I+.5,B+.5);c.stroke();T&&(m?(c.save(),c.translate(x,C),c.rotate(-Math.PI/2),c.fillText(T,0,0),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
m?G=new mxHierarchicalLayout(v,mxConstants.DIRECTION_WEST):"circle"==m?G=new mxCircleLayout(v):(G=new mxFastOrganicLayout(v,!1),G.forceConstant=80);if(null!=G){var S=function(k,q){v.getModel().beginUpdate();try{null!=k&&k(),G.execute(v.getDefaultParent(),M)}catch(p){throw p;}finally{k=new mxMorphing(v),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){v.getModel().endUpdate();null!=q&&q()})),k.startAnimation()}},J=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(k,q,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
}finally{e.getModel().endUpdate()}t&&(e.setSelectionCell(k),e.scrollCellToVisible(k))}};m=mxUtils.button(mxResources.get("preview"),function(){c(G,S,!1)});m.className="geBtn";K.appendChild(m);m=mxUtils.button(mxResources.get("apply"),function(){c(b.editor.graph,f,!0)});m.className="geBtn gePrimaryBtn";K.appendChild(m);b.editor.cancelFirst||K.appendChild(u);F.appendChild(K);D.appendChild(F);v.appendChild(D);this.container=v},CustomDialog=function(b,f,m,d,u,v,D,F,K,M,G,S){var J=document.createElement("div");
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(k){}};EditorUi.sendReport=function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(k){}};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
(ja?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");L.querySelector("."+aa).src="/images/"+la+"-sel.svg";L.querySelector("."+oa).src="/images/"+ha+".svg";return!0}function t(ia,aa,la,ma){function oa(ta,La){null==ja?(ta=/^https?:\/\//.test(ta)&&!b.editor.isCorsEnabledForUrl(ta)?PROXY_URL+"?url="+encodeURIComponent(ta):TEMPLATE_PATH+"/"+ta,mxUtils.get(ta,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(ja=Ga.getText());La(ja)}))):La(ja)}function ha(ta,La,Ga){if(null!=ta&& mxUtils.isAncestorNode(document.body,aa)&&(ta=mxUtils.parseXml(ta),ta=Editor.extractGraphModel(ta.documentElement,!0),null!=ta)){"mxfile"==ta.nodeName&&(ta=Editor.parseDiagramNode(ta.getElementsByTagName("diagram")[0]));var ya=new mxCodec(ta.ownerDocument),Ja=new mxGraphModel;ya.decode(ta,Ja);ta=Ja.root.getChildAt(0).children||[];b.sidebar.createTooltip(aa,ta,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight|| document.body.clientHeight)-80,800),null!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(La,Ga),!0,null,!0);var Ma=document.createElement("div");Ma.className="geTempDlgDialogMask";L.appendChild(Ma);var ra=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ma&&(L.removeChild(Ma),Ma=null,ra.apply(this,arguments),b.sidebar.hideTooltip=ra)};mxEvent.addListener(Ma,"click",function(){b.sidebar.hideTooltip()})}}var ja=null;if(pa||b.sidebar.currentElt==aa)b.sidebar.hideTooltip();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
DrawioFile.prototype.save=function(b,f,m,d,u,v){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",u,"manual",v,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=m)m({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=m)m({message:mxResources.get("readOnly")}); else throw Error(mxResources.get("readOnly"));}catch(D){if(null!=m)m(D);else throw D;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"simple"==Editor.currentTheme&&this.addMenuItems(L,["zoomIn","zoomOut","-"],null,g);I.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(L,["-","addToScratchpad"],null,g);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(L,["-","exitGroup","home"],null,g)};var B=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,U,g){if(c.editor.graph.isSelectionEmpty())B.apply(this,arguments),c.menus.addMenuItems(L,["copyAsImage"], null,g);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(L,U,g):this.addPopupMenuArrangeItems(L,U,g),this.addMenuItems(L,"- cut copy copyAsImage duplicate -".split(" "),null,g),this.isShowCellEditItems()||this.addPopupDeleteItem(L,U,g),this.addMenuItems(L,["lockUnlock","-"],null,g),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(U)&&e.isCellEditable(U)&&(this.addSubmenu("editCell",L,null,mxResources.get("edit")),L.addSeparator(),e.getModel().isEdge(U))){this.addSubmenu("line", L);var y=e.getModel().getGeometry(U);null!=y&&null!=y.points&&0<y.points.length&&this.addMenuItems(L,["clearWaypoints"],null,g)}1==e.getSelectionCount()&&this.addMenuItems(L,["enterGroup"],null,g);y=c.getSelectionState();null!=y.mergeCell?this.addMenuItem(L,"mergeCells"):(1<y.style.colspan||1<y.style.rowspan)&&this.addMenuItem(L,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
b.container.style.cursor=z?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){x(!0)};this.isDrawing=function(){return e};var C=mxUtils.bind(this,function(z){if(d){var E=F.length,A=k&&0<D.length&&null!=F&&2>F.length;A||D.push.apply(D,F);F=[];D.push(null);u.push(d);d=null;(A||G)&&this.stopDrawing();G&&(!A||2<=E)&&this.startDrawing();mxEvent.consume(z)}}),I=new mxCell;I.edge=!0;var B=function(){var z=b.getCurrentCellStyle(I);z=mxUtils.getValue(b.currentVertexStyle,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
for(var P=O.getElementsByTagName("a"),V=!1,R=0;R<P.length;R++)H=P[R].getAttribute("href"),null!=H&&"data:action/json,"==H.substring(0,17)&&(P[R].setAttribute("href",this.updateCustomLink(g,H)),V=!0);V&&this.labelChanged(y,O.innerHTML)}};Graph.prototype.updateCustomLink=function(g,y){if("data:action/json,"==y.substring(0,17))try{var H=JSON.parse(y.substring(17));null!=H.actions&&(this.updateCustomLinkActions(g,H.actions),y="data:action/json,"+JSON.stringify(H))}catch(O){}return y};Graph.prototype.updateCustomLinkActions=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
D():F(100);mxEvent.consume(W)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(W){mxEvent.isTouchEvent(W)||F(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(W,J){this.startX=J.getGraphX();this.startY=J.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(W,J){},mouseUp:function(W,J){mxEvent.isTouchEvent(J.getEvent())&&Math.abs(this.scrollLeft-
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
A){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(A||"0")+(null!=E?"&filename="+encodeURIComponent(E):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<x?"&dpi="+x:"")+"&bg="+(null!=q?q:"none")+"&w="+l+"&h="+n+"&border="+t+"&xml="+encodeURIComponent(B))})}else"png"==k?c.exportImage(p,null==q||"none"==q,!0,!1,!1,t,!0,!1,null,C,x):c.exportImage(p,!1,!0,!1,!1,t,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1); var c=this.editor.graph,e="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var q=c;this.currentPage!=this.pages[k]&&(q=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[k]),q.model.setRoot(this.pages[k].root));e+=this.pages[k].getName()+" "+q.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},k=document.createElement("div");k.style.whiteSpace="nowrap";var q=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
if(null!=t.hoverIcons){var z=t.hoverIcons.update;t.hoverIcons.update=function(){x.freehand.isDrawing()||z.apply(this,arguments)}}if(null!=x.freehand){var E=x.freehand.createStyle;x.freehand.createStyle=function(W){return E.apply(this,arguments)+"sketch=0;"}}t.editor.addListener("statusChanged",mxUtils.bind(this,function(){t.setStatusText(t.editor.getStatus())}));t.setStatusText(t.editor.getStatus());var A=t.menus.get("viewZoom");if(null!=A){var N=function(W){if(mxEvent.isAltDown(W))t.hideCurrentMenu(),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return x.apply(this,arguments)};var C=e.addClickHandler;e.addClickHandler=function(L,U,g){var y=U;U=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"none":"inline-flex"):this.statusContainer.style.display="inline-flex"});this.editor.addListener("statusChanged",k);k()};EditorUi.prototype.switchTheme=function(c){this.isDefaultTheme(c)&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer), null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(c);this.switchCssForTheme(c);this.createWrapperForTheme(c);this.createMainMenuForTheme(c);this.createFooterMenuForTheme(c);this.createPickerMenuForTheme(c);this.createMenubarForTheme(c);this.sidebarContainer.style.display= "";if("sketch"==c){this.createFormatWindow();this.formatContainer.style.left="0px";this.formatContainer.style.top="0px";this.formatContainer.style.width="";this.formatContainer.style.zIndex="";this.formatContainer.style.border="none";var e=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);this.createShapesWindow();this.sidebarContainer.className="";this.sidebarContainer.style.position="absolute";this.sidebarContainer.style.left="0px";this.sidebarContainer.style.top="0px"; this.sidebarContainer.style.bottom=e?"32px":"0px";this.sidebarContainer.style.width="100%"}null!=this.format&&(c=this.isDefaultTheme(c)||"atlas"==c,this.format.showCloseButton!=c&&(this.format.showCloseButton=c,this.format.refresh()))};EditorUi.prototype.getWindows=function(){var c=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(c=c.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(c=c.concat([this.menus.tagsWindow,this.menus.findWindow,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=q?this.fileLoaded(q)||t():t()});e?c():this.handleError(C,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else t();return p};EditorUi.prototype.getHashValueForPages=function(c,e){var k=0,q=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var x=c[t].node.cloneNode(!1);x.removeAttribute("name");q.root=c[t].root; var C=p.encode(q);this.editor.graph.saveViewState(c[t].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");x.appendChild(C);null!=e&&(e.eltCount+=x.getElementsByTagName("*").length,e.nodeCount+=x.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(x,function(I,B,T,l){return!l||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=B&&"y"!=B&&"width"!=B&&"height"!=B?l&&"mxCell"==I.nodeName&&"previous"==B?null:T:Math.round(T)},e)<<0}return k};EditorUi.prototype.hashValue=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.update)};var G=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?G.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(g){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var S=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(g){g=S.apply(this,arguments);var y=this.editorUi, H=y.editor.graph;if(H.isEnabled()){var O=y.getCurrentFile();null!=O&&O.isAutosaveOptional()&&g.appendChild(this.createOption(mxResources.get("autosave"),function(){return y.editor.autosave},function(R){y.editor.setAutosave(R);y.editor.autosave&&O.isModified()&&O.fileChanged()},{install:function(R){this.listener=function(){R(y.editor.autosave)};y.editor.addListener("autosaveChanged",this.listener)},destroy:function(){y.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&H.isEnabled()&& "undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return H.mathEnabled},function(R){y.actions.get("mathematicalTypesetting").funct()},{install:function(R){this.listener=function(){R(H.mathEnabled)};y.addListener("mathEnabledChanged",this.listener)},destroy:function(){y.removeListener(this.listener)}});g.appendChild(P);var V=y.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");V.style.position="relative";V.style.marginLeft= "6px";P.appendChild(V)}return g};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,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var m=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,u=[],v,D=[],F,K=!1,M=!0,G=!0,S=!0,J=!0,c=[],e=!1,k=!1,q=!1,p={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},t=!0;this.setClosedPath=function(z){K=z};this.setAutoClose=function(z){M=z};this.setAutoInsert=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
arguments);null!=U&&null!=U.src&&Graph.isPageLink(U.src)&&(U={originalSrc:U.src});return U};var p=e.setBackgroundImage;e.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=c.createImageForPageLink(L.originalSrc,c.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
Editor.createRoughCanvas=function(g){var y=rough.canvas({getContext:function(){return g}});y.draw=function(H){var O=H.sets||[];H=H.options||this.getDefaultOptions();for(var P=0;P<O.length;P++){var V=O[P];switch(V.type){case "path":null!=H.stroke&&this._drawToContext(g,V,H);break;case "fillPath":this._drawToContext(g,V,H);break;case "fillSketch":this.fillSketch(g,V,H)}}};y.fillSketch=function(H,O,P){var V=g.state.strokeColor,R=g.state.strokeWidth,W=g.state.strokeAlpha,X=g.state.dashed,Z=P.fillWeight; 0>Z&&(Z=P.strokeWidth/2);g.setStrokeAlpha(g.state.fillAlpha);g.setStrokeColor(P.fill||"");g.setStrokeWidth(Z);g.setDashed(!1);this._drawToContext(H,O,P);g.setDashed(X);g.setStrokeWidth(R);g.setStrokeColor(V);g.setStrokeAlpha(W)};y._drawToContext=function(H,O,P){H.begin();for(var V=0;V<O.ops.length;V++){var R=O.ops[V],W=R.data;switch(R.op){case "move":H.moveTo(W[0],W[1]);break;case "bcurveTo":H.curveTo(W[0],W[1],W[2],W[3],W[4],W[5]);break;case "lineTo":H.lineTo(W[0],W[1])}}H.end();"fillPath"===O.type&& P.filled?H.fill():H.stroke()};return y};(function(){function g(V,R,W){this.canvas=V;this.rc=R;this.shape=W;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,g.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,g.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,g.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(c){var e=f.apply(this,arguments);if(null==e)try{var k=c.indexOf("&lt;mxfile ");if(0<=k){var q=c.lastIndexOf("&lt;/mxfile&gt;");q>k&&(e=c.substring(k,q+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var p=mxUtils.parseXml(c),t=this.editor.extractGraphModel(p.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);e=null!=t?mxUtils.getXml(t):""}}catch(x){}return e};EditorUi.prototype.validateFileData=function(c){if(null!= c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;e.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,q=c.getElementsByTagName("diagram");
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
q.isRemoteFileFormat(B,c.name)?q.isOffline()?q.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):q.parseFileData(B,mxUtils.bind(this,function(T){4==T.readyState&&(200<=T.status&&299>=T.status?e(T.responseText):k())}),c.name):k()}):I||k()}},function(t){k(t)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p,null,null,null,k))};EditorUi.prototype.importFile=function(c,e,k,q,p,t,x,C, I,B,T,l){B=null!=B?B:!0;var n=!1,z=null,E=mxUtils.bind(this,function(A){var N=null;null!=A&&"<mxlibrary"==A.substring(0,10)?this.loadLibrary(new LocalLibrary(this,A,x)):N=this.importXml(A,k,q,B,null,null!=l?mxEvent.isControlDown(l):null);null!=C&&C(N)});"image"==e.substring(0,5)?(I=!1,"image/png"==e.substring(0,9)&&(e=T?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(z=this.importXml(e,k,q,B,null,null!=l?mxEvent.isControlDown(l):null),I=!0)),I||(e=this.editor.graph,I=c.indexOf(";"),0< I&&(c=c.substring(0,I)+c.substring(c.indexOf(",",I+1))),B&&e.isGridEnabled()&&(k=e.snap(k),q=e.snap(q)),z=[e.insertVertex(null,null,"",k,q,p,t,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(n=!0,this.importGraphML(c,E)):null!=I&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(n=!0,this.importVisio(I,E)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(g){return g.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(g){return Graph.isGoogleFontUrl(g)};Graph.createFontElement=function(g,y){var H=Graph.fontMapping[y];null==H&&Graph.isCssFontUrl(y)?(g=document.createElement("link"),g.setAttribute("rel","stylesheet"),g.setAttribute("type","text/css"),g.setAttribute("charset","UTF-8"),g.setAttribute("href",y)):(null==H&&(H='@font-face {\nfont-family: "'+
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
EditorUi.prototype.createParentLookup=function(b,f){function m(M){var G=d[M];null==G&&(G={inserted:[],moved:{}},d[M]=G);return G}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var u=0;u<f[EditorUi.DIFF_INSERT].length;u++){var v=f[EditorUi.DIFF_INSERT][u],D=null!=v.parent?v.parent:"",F=null!=v.previous?v.previous:"";m(D).inserted[F]=v}if(null!=f[EditorUi.DIFF_UPDATE])for(var K in f[EditorUi.DIFF_UPDATE])v=f[EditorUi.DIFF_UPDATE][K],null!=v.previous&&(D=v.parent,null==D&&(u=b.getCell(K),null!=u&&(u= b.getParent(u),null!=u&&(D=u.getId()))),null!=D&&(m(D).moved[v.previous]=K));return d};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+p(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+p(C.charCodeAt(i),0,0):r+p(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(x.responseType="blob");x.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==e)k(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(B){var T= new Image;T.onload=function(){try{var l=T.width,n=T.height;if(0==l&&0==n){var z=I.result,E=z.indexOf(","),A=decodeURIComponent(escape(atob(z.substring(E+1)))),N=mxUtils.parseXml(A).getElementsByTagName("svg");0<N.length&&(l=parseFloat(N[0].getAttribute("width")),n=parseFloat(N[0].getAttribute("height")))}k(I.result,l,n)}catch(Q){q(Q)}};T.src=I.result};I.onerror=function(B){q(B)}}else q(C)};x.onerror=function(C){q(C)};x.send()};EditorUi.prototype.insertAsPreText=function(c,e,k){var q=this.editor.graph,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(c,e,k){var q=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(q^=this.hashValue(c.nodeName,e,k));if(null!=c.attributes){null!=k&&(k.attrCount+=c.attributes.length);for(var p=0;p<c.attributes.length;p++){var t=c.attributes[p].name,x=null!=e?e(c,t,c.attributes[p].value,!0):c.attributes[p].value;null!=x&&(q^=this.hashValue(t,e,k)+this.hashValue(x,e,k))}}if(null!=c.childNodes)for(p=0;p<c.childNodes.length;p++)q= (q<<5)-q+this.hashValue(c.childNodes[p],e,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=k&&(k.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<0;q^=e}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,k,q,p,t,x){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
N&&(A=this.getDeletableCells(this.addAllEdges(A)));for(var Q=[],L=0;L<A.length;L++){var U=A[L];k.isEdge(U)&&v(U)&&(Q.push(U),U=k.getTerminal(U,!1));if(d(U)){var g=[];e.traverse(U,!0,function(y,H){var O=null!=H&&e.isTreeEdge(H);O&&g.push(H);(null==H||O)&&g.push(y);return null==H||O});0<g.length&&(Q=Q.concat(g),U=e.getIncomingTreeEdges(A[L]),A=A.concat(U))}else null!=U&&Q.push(A[L])}A=Q;return p.apply(this,arguments)};c.hoverIcons.getStateAt=function(A,N,Q){return d(A.cell)?null:this.graph.view.getState(this.graph.getCellAt(N, Q))};var t=e.duplicateCells;e.duplicateCells=function(A,N){A=null!=A?A:this.getSelectionCells();for(var Q=A.slice(0),L=0;L<Q.length;L++){var U=e.view.getState(Q[L]);if(null!=U&&d(U.cell)){var g=e.getIncomingTreeEdges(U.cell);for(U=0;U<g.length;U++)mxUtils.remove(g[U],A)}}this.model.beginUpdate();try{var y=t.call(this,A,N);if(y.length==A.length)for(L=0;L<A.length;L++)if(d(A[L])){var H=e.getIncomingTreeEdges(y[L]);g=e.getIncomingTreeEdges(A[L]);if(0==H.length&&0<g.length){var O=this.cloneCell(g[0]);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(k){D.value=k.target.result};e.readAsText(c)}},!1));f.appendChild(F);mxEvent.addListener(F,"change",function(){var c=u();if(0==D.value.length||D.value==J)J=c,D.value=J});b.isOffline()||"mermaid"!=m&&"plantUml"!=m||(K=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==m?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),K.className="geBtn",f.appendChild(K));K=mxUtils.button(mxResources.get("close"),function(){D.value==J?b.hideDialog():b.confirm(mxResources.get("areYouSure"),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
k)}}catch(q){}};EditorUi.prototype.updatePageLinksForCell=function(c,e){var k=document.createElement("div"),q=this.editor.graph,p=q.getLinkForCell(e);null!=p&&q.setLinkForCell(e,this.updatePageLink(c,p));if(q.isHtmlLabel(e)){k.innerHTML=Graph.sanitizeHtml(q.getLabel(e));for(var t=k.getElementsByTagName("a"),x=!1,C=0;C<t.length;C++)p=t[C].getAttribute("href"),null!=p&&(t[C].setAttribute("href",this.updatePageLink(c,p)),x=!0);x&&q.labelChanged(e,k.innerHTML)}for(C=0;C<q.model.getChildCount(e);C++)this.updatePageLinksForCell(c, q.model.getChildAt(e,C))};EditorUi.prototype.updatePageLink=function(c,e){if(Graph.isPageLink(e)){var k=c[e.substring(e.indexOf(",")+1)];e=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==e.substring(0,17))try{var q=JSON.parse(e.substring(17));if(null!=q.actions){for(var p=0;p<q.actions.length;p++){var t=q.actions[p];if(null!=t.open&&Graph.isPageLink(t.open)){var x=t.open.substring(t.open.indexOf(",")+1);k=c[x];null!=k?t.open="data:page/id,"+k:null==this.getPageById(x)&&delete t.open}}e=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(c,e){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var e=Graph.prototype.init;Graph.prototype.init=function(){function g(P){y=P}e.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var y=null;mxEvent.addListener(this.container,"mouseenter", g);mxEvent.addListener(this.container,"mousemove",g);mxEvent.addListener(this.container,"mouseleave",function(P){y=null});this.isMouseInsertPoint=function(){return null!=y};var H=this.getInsertPoint;this.getInsertPoint=function(){return null!=y?this.getPointForEvent(y):H.apply(this,arguments)};var O=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var V=this.graph.getCellStyle(P);if(null!=V&&"rack"==V.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=V.rackUnitSize? parseFloat(V.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=V.marginLeft||0;R.marginRight=V.marginRight||0;R.marginTop=V.marginTop||0;R.marginBottom=V.marginBottom||0;R.allowGaps=V.allowGaps||0;R.horizontal="1"==mxUtils.getValue(V,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return O.apply(this,arguments)};this.updateGlobalUrlVariables()};var k=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(g,y){return Graph.processFontStyle(k.apply(this,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
W.fillStyle=R;return W};g.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};g.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};g.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var V=2;V<arguments.length;V+=2)this.lastX=arguments[V-1],this.lastY=arguments[V],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.formatWindow.window.toggleMinimized()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);"sketch"==Editor.currentTheme?(c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>c)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var F=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(c){var e= this.formatWindow;null!=e?e.window.setVisible(null!=c?c:!this.isFormatPanelVisible()):F.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=function(c){var e=EditorUi.prototype.hsplitPosition;0==e&&(e=134);var k=this.hsplitPosition,q=mxUtils.bind(this,function(){this.hsplitPosition=p;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),p=c?e:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==p?"translateX(0)":"translateX(-100%)");0!=p&&q();window.setTimeout(mxUtils.bind(this,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
m?G=new mxHierarchicalLayout(v,mxConstants.DIRECTION_WEST):"circle"==m?G=new mxCircleLayout(v):(G=new mxFastOrganicLayout(v,!1),G.forceConstant=80);if(null!=G){var S=function(k,q){v.getModel().beginUpdate();try{null!=k&&k(),G.execute(v.getDefaultParent(),M)}catch(p){throw p;}finally{k=new mxMorphing(v),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){v.getModel().endUpdate();null!=q&&q()})),k.startAnimation()}},J=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(k,q,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"data:action/json,"+JSON.stringify(q)}}catch(C){}return e};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,k,q,p){var t=mxUtils.bind(this,function(x){this.loadingExtensions=!1;null!=k?k(x):this.handleError(x)});this.createTimeout(null,mxUtils.bind(this,function(x){q=null!=q?q:c.name;var C=mxUtils.bind(this,function(B){x.clear()&&t(B)}),I=mxUtils.bind(this,function(){this.loadingExtensions=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe