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 |
---|---|---|---|---|---|---|---|
M&&A(Editor.svgBrokenImage.src)};U.src=m}}catch(W){A(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(m,A,M,Q){null==Q&&(Q=this.createImageUrlConverter());var U=0,W=M||{};M=mxUtils.bind(this,function(P,V){P=m.getElementsByTagName(P);for(var X=0;X<P.length;X++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=Q.convert(Y.getAttribute(V));if(null!=Z&&"data:"!=Z.substring(0,5)){var da=W[Z];null==da?(U++,this.convertImageToDataUri(Z,function(ba){null!=ba&&(W[Z]=ba,Y.setAttribute(V,
ba));U--;0==U&&A(m)})):Y.setAttribute(V,da)}else null!=Z&&Y.setAttribute(V,Z)}}catch(ba){}})(P[X])});M("image","xlink:href");M("img","src");0==U&&A(m)};Editor.base64Encode=function(m){for(var A="",M=0,Q=m.length,U,W,P;M<Q;){U=m.charCodeAt(M++)&255;if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);A+="==";break}W=m.charCodeAt(M++);if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(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 |
mxUtils.getTextContent(Z[Y]);W=b.stringToCells(Graph.decompress(A));var da=b.editor.graph.getBoundingBoxFromGeometry(W);y(null,null,0,0,0,0,{xml:A,w:da.width,h:da.height})}J=!0}}catch(ba){null!=window.console&&console.log("Error in library dialog: "+ba)}J||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){null!=window.console&&console.log("Error in library dialog: "+ba)}return null}function E(T){T.dataTransfer.dropEffect=null!=t?"move":"copy";T.stopPropagation();
T.preventDefault()}function D(T){T.stopPropagation();T.preventDefault();H=!1;u=x(T);if(null!=t)null!=u&&u<d.children.length?(z.splice(u>t?u-1:u,0,z.splice(t,1)[0]),d.insertBefore(d.children[t],d.children[u])):(z.push(z.splice(t,1)[0]),d.appendChild(d.children[t]));else if(0<T.dataTransfer.files.length)b.importFiles(T.dataTransfer.files,0,0,b.maxImageSize,L(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var p=decodeURIComponent(T.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(p)|| | 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 |
"")+"/log?severity="+v+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(n)+(null!=t?":colno:"+encodeURIComponent(t):"")+(""!=u.stack?"&stack="+encodeURIComponent(u.stack):""))}catch(H){}try{B||null==window.console||console.error(v,d,g,n,t,u)}catch(H){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?
window.DRAWIO_LOG_URL:"";(new Image).src=g+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(n){}};EditorUi.sendReport=function(d,g){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{g=null!=g?g:5E4,d.length>g&&(d=d.substring(0,g)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(n){}}; | 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);this.handleError(d,g,n,t,u)}),T,mxResources.get("changeUser"),mxUtils.bind(this,function(){function C(){S.innerText="";for(var K=0;K<J.length;K++){var R=document.createElement("option");mxUtils.write(R,J[K].displayName);R.value=K;S.appendChild(R);R=document.createElement("option");R.innerHTML=" ";mxUtils.write(R,"<"+J[K].email+">");R.setAttribute("disabled","disabled");S.appendChild(R)}R=document.createElement("option");mxUtils.write(R,mxResources.get("addAccount"));R.value=J.length;
S.appendChild(R)}var J=this.drive.getUsersList(),F=document.createElement("div"),O=document.createElement("span");O.style.marginTop="6px";mxUtils.write(O,mxResources.get("changeUser")+": ");F.appendChild(O);var S=document.createElement("select");S.style.width="200px";C();mxEvent.addListener(S,"change",mxUtils.bind(this,function(){var K=S.value,R=J.length!=K;R&&this.drive.setUser(J[K]);this.drive.authorize(R,mxUtils.bind(this,function(){R||(J=this.drive.getUsersList(),C())}),mxUtils.bind(this,function(m){this.handleError(m)}), | 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 |
I.vertex=!0;N.addCell(I);N.dblClick=function(J,F){if(null!=F&&F!=I)N.setSelectionCell(F);else{F=mxUtils.convertPoint(N.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=N.view.scale;var O=N.view.translate;N.setSelectionCell(l((F.x-3*J)/J-O.x,(F.y-3*J)/J-O.y))}};k=new mxKeyHandler(N);k.bindKey(46,x);k.bindKey(8,x);N.getRubberband().isForceRubberbandEvent=function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==I)};N.panningHandler.isForcePanningEvent=function(J){return 2== | 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(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,B,null,1<H,L,t,v,u);H=this.isServices(H)?4<H?390:280:160;this.showDialog(d.container,420,H,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,n,t,u,v){};EditorUi.prototype.pickFolder=function(d,g,n){g(null)};EditorUi.prototype.exportSvg=function(d,g,n,t, | 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 |
try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{y.container.style.visibility="";y.model.endUpdate();y.cellRenderer.redraw=N;this.changeListenerEnabled=E;f||(k.history=l,k.indexOfNextAdd=x,k.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)z!=y.mathEnabled?
(this.ui.editor.updateGraphComponents(),y.refresh()):(D!=y.foldingEnabled?y.view.revalidate():y.view.validate(),y.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b}; | 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 |
ma=la;da=na;ba=ka;ea=aa;za=pa;Ba=ua;Ca=ha;ea.style.backgroundColor=y;ea.style.border=E}function T(aa,la,na,pa,ha,ka,ua,wa,Ma,Ia,Aa){function Ja(Oa,Ya){null==Ha?(La=Oa,La=/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)?PROXY_URL+"?url="+encodeURIComponent(La):TEMPLATE_PATH+"/"+La,mxUtils.get(La,mxUtils.bind(this,function(Wa){200<=Wa.getStatus()&&299>=Wa.getStatus()&&(Ha=Wa.getText());Ya(Ha,La)}))):Ya(Ha,La)}function Na(Oa,Ya){if(null==aa||A||b.sidebar.currentElt==ra)b.sidebar.hideTooltip();
else if(b.sidebar.hideTooltip(),null!=M){var Wa="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+M.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+M.naturalWidth+'" height="'+M.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";B(Wa,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),na,aa)}else b.sidebar.currentElt=ra,A=!0,Ja(aa,function(ab){A&&b.sidebar.currentElt==
ra&&B(ab,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,Ya);A=!1})}var ra=document.createElement("div");ra.className="geTemplate geAdaptiveAsset";ra.style.position="relative";ra.style.height=Ka+"px";ra.style.width=oa+"px";ra.style.border="1px solid transparent";var Ha=null,La=aa;null!=na?ra.setAttribute("title",mxResources.get(na,null,na)):null!=pa&&0<pa.length&&ra.setAttribute("title",pa);if(null!=ka){ra.style.display="inline-flex";ra.style.justifyContent="center";ra.style.alignItems="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 |
function(p,q){var C=c.getCurrentFile();null==C||C.getMode()!=App.MODE_GOOGLE&&C.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(C.getTitle())||this.addMenuItems(p,["liveImage","-"],q);this.addMenuItems(p,["embedImage","embedSvg","-","embedHtml"],q);navigator.standalone||c.isOffline()||this.addMenuItems(p,["embedIframe"],q);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(p,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),q)})));c.addInsertItem=function(p,q,C,
J){("plantUml"!=J||EditorUi.enablePlantUml&&!c.isOffline())&&p.addItem(C,null,mxUtils.bind(this,function(){if("fromText"==J||"formatSql"==J||"plantUml"==J||"mermaid"==J){var F=new ParseDialog(c,C,J);c.showDialog(F.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else F=new CreateGraphDialog(c,C,J),c.showDialog(F.container,620,420,!0,!1);F.init()}),q,null,l())};var B=function(p){k.getModel().beginUpdate();try{p=k.addCell(p),k.fireEvent(new mxEventObject("cellsInserted","cells",[p])), | 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 |
return T};EditorUi.prototype.getXmlFileData=function(d,g,n,t){d=null!=d?d:!0;g=null!=g?g:!1;n=null!=n?n:!Editor.defaultCompressed;var u=this.editor.getGraphXml(d,t);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(L){var G=L.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&n?(G=mxUtils.trim(mxUtils.getTextContent(L)),L=L.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&L.appendChild(mxUtils.parseXml(G).documentElement))):null==G||n?L=L.cloneNode(!0):
(L=L.cloneNode(!1),mxUtils.setTextContent(L,Graph.compressNode(G)));u.appendChild(L)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(u)),u=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var v=this.pages[g],B=v.node;if(v!=this.currentPage)if(v.needsUpdate){var H=new mxCodec(mxUtils.createXmlDocument());H=H.encode(new mxGraphModel(v.root));this.editor.graph.saveViewState(v.viewState,H,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 |
arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,A,M,Q,U,W,P,V,X,Y,Z){t.apply(this,arguments);Graph.processFontAttributes(Z)};var u=mxText.prototype.redraw;mxText.prototype.redraw=function(){u.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,A,M){function Q(){for(var ea=P.getSelectionCells(),za=[],Ba=0;Ba<ea.length;Ba++)P.isCellVisible(ea[Ba])&& | 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?d:"",extras:JSON.stringify(u),scale:B,border:H,w:p&&isFinite(p)?p:null,h:q&&isFinite(q)?q:null}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var n=d.lastIndexOf("#");if(0<n){d=decodeURIComponent(d.substring(n+ | 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 |
ua.innerText=ka;ha.appendChild(ua);qa.appendChild(ha);mxEvent.addListener(ha,"click",function(){function Ma(){var Aa=Ia.querySelector(".geTemplateDrawioCatLink");null!=Aa?Aa.click():setTimeout(Ma,200)}ba=!0;var Ia=K.querySelector(".geTemplatesList");Ia.style.display="block";Ca.style.width="";xa.style.display="";xa.value="";Z=null;Ma()});ma.style.display=ja.length<=la?"none":""}function p(ja,aa,la){function na(La,Xa){La=mxResources.get(La,null,La.substring(0,1).toUpperCase()+La.substring(1));var Sa= | 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(D);mxUtils.br(c);this.init=function(){D.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var z=document.createElement("input");z.setAttribute("type","text");z.setAttribute("size","4");z.style.marginRight="16px";z.style.marginLeft="4px";z.value=y;c.appendChild(z);mxUtils.write(c,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text"); | 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<<5)-t+this.hashValue(d.childNodes[u],g,n)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=n&&(n.byteCount+=d.length);for(u=0;u<d.length;u++)g=(g<<5)-g+d.charCodeAt(u)<<0;t^=g}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,n,t,u,v,B){};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 |
ba));U--;0==U&&A(m)})):Y.setAttribute(V,da)}else null!=Z&&Y.setAttribute(V,Z)}}catch(ba){}})(P[X])});M("image","xlink:href");M("img","src");0==U&&A(m)};Editor.base64Encode=function(m){for(var A="",M=0,Q=m.length,U,W,P;M<Q;){U=m.charCodeAt(M++)&255;if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);A+="==";break}W=m.charCodeAt(M++);if(M==Q){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(W&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2);A+="=";break}P=m.charCodeAt(M++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(W&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((W&15)<<2|(P&192)>>6);
A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P&63)}return A};Editor.prototype.loadUrl=function(m,A,M,Q,U,W,P,V){try{var X=!P&&(Q||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));U=null!=U?U:!0;var Y=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=A){var da=Z.getText();if(X){if((9==document.documentMode||10==document.documentMode)&&"undefined"!== | 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.importZipFile=function(d,g,n){var t=this,u=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(v){if(mxUtils.isEmptyObject(v.files))n();else{var B=0,H,L=!1;v.forEach(function(G,T){G=T.name.toLowerCase();"diagram/diagram.xml"==G?(L=!0,T.async("string").then(function(p){0==p.indexOf("<mxfile ")?g(p):n()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>B&&(B=G,H=T))});0<B?H.async("string").then(function(G){(new XMLHttpRequest).upload&&
t.isRemoteFileFormat(G,d.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,n):t.parseFileData(G,mxUtils.bind(this,function(T){4==T.readyState&&(200<=T.status&&299>=T.status?g(T.responseText):n())}),d.name):n()}):L||n()}},function(v){n(v)}):n()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u,null,null,null,n))};EditorUi.prototype.importFile=function(d,g,n,t,u,v,B,H, | 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 |
Aa?ka.getName():"pagenumber"==Aa?ha+1:"pagecount"==Aa?null!=m.pages?m.pages.length:1:Ia.apply(this,arguments)};document.body.appendChild(ja.container);m.updatePageRoot(ka);ja.model.setRoot(ka.root)}na=Fa(ja,na,ha!=la,ka.getId());ja!=U&&ja.container.parentNode.removeChild(ja.container)}}else na=Fa(U);null==na?m.handleError({message:mxResources.get("errorUpdatingPreview")}):(na.mathEnabled&&(la=na.wnd.document,Qa&&(na.wnd.IMMEDIATE_PRINT=!0),la.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+
'/js/math-print.js">\x3c/script>')),na.closeDocument(),Graph.rewritePageLinks(na.wnd.document),!na.mathEnabled&&Qa&&PrintDialog.printPreview(na));null!=Ga&&(U.shapeForegroundColor=Va,U.shapeBackgroundColor=Ua,U.stylesheet=Ga,U.refresh())}}var U=m.editor.graph,W=document.createElement("div"),P=document.createElement("h3");P.style.width="100%";P.style.textAlign="center";P.style.marginTop="0px";mxUtils.write(P,A||mxResources.get("print"));W.appendChild(P);var V=1,X=1;P=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 |
var F=0,O=0,S=I.geometry,K=mxUtils.format((J.geometry.x+3-S.x)/S.width);J=mxUtils.format((J.geometry.y+3-S.y)/S.height);0>K?(F=K*S.width,K=0):1<K&&(F=(K-1)*S.width,K=1);0>J?(O=J*S.height,J=0):1<J&&(O=(J-1)*S.height,J=1);return{x:K,y:J,dx:parseInt(F),dy:parseInt(O)}}function D(J){if(1==N.getSelectionCount()){var F=N.getSelectionCell();J&&(F.constObj=null);J=E(F);T.value=100*J.x;q.value=100*J.y;p.value=J.dx;C.value=J.dy;G.style.visibility=""}else G.style.visibility="hidden"}var z=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 |
R){k(R)},300),mouseUp:function(K,R){k(R)}};z.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(K,R){K=function(M){return null!=M?M.id:null};var m=null!=b.currentPage?b.currentPage.getId():null,A=R.getProperty("added");R=R.getProperty("removed");c("selectionChange",{pageId:m,removed:A?A.map(K):[],added:R? | 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=C?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){B(!0)};this.isDrawing=function(){return g};var H=mxUtils.bind(this,function(C){if(c){var J=y.length,F=n&&0<x.length&&null!=y&&2>y.length;F||x.push.apply(x,y);y=[];x.push(null);k.push(c);c=null;(F||z)&&this.stopDrawing();z&&(!F||2<=J)&&this.startDrawing();mxEvent.consume(C)}}),L=new mxCell;L.edge=!0;var G=function(){var C=b.getCurrentCellStyle(L);C=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 |
null,null,null,!0,null,null,u,n,t);this.showDialog(d.container,620,460,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,n,t){d=null!=d?d:mxUtils.bind(this,function(u,v,B,H){v||(u=new ChangePageSetup(this,t?B:null,u),u.ignoreColor=!t,null!=H&&t&&(u.shadowVisible=H),this.editor.graph.model.execute(u))});d=new BackgroundImageDialog(this,d,g,n,t);this.showDialog(d.container,400,t?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,n,t,u){d=new LibraryDialog(this,
d,g,n,t,u);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(v){v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(n){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,n,t,u,v,B){var H=null!=this.spinner&& | 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 |
urlParams.thumb||null!=L.mimeType&&"application/vnd.jgraph.mxfile"!=L.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(T){try{var p=null;try{null!=T&&(p=T.toDataURL("image/png")),null!=p&&(p=p.length>this.maxThumbnailSize?null:p.substring(p.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(q){p=null}G(p,"image/png")}catch(q){d(q)}})))&&G(null,null,f.constructor!=DriveLibrary)}catch(T){d(T)}}else this.ui.editor.graph.reset(),I({message:mxResources.get("readOnly")})}catch(T){d(T)}}; | 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.model.isVertex(p)&&k.isAutoSizeCell(p)&&k.updateCellSize(p)}finally{k.getModel().endUpdate()}k.scrollCellToVisible(p);k.setSelectionCell(p);k.container.focus();k.editAfterInsert&&k.startEditing(p);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(k.view.getState(p))},0);return p},H=function(p,q,C,J,F){p=new mxCell(p,new mxGeometry(0,0,q,C),J);p.vertex=!0;null==F&&(F=k.getCenterInsertPoint(k.getBoundingBoxFromGeometry([p],!0)));p.geometry.x=F.x;p.geometry.y=F.y;return B(p)};c.actions.put("insertText", | 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(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(F){return n.isVertex(F)&&l(F)}function k(F){var O=!1;null!=F&&(O="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 |
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 |
F){return new mxXmlRequest(EXPORT_URL,"format="+n+"&base64="+(F||"0")+(null!=J?"&filename="+encodeURIComponent(J):"")+"&extras="+encodeURIComponent(JSON.stringify(C))+(0<B?"&dpi="+B:"")+"&bg="+(null!=t?t:"none")+"&w="+p+"&h="+q+"&border="+v+"&xml="+encodeURIComponent(G))})}else"png"==n?d.exportImage(u,null==t||"none"==t,!0,!1,!1,v,!0,!1,null,H,B):d.exportImage(u,!1,!0,!1,!1,v,!0,!1,"jpeg",H);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
var d=this.editor.graph,g="";if(null!=this.pages)for(var n=0;n<this.pages.length;n++){var t=d;this.currentPage!=this.pages[n]&&(t=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[n]),t.model.setRoot(this.pages[n].root));g+=this.pages[n].getName()+" "+t.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},n=document.createElement("div");n.style.whiteSpace="nowrap";var t= | 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,null,function(P){console.log(P)},600,null,null,null,null,null,J):(x(F,void 0),l(F))}function u(P){function V(X){Q.style.background="transparent";Q.innerText="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,X);Q.appendChild(Y);q.stop()}if(null!=Q)if(Q.style.background="transparent",Q.innerText="",null==P||P.folder||/\.drawiolib$/.test(P.name))V(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),m=P,q.spin(Q),n(P,function(X){q.stop();
if(m==P)if("mxlibrary"==X.documentElement.nodeName)V(mxResources.get("noPreview"));else{var Y=X.getElementsByTagName("diagram");J=AspectDialog.prototype.createViewer(Q,0==Y.length?X.documentElement:Y[0],null,"transparent")}},function(){F=null;V(mxResources.get("notADiagramFile"))})}catch(X){F=null,V(mxResources.get("notADiagramFile"))}}function v(){var P=g(".odFilesBreadcrumb");if(null!=P){P.innerText="";for(var V=0;V<K.length-1;V++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML= | 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}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var T=g.getExportVariables;g.getExportVariables=function(){var K=T.apply(this,arguments),R=d.getCurrentFile();null!=R&&(K.filename=R.getTitle());
K.pagecount=null!=d.pages?d.pages.length:1;K.page=null!=d.currentPage?d.currentPage.getName():"";K.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return K};var p=g.getGlobalVariable;g.getGlobalVariable=function(K){var R=d.getCurrentFile();return"filename"==K&&null!=R?R.getTitle():"page"==K&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==K?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==K?null!=d.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 |
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,k=[],l,x=[],y,E=!1,D=!0,z=!0,N=!0,I=!0,d=[],g=!1,n=!1,t=!1,u={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},v=!0;this.setClosedPath=function(C){E=C};this.setAutoClose=function(C){D=C};this.setAutoInsert= | 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=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="30px";C.appendChild(n);q=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ta.style.display="";qa.style.display="";fa.style.left="160px";X(0);fa.scrollTop=0;fa.innerText="";S=0;W!=Ga&&(Ga=W,sa=P,Da=V,ta.innerText="",p(),W=null)});U.push(q);n.appendChild(q);var Y=function(aa){ta.style.display="none";qa.style.display="none";fa.style.left="30px";X(aa?-1:1);null==W&&(W=Ga);fa.scrollTop=0;fa.innerText="";
K.spin(fa);var la=function(na,pa,ha){S=0;K.stop();Ga=na;ha=ha||{};var ka=0,ua;for(ua in ha)ka+=ha[ua].length;if(pa)fa.innerText=pa;else if(0==na.length&&0==ka)fa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(fa.innerText="",0<ka){ta.style.display="";fa.style.left="160px";ta.innerText="";Da=0;sa={"draw.io":na};for(ua in ha)sa[ua]=ha[ua];p()}else v(!0)};aa?I(Z.value,la):N(la)};N&&(q=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),n.appendChild(q),U.push(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 |
g;u.onerror=n;for(var v=0;v<t.length;v++)u.objectStore(t[v]).delete(d[v])}),n)};EditorUi.prototype.getDatabaseItem=function(d,g,n,t){this.openDatabase(mxUtils.bind(this,function(u){try{t=t||"objects";var v=u.transaction([t],"readonly").objectStore(t).get(d);v.onsuccess=function(){g(v.result)};v.onerror=n}catch(B){null!=n&&n(B)}}),n)};EditorUi.prototype.getDatabaseItems=function(d,g,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";var u=t.transaction([n],"readonly").objectStore(n).openCursor(IDBKeyRange.lowerBound(0)), | 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.isRemoteFileFormat(G,d.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,n):t.parseFileData(G,mxUtils.bind(this,function(T){4==T.readyState&&(200<=T.status&&299>=T.status?g(T.responseText):n())}),d.name):n()}):L||n()}},function(v){n(v)}):n()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u,null,null,null,n))};EditorUi.prototype.importFile=function(d,g,n,t,u,v,B,H,
L,G,T,p){G=null!=G?G:!0;var q=!1,C=null,J=mxUtils.bind(this,function(F){var O=null;null!=F&&"<mxlibrary"==F.substring(0,10)?this.loadLibrary(new LocalLibrary(this,F,B)):O=this.importXml(F,n,t,G,null,null!=p?mxEvent.isControlDown(p):null);null!=H&&H(O)});"image"==g.substring(0,5)?(L=!1,"image/png"==g.substring(0,9)&&(g=T?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(C=this.importXml(g,n,t,G,null,null!=p?mxEvent.isControlDown(p):null),L=!0)),L||(g=this.editor.graph,L=d.indexOf(";"),0<
L&&(d=d.substring(0,L)+d.substring(d.indexOf(",",L+1))),G&&g.isGridEnabled()&&(n=g.snap(n),t=g.snap(t)),C=[g.insertVertex(null,null,"",n,t,u,v,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(q=!0,this.importGraphML(d,J)):null!=L&&null!=B&&(/(\.v(dx|sdx?))($|\?)/i.test(B)||/(\.vs(x|sx?))($|\?)/i.test(B))?(q=!0,this.importVisio(L,J)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(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 |
d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,g,n){function t(L){return"simple"==L||0==g&&"sketch"==L}g=null!=g?g:150;var u=Editor.currentTheme,v=t(u)&&this.isDefaultTheme(d)||this.isDefaultTheme(u)&&t(d),B=v&&"sketch"!=d&&"sketch"!=u;if(v&&!this.themeSwitching){Editor.currentTheme=d;this.themeSwitching=!0;var H=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+g+"ms ease-in-out");0==g&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,
function(){this.editor.graph.stopEditing(!1);this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){t(u)&&this.isDefaultTheme(d)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="block",this.tabContainer.style.display="flex",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(u)&&t(d)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=
d?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="flex");this.switchTheme(d);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();this.restoreScrollState(H);this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",
null);delete this.themeSwitching;isLocalStorage&&t(d)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=n&&n()}),g)}),g)}),g)}),0)}return B};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var g=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-flex")}));mxEvent.addListener(d,"mouseleave", | 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;W<P.length;W++)P[W].parentNode.removeChild(P[W]);N(m);m.style.opacity="0.5"}else{P=K(q).replies;for(W=0;W<P.length;W++)v.removeChild(P[W]);for(W=0;W<C.length;W++)if(C[W]==q){C.splice(W,1);break}B.style.display=0==v.getElementsByTagName("div").length?"block":"none"}},function(W){z(m);b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));d||q.isLocked||0!=F||S(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(W){function P(){var V=
W.target;V.innerText="";q.isResolved=!q.isResolved;mxUtils.write(V,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=q.isResolved?"none":"",Y=K(q).replies,Z=Editor.isDarkMode()?"transparent":q.isResolved?"ghostWhite":"white",da=0;da<Y.length;da++){Y[da].style.backgroundColor=Z;for(var ba=Y[da].querySelectorAll(".geCommentAction"),ma=0;ma<ba.length;ma++)ba[ma]!=V.parentNode&&(ba[ma].style.display=X);G||(Y[da].style.display="none")}x()}q.isResolved?R(mxResources.get("reOpened")+ | 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.defaultFonts[F];"string"===typeof O?C(O):null!=O.fontFamily&&null!=O.fontUrl&&(J[encodeURIComponent(O.fontFamily)+"@"+encodeURIComponent(O.fontUrl)]=!0,C(O.fontFamily,O.fontUrl))}p.addSeparator(q);if("1"!=urlParams["ext-fonts"]){O=function(M){var Q=encodeURIComponent(M.name)+(null==M.url?"":"@"+encodeURIComponent(M.url));if(!J[Q]){for(var U=M.name,W=0;null!=K[U.toLowerCase()];)U=M.name+" ("+ ++W+")";null==S[Q]&&(R.push({name:M.name,url:M.url,label:U,title:M.url}),K[U.toLowerCase()]=M,S[Q]=M)}}; | 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 |
u,v,B){I.apply(this,arguments);N()};l.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);N()};l.connectionHandler.addListener(mxEvent.CONNECT,function(){N()})}var d=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=k.parentNode&&(l.destroy(),k.parentNode.removeChild(k));b.hideDialog()})});d.className="geBtn";b.editor.cancelFirst&&c.appendChild(d);var g=mxUtils.button(mxResources.get("insert"),function(n){l.clearCellOverlays(); | 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!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(H){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(H){}}catch(H){this.fileLoadedError=H;if(null!=d)try{d.close()}catch(L){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+H.message,label:"stack_"+H.stack})}catch(L){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||v():v()});g?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else v();return u};EditorUi.prototype.getHashValueForPages=function(d,g){var n=0,t=new mxGraphModel,u=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var v=0;v<d.length;v++){this.updatePageRoot(d[v]);var B=d[v].node.cloneNode(!1);B.removeAttribute("name");t.root=d[v].root; | 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(L.ownerEmail))}));this.showError(g,B,G,n,T,null,null,v,q,null,null,null,t?n:null)}else null!=n&&n()};EditorUi.prototype.alert=function(d,g,n){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,n||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,n,t,u,v){d=null!=d?d:"";var B=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},H=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 |
"ready";B.postMessage(v,"*");if("json"==urlParams.proto){var H=this.editor.graph.openLink;this.editor.graph.openLink=function(L,G,T){H.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",href:L,target:G,allowOpener:T}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,n,t){var u="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,v=document.createElement("button");v.setAttribute("title",d+(null!=n?" ("+n+")":""));v.style.marginLeft="6px"; | 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,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Y)}function da(){y(ma,ea,function(za){Z()},!0)}var ba=K().pdiv,ma=b.newComment(W,b.getCurrentUser());ma.pCommentId=q.id;null==q.replies&&(q.replies=[]);var ea=I(ma,q.replies,ba,F+1);P?da():Z()}if(O||!q.isResolved){B.style.display="none";var m=document.createElement("div");m.className="geCommentContainer";m.setAttribute("data-commentId",q.id);m.style.marginLeft=20*F+5+"px";q.isResolved&&!Editor.isDarkMode()&&(m.style.backgroundColor= | 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 g=Graph.prototype.init;Graph.prototype.init=function(){function m(U){A=U}g.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",
m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(U){A=null});this.isMouseInsertPoint=function(){return null!=A};var M=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):M.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var W=this.graph.getCellStyle(U);if(null!=W&&"rack"==W.childLayout){var P=new mxStackLayout(this.graph,!1);P.gridSize=null!=W.rackUnitSize?
parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;P.marginLeft=W.marginLeft||0;P.marginRight=W.marginRight||0;P.marginTop=W.marginTop||0;P.marginBottom=W.marginBottom||0;P.allowGaps=W.allowGaps||0;P.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");P.resizeParent=!1;P.fill=!0;return P}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var n=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,A){return Graph.processFontStyle(n.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 |
"260px";g.style.textAlign="center";g.style.fontSize="22px";g.style.color="#a0c3ff";mxUtils.write(g,mxResources.get("dragImagesHere"));f.appendChild(g);var n={},t=null,u=null,v=null;N=function(T){"true"!=mxEvent.getSource(T).getAttribute("contentEditable")&&null!=v&&(v(),v=null,mxEvent.consume(T))};mxEvent.addListener(d,"mousedown",N);mxEvent.addListener(d,"pointerdown",N);mxEvent.addListener(d,"touchstart",N);var B=new mxUrlConverter,H=!1;if(null!=c)for(N=0;N<c.length;N++)e=c[N],y(e.data,null,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 |
for(var U=Q.getElementsByTagName("a"),W=!1,P=0;P<U.length;P++)M=U[P].getAttribute("href"),null!=M&&"data:action/json,"==M.substring(0,17)&&(U[P].setAttribute("href",this.updateCustomLink(m,M)),W=!0);W&&this.labelChanged(A,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(m,A){if("data:action/json,"==A.substring(0,17))try{var M=JSON.parse(A.substring(17));null!=M.actions&&(this.updateCustomLinkActions(m,M.actions),A="data:action/json,"+JSON.stringify(M))}catch(Q){}return A};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 |
"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 g=Graph.prototype.init;Graph.prototype.init=function(){function m(U){A=U}g.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter", | 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 |
v.defaultLibraryName=mxResources.get("untitledLibrary");var H=document.createElement("div");H.className="geMenubarContainer";var L=null,G=new Menubar(v,H);v.statusContainer=v.createStatusContainer();v.statusContainer.style.position="relative";v.statusContainer.style.maxWidth="";v.statusContainer.style.color="gray";v.statusContainer.style.cursor="default";var T=v.hideCurrentMenu;v.hideCurrentMenu=function(){T.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var p=v.descriptorChanged; | 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 |
l)for(x=0;x<l.length;x++)l[x].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,k=this.guidesArrHor;if(null!=c){for(var l=0;l<c.length;l++)c[l].destroy();this.guidesArrVer=null}if(null!=k){for(l=0;l<k.length;l++)k[l].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function k(){var B=b.diagramContainer;N.style.top=B.offsetTop-E+"px";N.style.left=B.offsetLeft-E+"px";N.style.width=(f?0:B.offsetWidth)+E+"px";N.style.height=(f?B.offsetHeight:0)+E+"px"}function l(B,H,L){if(null!=x)return B;var G;return function(){var T=this,p=arguments,q=L&&!G;clearTimeout(G);G=setTimeout(function(){G=null;L||B.apply(T,p)},H);q&&B.apply(T,p)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, | 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!=K.lastCursor.pageId&&K.lastCursor.pageId!=m)K.cursor.style.display="none";else{m=function(){var P=Math.max(z.container.scrollLeft,Math.min(z.container.scrollLeft+z.container.clientWidth-K.cursor.clientWidth,Q)),V=Math.max(z.container.scrollTop-22,Math.min(z.container.scrollTop+z.container.clientHeight-K.cursor.clientHeight,U));W.style.opacity=P!=Q||V!=U?0:1;K.cursor.style.left=P+"px";K.cursor.style.top=V+"px";K.cursor.style.display=""};var A=z.view.translate,M=z.view.scale,Q=(A.x+K.lastCursor.x)* | 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);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(U){A=null});this.isMouseInsertPoint=function(){return null!=A};var M=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):M.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var W=this.graph.getCellStyle(U);if(null!=W&&"rack"==W.childLayout){var P=new mxStackLayout(this.graph,!1);P.gridSize=null!=W.rackUnitSize? | 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){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions))};Graph.prototype.executeCustomActions=function(m,A){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var M=!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 |
null,B,mxResources.get("cancel"),mxResources.get("discardChanges")):B()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var n in d)g.push(n);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function n(B){if(null!=
B){var H=B.lastIndexOf(".");0<H&&(B=B.substring(H+1,B.length));null==g[B]&&(g[B]=!0)}}var t=this.editor.graph,u=t.getCellStyle(d);n(mxStencilRegistry.getBasenameForStencil(u[mxConstants.STYLE_SHAPE]));t.model.isEdge(d)&&(n(mxMarker.getPackageForType(u[mxConstants.STYLE_STARTARROW])),n(mxMarker.getPackageForType(u[mxConstants.STYLE_ENDARROW])));u=t.model.getChildCount(d);for(var v=0;v<u;v++)this.addBasenamesForCell(t.model.getChildAt(d,v),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility= | 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 |
v=[];u.onsuccess=function(B){null==B.target.result?d(v):(v.push(B.target.result.value),B.target.result.continue())};u.onerror=g}catch(B){null!=g&&g(B)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";var u=t.transaction([n],"readonly").objectStore(n).getAllKeys();u.onsuccess=function(){d(u.result)};u.onerror=g}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,g){var n=this.getCurrentFile();null!=n?n.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,n){var t=this.getCurrentFile();null!=t?t.addComment(d,g,n):g(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 |
function(P){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(P):Editor.mathJaxQueue.push(P)};Editor.onMathJaxDone=function(){};var U=Editor.prototype.init;Editor.prototype.init=function(){U.apply(this,arguments);var P=mxUtils.bind(this,function(V,X){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,P);this.graph.addListener(mxEvent.REFRESH,P)};A=document.getElementsByTagName("script"); | 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 |
var BtnDialog=function(b,e,f,c){var k=document.createElement("div");k.style.textAlign="center";var l=document.createElement("p");l.style.fontSize="16pt";l.style.padding="0px";l.style.margin="0px";l.style.color="gray";mxUtils.write(l,mxResources.get("done"));var x="Unknown",y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.marginRight="10px";e==b.drive?(x=mxResources.get("googleDrive"),y.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
(x=mxResources.get("dropbox"),y.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(x=mxResources.get("oneDrive"),y.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(x=mxResources.get("github"),y.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(x=mxResources.get("gitlab"),y.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(x=mxResources.get("trello"),y.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));
f=mxUtils.button(f,c);f.insertBefore(y,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";k.appendChild(l);k.appendChild(b);k.appendChild(f);this.container=k},FontDialog=function(b,e,f,c,k){function l(B){this.style.border="";13==B.keyCode&&v.click()}var x=document.createElement("table"),y=document.createElement("tbody");x.style.marginTop="8px";var E=document.createElement("tr");var D=document.createElement("td");D.colSpan=2;D.style.whiteSpace= | 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 |
new Image;T.onload=function(){try{var p=T.width,q=T.height;if(0==p&&0==q){var C=L.result,J=C.indexOf(","),F=decodeURIComponent(escape(atob(C.substring(J+1)))),O=mxUtils.parseXml(F).getElementsByTagName("svg");0<O.length&&(p=parseFloat(O[0].getAttribute("width")),q=parseFloat(O[0].getAttribute("height")))}n(L.result,p,q)}catch(S){t(S)}};T.src=L.result};L.onerror=function(G){t(G)}}else t(H)};B.onerror=function(H){t(H)};B.send()};EditorUi.prototype.insertAsPreText=function(d,g,n){var t=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 |
preview:aa.getAttribute("preview"),clibs:ha,tags:aa.getAttribute("tags")};ka.push(ha);null!=na&&(ka=va[pa],null==ka&&(ka={},va[pa]=ka),pa=ka[na],null==pa&&(pa=[],ka[na]=pa),pa.push(ha))}aa=aa.nextSibling}K.stop();p()}})};C.appendChild(qa);C.appendChild(ta);C.appendChild(fa);var Ua=!1,ja=z;/^https?:\/\//.test(ja)&&!b.editor.isCorsEnabledForUrl(ja)&&(ja=PROXY_URL+"?url="+encodeURIComponent(ja));K.spin(fa);null!=t?t(function(aa,la){Ea=aa;V=Da=la;Va()},Va):Va();P=sa}mxEvent.addListener(O,"keypress",function(aa){b.dialog.container.firstChild== | 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 |
f?z=new mxHierarchicalLayout(l,mxConstants.DIRECTION_WEST):"circle"==f?z=new mxCircleLayout(l):(z=new mxFastOrganicLayout(l,!1),z.forceConstant=80);if(null!=z){var N=function(n,t){l.getModel().beginUpdate();try{null!=n&&n(),z.execute(l.getDefaultParent(),D)}catch(u){throw u;}finally{n=new mxMorphing(l),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=t&&t()})),n.startAnimation()}},I=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,t,
u,v,B){I.apply(this,arguments);N()};l.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);N()};l.connectionHandler.addListener(mxEvent.CONNECT,function(){N()})}var d=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=k.parentNode&&(l.destroy(),k.parentNode.removeChild(k));b.hideDialog()})});d.className="geBtn";b.editor.cancelFirst&&c.appendChild(d);var g=mxUtils.button(mxResources.get("insert"),function(n){l.clearCellOverlays(); | 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 |
J.translate(Math.floor((1-q.x)/C),Math.floor((1-q.y)/C));J.scale(1/C);var O=0,S=J.save;J.save=function(){O++;S.apply(this,arguments)};var K=J.restore;J.restore=function(){O--;K.apply(this,arguments)};var R=p.drawShape;p.drawShape=function(m){mxLog.debug("entering shape",m,O);R.apply(this,arguments);mxLog.debug("leaving shape",m,O)};p.drawState(k.getView().getState(k.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",O)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()? | 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?d:"",extras:JSON.stringify(u),scale:B,border:H,w:p&&isFinite(p)?p:null,h:q&&isFinite(q)?q:null}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var n=d.lastIndexOf("#");if(0<n){d=decodeURIComponent(d.substring(n+ | 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 |
f&&f();this.ui.fileLoaded(I)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,N,E)}))});null!=x?y(x):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(E){y(E)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/github2"; | 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(m){var A=rough.canvas({getContext:function(){return m}});A.draw=function(M){var Q=M.sets||[];M=M.options||this.getDefaultOptions();for(var U=0;U<Q.length;U++){var W=Q[U];switch(W.type){case "path":null!=M.stroke&&this._drawToContext(m,W,M);break;case "fillPath":this._drawToContext(m,W,M);break;case "fillSketch":this.fillSketch(m,W,M)}}};A.fillSketch=function(M,Q,U){var W=m.state.strokeColor,P=m.state.strokeWidth,V=m.state.strokeAlpha,X=m.state.dashed,Y=U.fillWeight; | 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(d){f(I.result,N)});k?I.readAsDataURL(N.fileBlob):I.readAsText(N.fileBlob)}catch(d){c(d)}}}));z["catch"](mxUtils.bind(this,function(N){window.clearTimeout(D);E&&(E=!1,null==N||500!=N.status&&400!=N.status&&401!=N.status?c({message:mxResources.get("error")+" "+N.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){l(!0)},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 |
v.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return n.checked?"blank"===v.value?"_blank":u:null},getEditInput:function(){return n},getEditSelect:function(){return v}}};EditorUi.prototype.addLinkSection=function(d,g){function n(){var H=document.createElement("div");H.style.width="100%";H.style.height="100%";H.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(H.style.border="1px solid black",H.style.backgroundColor=v):(H.style.backgroundPosition="center center",
H.style.backgroundRepeat="no-repeat",H.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(H)}mxUtils.write(d,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));t.appendChild(u);u=document.createElement("option");
u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("openInNewWindow"));t.appendChild(u);u=document.createElement("option");u.setAttribute("value","self");mxUtils.write(u,mxResources.get("openInThisWindow"));t.appendChild(u);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(g));d.appendChild(t);mxUtils.write(d,mxResources.get("borderColor")+":");var v="#0000ff",B=
null;B=mxUtils.button("",mxUtils.bind(this,function(H){this.pickColor(v||"none",function(L){v=L;n()});mxEvent.consume(H)}));n();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";d.appendChild(B);mxUtils.br(d);return{getColor:function(){return v},getTarget:function(){return t.value},focus:function(){t.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(D){return this.isTreeEdge(D)}))};Graph.prototype.getIncomingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,k){return this.getTreeEdges(c,k,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(F){return n.isVertex(F)&&l(F)}function k(F){var O=!1;null!=F&&(O="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 |
function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,v,B,null,1<u,L,d,n,t);v=this.isServices(u)?u>L?390:280:160;this.showDialog(g.container,420,v,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=function(d,g,n){var t=window.open("about:blank");null==t||null==t.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||n?(d=n?d:btoa(unescape(encodeURIComponent(d))),t.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+
d+'"/></html>')):t.document.write("<html>"+d+"</html>"):t.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),t.document.close())};var c=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog= | 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 |
return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var H=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,A,M,Q,U,W,P,V,X,Y,Z,da,ba,ma){var ea=null,za=null,Ba=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(ea=this.stylesheet,za=this.shapeForegroundColor, | 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(Y.target.result,mxUtils.bind(this,function(fa){this.resizeImage(fa,Y.target.result,mxUtils.bind(this,function(qa,ia,ya){U(P,mxUtils.bind(this,function(){if(null!=qa&&qa.length<G){var xa=J&&this.isResampleImageSize(V.size,T)?Math.min(1,Math.min(t/ia,t/ya)):1;return u(qa,V.type,g+P*m,n+P*m,Math.round(ia*xa),Math.round(ya*xa),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),J,t,T,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else 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 |
mxUtils.setOpacity(R,100),K.style.visibility="",m.stop(),O())}))}else O();G.appendChild(S);++T==N&&(mxUtils.br(G),T=0)}function v(q){var C=H.value;if(null==q||null!=C&&0<C.length)t&&b.hideDialog(),f(C,q,H)}z="1"==urlParams.noDevice?!1:z;x=null!=x?x:!0;y=null!=y?y:!0;N=null!=N?N:4;t=null!=t?t:!0;l=document.createElement("div");l.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(l);var B=document.createElement("h2");mxUtils.write(B,k||mxResources.get("create"));B.style.marginTop="0px";B.style.marginBottom= | 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 |
var da=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(K,U,L){return this.graph.isCellSelected(K)?!1:da.apply(this,arguments)};var ja=this.updateMouseEvent;this.updateMouseEvent=function(K){K=ja.apply(this,arguments);null!=K.state&&this.isCellLocked(this.getLayerForCell(K.getCell()))&&(K.state=null);return K};var ia=this.isCellSelectable;this.isCellSelectable=function(K){return ia.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(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 |
function(d,g,n,t,u){var v=document.createElement("div");v.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("image"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(u?"10":"4")+"px";v.appendChild(B);if(u){mxUtils.write(v,mxResources.get("zoom")+":");var H=document.createElement("input");H.setAttribute("type","text");H.style.marginRight="16px";H.style.width="60px";H.style.marginLeft="4px";H.style.marginRight="12px";H.value=this.lastExportZoom||
"100%";v.appendChild(H);mxUtils.write(v,mxResources.get("borderWidth")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.marginRight="16px";L.style.width="60px";L.style.marginLeft="4px";L.value=this.lastExportBorder||"0";v.appendChild(L);mxUtils.br(v)}var G=this.addCheckbox(v,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),T=t?null:this.addCheckbox(v,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);B=this.editor.graph;
var p=t?null:this.addCheckbox(v,mxResources.get("transparentBackground"),B.background==mxConstants.NONE||null==B.background);null!=p&&(p.style.marginBottom="16px");d=new CustomDialog(this,v,mxUtils.bind(this,function(){var q=parseInt(H.value)/100||1,C=parseInt(L.value)||0;n(!G.checked,null!=T?T.checked:!1,null!=p?p.checked:!1,q,C)}),null,d,g);this.showDialog(d.container,300,(u?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,n,t,u,v,B,H,L){B=null!=B?B:Editor.defaultIncludeDiagram; | 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 |
"cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}t&&b.setSelectionCells([J])}}for(J=0;J<k.length;J++)k[J].parentNode.removeChild(k[J]);c=null;k=[];x=[]}B(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(C,J){C=J.getProperty("eventName");J=J.getProperty("event");C==mxEvent.MOUSE_MOVE&&g&&(null!=J.sourceState&&J.sourceState.setCursor("crosshair"),J.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(C,J){if(b.isEnabled()&&
!b.isCellLocked(b.getDefaultParent())&&(C=J.getEvent(),g&&!mxEvent.isPopupTrigger(C)&&!mxEvent.isMultiTouchEvent(C))){var F=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);F=Math.max(1,F*b.view.scale);var O=G();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",v?O:"none");c.setAttribute("stroke",O);c.setAttribute("stroke-width",F);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(O=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",
O=O.split(" ").map(function(S){return parseFloat(S)*F}).join(" "),c.setAttribute("stroke-dasharray",O));d=[];C=T(C);p(C);l="M"+C.x+" "+C.y;x.push(C);y=[];c.setAttribute("d",v?PerfectFreehand.getSvgPathFromStroke([[C.x,C.y]],u):l);e.appendChild(c);J.consume()}}),mouseMove:mxUtils.bind(this,function(C,J){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){C=J.getEvent();C=T(C);p(C);var F=q(0);if(F)if(x.push(F),v){var O=[];for(F=0;F<x.length;F++)O.push([x[F].x,x[F].y]);y=[];for(var S=2;S<d.length;S+= | 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,M,Q){for(var U=0;U<Q;U++)m=Editor.crcTable[(m^A.charCodeAt(M+U))&255]^m>>>8;return m};Editor.crc32=function(m){for(var A=-1,M=0;M<m.length;M++)A=A>>>8^Editor.crcTable[(A^m.charCodeAt(M))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(m,A,M,Q,U){function W(Z,da){var ba=X;X+=da;return Z.substring(ba,X)}function P(Z){Z=W(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}
m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var X=0;if(W(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(W(m,4),"IHDR"!=W(m,4))null!=U&&U();else{W(m,17);U=m.substring(0,X);do{var Y=P(m);if("IDAT"==W(m,4)){U=m.substring(0,X-8);"pHYs"==A&&"dpi"==M?(M=Math.round(Q/.0254),M=V(M)+V(M)+String.fromCharCode(1)):M=M+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,A,0,4);Q=Editor.updateCRC(Q,
M,0,M.length);U+=V(M.length)+A+M+V(Q^4294967295);U+=m.substring(X-8,m.length);break}U+=m.substring(X-8,X-4+Y);W(m,Y);W(m,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,A){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var E=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 |
va,Ga=Fa+(Qa.x-Fa)/va-ba,Va=Ra+(Qa.y-Ra)/va-ba,Ua=new Image;Ua.onload=function(){try{for(var ja=-Math.round(Da-mxUtils.mod((Fa-Ga)*V,Da)),aa=-Math.round(Da-mxUtils.mod((Ra-Va)*V,Da));ja<ta;ja+=Da)for(var la=aa;la<Ka;la+=Da)oa.drawImage(Ua,ja/V,la/V);ya()}catch(na){null!=U&&U(na)}};Ua.onerror=function(ja){null!=U&&U(ja)};Ua.src=Ea}else ya()}catch(ja){null!=U&&U(ja)}});qa.onerror=function(ya){null!=U&&U(ya)};Y&&this.graph.addSvgShadow(fa);this.graph.mathEnabled&&this.addMathCss(fa);var ia=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 |
document.createElement("canvas");J.width=T;J.height=p;var F=J.toDataURL();C!==F&&(g=C,H=T,L=p)}}}catch(O){}n(g,H,L)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,n){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;g(t)};null!=n&&(t.onerror=n);t.src=d}catch(u){if(null!=n)n(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"== | 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=new mxAsyncCanvas(this.thumbImageCache);L.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(p,q){p.shape instanceof mxShape&&p.shape.checkBounds()&&(q.save(),q.translate(.5,.5),p.shape.paint(q),q.translate(-.5,-.5),q.restore())};T.drawText=function(p,q){};T.drawState(x.getView().getState(x.model.root),G);G.finish(mxUtils.bind(this,function(){try{T.drawState(x.getView().getState(x.model.root),L),x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(p){N= | 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 |
O?(O=g.getOutgoingTreeEdges(F),null!=O&&0<O.length&&g.setSelectionCell(g.model.getTerminal(O[0],!1))):(S=g.getIncomingTreeEdges(F),null!=S&&0<S.length&&(K=N(g.model.getTerminal(S[0],!0),K,F),F=g.view.getState(F),null!=F&&(F=mxUtils.indexOf(K,F),0<=F&&(F+=O==mxConstants.DIRECTION_NORTH||O==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=K.length-1&&g.setSelectionCell(K[F].cell)))))}var d=this,g=d.editor.graph,n=g.getModel(),t=d.menus.createPopupMenu;d.menus.createPopupMenu=function(F,O,S){t.apply(this,arguments);
if(1==g.getSelectionCount()){O=g.getSelectionCell();var K=g.getOutgoingTreeEdges(O);F.addSeparator();0<K.length&&(c(g.getSelectionCell())&&this.addMenuItems(F,["selectChildren"],null,S),this.addMenuItems(F,["selectDescendants"],null,S));c(g.getSelectionCell())?(F.addSeparator(),0<g.getIncomingTreeEdges(O).length&&this.addMenuItems(F,["selectSiblings","selectParent"],null,S)):0<g.model.getEdgeCount(O)&&this.addMenuItems(F,["selectConnections"],null,S)}};d.actions.addAction("selectChildren",function(F){if(g.isEnabled()&& | 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 |
l)for(x=0;x<l.length;x++)l[x].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,k=this.guidesArrHor;if(null!=c){for(var l=0;l<c.length;l++)c[l].destroy();this.guidesArrVer=null}if(null!=k){for(l=0;l<k.length;l++)k[l].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function k(){var B=b.diagramContainer;N.style.top=B.offsetTop-E+"px";N.style.left=B.offsetLeft-E+"px";N.style.width=(f?0:B.offsetWidth)+E+"px";N.style.height=(f?B.offsetHeight:0)+E+"px"}function l(B,H,L){if(null!=x)return B;var G;return function(){var T=this,p=arguments,q=L&&!G;clearTimeout(G);G=setTimeout(function(){G=null;L||B.apply(T,p)},H);q&&B.apply(T,p)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, | 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)this.editPlantUmlData(K,R,m);else if(m=this.graph.getAttributeForCell(K,"mermaidData"),null!=m)this.editMermaidData(K,R,m);else{var A=g.getCellStyle(K);"1"==mxUtils.getValue(A,"metaEdit","0")?d.showDataDialog(K):n.apply(this,arguments)}}catch(M){d.handleError(M)}};g.getLinkTitle=function(K){return d.getLinkTitle(K)};g.customLinkClicked=function(K){var R=!1;try{d.handleCustomLink(K),R=!0}catch(m){d.handleError(m)}return R};var t=g.parseBackgroundImage;g.parseBackgroundImage=function(K){var R=t.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 |
d.appendChild(f));D.appendChild(d);D.appendChild(g);this.container=D},FindWindow=function(b,e,f,c,k,l){function x(R,m,A,M){if("object"===typeof m.value&&null!=m.value.attributes){m=m.value.attributes;for(var Q=0;Q<m.length;Q++)if("label"!=m[Q].nodeName){var U=mxUtils.trim(m[Q].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==R&&(M&&0<=U.indexOf(A)||!M&&U.substring(0,A.length)===A)||null!=R&&R.test(U))return!0}}return!1}function y(){d?(O.removeAttribute("disabled"),S.removeAttribute("disabled")):
(O.setAttribute("disabled","disabled"),S.setAttribute("disabled","disabled"));H.value?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled")}function E(R,m,A){J.innerText="";var M=z.model.getDescendants(z.model.getRoot()),Q=H.value.toLowerCase(),U=G.checked?new RegExp(Q):null,W=null;n=null;N!=Q&&(N=Q,I=null,g=!1);var P=null==I;if(0<Q.length){if(g){g=!1;for(var V,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){V=X;break}R=(V+1)%b.pages.length;I=null;do g=!1,M=b.pages[R],z=b.createTemporaryGraph(z.getStylesheet()), | 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.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=A.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,A){try{var M=!0,Q=window.setTimeout(mxUtils.bind(this,function(){M=!1;A(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(m))mxUtils.get(m,
mxUtils.bind(this,function(W){window.clearTimeout(Q);M&&A(Editor.createSvgDataUri(W.getText()))}),function(){window.clearTimeout(Q);M&&A(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(Q);if(M)try{var W=document.createElement("canvas"),P=W.getContext("2d");W.height=U.height;W.width=U.width;P.drawImage(U,0,0);A(W.toDataURL())}catch(V){A(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(Q);
M&&A(Editor.svgBrokenImage.src)};U.src=m}}catch(W){A(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(m,A,M,Q){null==Q&&(Q=this.createImageUrlConverter());var U=0,W=M||{};M=mxUtils.bind(this,function(P,V){P=m.getElementsByTagName(P);for(var X=0;X<P.length;X++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=Q.convert(Y.getAttribute(V));if(null!=Z&&"data:"!=Z.substring(0,5)){var da=W[Z];null==da?(U++,this.convertImageToDataUri(Z,function(ba){null!=ba&&(W[Z]=ba,Y.setAttribute(V, | 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 |
(new mxXmlRequest(SAVE_URL,"format="+N+"&xml="+encodeURIComponent(D)+"&filename="+encodeURIComponent(b)+(l?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(D)}));y()}});l?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(D){E(D)}),c,this.ui.getCurrentFile()!=this?x:null,e.scale,e.border)):E(x)}; | 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,n);null!=g&&(t.style.backgroundImage="url("+g+")",t.style.backgroundPosition="center center",t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="100% 100%",t.style.width="24px",t.innerText="");return t};EditorUi.prototype.createToolbarButton=function(d,g,n,t){t=null!=t?t:24;var u=document.createElement("a");u.className="geToolbarButton geAdaptiveAsset";u.setAttribute("title",g);u.style.backgroundImage="url("+d+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";
u.style.backgroundSize="100% 100%";u.style.display="inline-block";u.style.cursor="pointer";u.style.marginLeft="6px";u.style.width=t+"px";u.style.height=t+"px";null!=n&&(mxEvent.addListener(u,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()})),mxEvent.addListener(u,"click",function(v){"disabled"!=u.getAttribute("disabled")&&n(v);mxEvent.consume(v)}));return u};EditorUi.prototype.createMenuItem=function(d,g,n){var t=this.actions.get(d),u=null!=t?t.funct: | 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:null),mxSettings.save();n();d(B)};null==t||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(v){u(v,!0)},function(v){u(v,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):u(!1,t)};EditorUi.prototype.parseFile=function(d,g,
n){n=null!=n?n:d.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,g,n)});t.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,n){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){g(t)};t.send("format=xml&filename="+encodeURIComponent(n)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(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 |
size:O.data.length,lastModified:Date.now(),type:O.isLib?"L":"F"},{title:O.title,data:O.data}],C,C,["filesInfo","files"])}catch(S){console.log(S)}});B=mxUtils.bind(this,function(O){try{if(O.source==H.contentWindow){var S={};try{S=JSON.parse(O.data)}catch(K){}"init"==S.event?(H.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),H.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=S.event||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 |
Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var A=mxUtils.indexOf(this.hiddenTags,m);0>A?this.hiddenTags.push(m):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var A=0;A<m.length;A++)if(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 |
var d=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(p){var q=d.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=q&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var C=this.get("appearance");if(null!=C){var J=q.addMenu("",C.funct);J.setAttribute("title",mxResources.get("appearance"));J.className="geToolbarButton geAdaptiveAsset";J.style.backgroundPosition="center center";J.style.backgroundRepeat="no-repeat";J.style.backgroundSize="100% 100%";
J.style.display="inline-block";J.style.cursor="pointer";J.style.zIndex="1";J.style.position="absolute";J.style.height="18px";J.style.width="18px";"atlas"==Editor.currentTheme?(J.style.filter="invert(100%)",J.style.right="11px",J.style.top="10px"):(J.style.right="10px",J.style.top="5px");document.body.appendChild(J);q.langIcon=J;C=mxUtils.bind(this,function(){var F=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;J.style.display="atlas"==Editor.currentTheme||"min"==
Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";J.style.backgroundImage="simple"==Editor.currentTheme?750>F?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",C);this.editorUi.addListener("darkModeChanged",C);mxEvent.addListener(window,"resize",C);C()}}return q}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout", | 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 |
na.join(" ")}null!=ja?(Q=ja,Q.className+=" "+aa,U=la,ia.className="geTempDlgCreateBtn"):(U=Q=null,ia.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function H(ja,aa){if(null!=U){var la=function(ua){ka.isExternal?E(ka,function(wa){na(wa,ua)},pa):ka.url?mxUtils.get(TEMPLATE_PATH+"/"+ka.url,mxUtils.bind(this,function(wa){200<=wa.getStatus()&&299>=wa.getStatus()?na(wa.getText(),ua):pa()})):na(b.emptyDiagramXml,ua)},na=function(ua,wa){g||b.hideDialog(!0);e(ua,wa,ka,aa)},pa=function(){n(mxResources.get("cannotLoad"));
ha()},ha=function(){U=ka;ia.className="geTempDlgCreateBtn";aa&&(ya.className="geTempDlgOpenBtn")},ka=U;U=null;"boolean"!==typeof aa&&(aa=ka.isExternal&&N);1==ja?D(ka.url,ka):aa?(ya.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",la()):(ia.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ja=new FilenameDialog(b,b.defaultFilename+".drawio",
mxResources.get("ok"),la,ja,function(ua){var wa=null!=ua&&0<ua.length;return wa&&g?(la(ua),!1):wa},null,null,null,ha,d?null:[]),b.showDialog(ja.container,350,80,!0,!0),ja.init())}}function L(ja){ia.innerText=mxResources.get(ba||ja?"create":"copy");ja=ja?"none":"";N&&(ya.style.display=ja);for(var aa=K.querySelectorAll(".geTempDlgLinkToDiagram"),la=0;la<aa.length;la++)aa[la].style.display=ja}function G(ja,aa,la,na,pa){pa||(ea.innerText="",B(),X=ja,Y=na);var ha=null;if(la){ha=document.createElement("table"); | 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,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var M=function(){Q=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var Q=null;Editor.doMathJaxRender=function(P){try{null==Q?(MathJax.typesetClear([P]),MathJax.typeset([P]),M()):Q!=P&&Editor.mathJaxQueue.push(P)}catch(V){MathJax.typesetClear([P]),null!=V.retry?(Q=P,V.retry.then(function(){MathJax.typesetPromise([P]).then(M)["catch"](function(X){console.log("Error in MathJax.typesetPromise: "+
X.toString());M()})})["catch"](function(X){console.log("Error in MathJax.retry: "+X.toString());M()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var P=0;P<Editor.mathJaxQueue.length;P++)Editor.doMathJaxRender(Editor.mathJaxQueue[P])}}};Editor.MathJaxRender= | 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.cell.id,K.text),S=!1);S||F++;O++});console.log("states checked",O,"invalid",F)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var p=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";p=new TextareaDialog(c,"Paste Data:",p,function(q){if(0<q.length)try{var C=function(K){function R(Y){if(null==X[Y]){if(X[Y]=!0,null!=M[Y]){for(;0<M[Y].length;){var Z=M[Y].pop();R(Z)}delete M[Y]}}else mxLog.debug(m+": Visited: "+Y)}var m=K.parentNode.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 |
"simple"==Editor.currentTheme&&this.addMenuItems(K,["zoomIn","zoomOut","-"],null,m);L.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(K,["-","addToScratchpad"],null,m);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(K,["-","exitGroup","home"],null,m)};var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(K,R,m){if(d.editor.graph.isSelectionEmpty())G.apply(this,arguments),d.menus.addMenuItems(K,["copyAsImage"],
null,m);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(K,R,m):this.addPopupMenuArrangeItems(K,R,m),this.addMenuItems(K,"- cut copy copyAsImage duplicate -".split(" "),null,m),this.isShowCellEditItems()||this.addPopupDeleteItem(K,R,m),this.addMenuItems(K,["lockUnlock","-"],null,m),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(R)&&g.isCellEditable(R)&&(this.addSubmenu("editCell",K,null,mxResources.get("edit")),K.addSeparator(),g.getModel().isEdge(R))){this.addSubmenu("line",
K);var A=g.getModel().getGeometry(R);null!=A&&null!=A.points&&0<A.points.length&&this.addMenuItems(K,["clearWaypoints"],null,m)}1==g.getSelectionCount()&&this.addMenuItems(K,["enterGroup"],null,m);A=d.getSelectionState();null!=A.mergeCell?this.addMenuItem(K,"mergeCells"):(1<A.style.colspan||1<A.style.rowspan)&&this.addMenuItem(K,"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 |
"hidden";ma.style.bottom="0px";ma.style.height="42px";ma.style.right="10px";ma.style.left="10px";P.isEnabled()&&(ma.appendChild(Z),ma.appendChild(da),X.appendChild(ma));return{div:X,refresh:ba}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var A in Graph.customFontElements){var M=Graph.customFontElements[A];m.push({name:M.name,url:M.url})}return m};Graph.prototype.setFont=function(m,A){Graph.addFont(m,A);document.execCommand("fontname",!1,m);if(null!=A){var M=
this.cellEditor.textarea.getElementsByTagName("font");A=Graph.getFontUrl(m,A);for(var Q=0;Q<M.length;Q++)M[Q].getAttribute("face")==m&&M[Q].getAttribute("data-font-src")!=A&&M[Q].setAttribute("data-font-src",A)}};var v=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return v.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=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 |
if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var M=mxUtils.parseXml(A).documentElement;return"mxfile"==M.nodeName||"mxGraphModel"==M.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(m,A,M){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled= | 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.indexOf(this.hiddenTags,m[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,A,M,Q){var U=[];if(null!=m){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var W=0,P={},V=0;V<m.length;V++)0<m[V].length&&(P[m[V]]=!0,W++);for(V=0;V<A.length;V++)if(M&&this.model.getParent(A[V])==this.model.root||this.model.isVertex(A[V])||this.model.isEdge(A[V])){var X=this.getTagsForCell(A[V]),Y=!1;if(0<X.length&&(X=X.split(" "),X.length>=m.length)){for(var Z=Y=0;Z<X.length&&Y<W;Z++)null!=
P[X[Z]]&&Y++;Y=Y==W}Y&&(1!=Q||this.isCellVisible(A[V]))&&U.push(A[V])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var A=null,M=[],Q=0;Q<m.length;Q++){var U=this.getTagsForCell(m[Q]);M=[];if(0<U.length){U=U.split(" ");for(var W={},P=0;P<U.length;P++)if(null==A||null!=A[U[P]])W[U[P]]=!0,M.push(U[P]);A=W}else return[]}return M};Graph.prototype.getTagsForCells=function(m){for(var 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 |
this.editor.graph.mathEnabled&&this.editor.addMathCss(O);var R=mxUtils.bind(this,function(m){v?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(m,K,this.thumbImageCache)):K(m)});q?this.embedFonts(O,R):(this.editor.addFontCss(O),R(O))}catch(m){this.handleError(m)}};EditorUi.prototype.addRadiobox=function(d,g,n,t,u,v,B){return this.addCheckbox(d,n,t,u,v,B,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,n,t,u,v,B,H){v=null!=v?v:!0;var L=document.createElement("input"); | 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 |
f,c,k,l,x,y,E,D){if(x.length>=this.maxFileSize)D({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(x.length)+" / 10 MB)"});else{var z="POST";c={path:encodeURIComponent(k),branch:decodeURIComponent(c),commit_message:l,content:x,encoding:"base64"};null!=y&&(c.last_commit_id=y,z="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(k);z=new mxXmlRequest(e,JSON.stringify(c),z);this.executeRequest(z,mxUtils.bind(this,function(N){E(N)}),
D)}};GitLabClient.prototype.saveFile=function(e,f,c,k,l){var x=e.meta.org,y=e.meta.repo,E=e.meta.ref,D=e.meta.path,z=mxUtils.bind(this,function(I,d){this.writeFile(x,y,E,D,l,d,I,mxUtils.bind(this,function(g){delete e.meta.isNew;this.getFile(x+"/"+y+"/"+E+"/"+D,mxUtils.bind(this,function(n){n.getData()==e.getData()?f(n.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),N=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(D)){var I=this.ui.getPngFileProperties(this.ui.fileNode); | 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 |
O);var X=mxUtils.bind(this,function(Y,Z,da){V.innerText="";mxUtils.write(V,Math.round(100*v.editor.graph.view.scale*(null!=da?da:1))+"%")});v.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);v.editor.addListener("resetGraphView",X);v.editor.addListener("pageSelected",X);v.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Y,Z){X(Y,Z,Z.getProperty("factor"))}))})(W);var P=v.setGraphEnabled;v.setGraphEnabled=function(){P.apply(this,arguments);null!=this.tabContainer&&(W.style.visibility=
this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(H);u.appendChild(v.diagramContainer);t.appendChild(u);v.updateTabContainer();!EditorUi.windowed&&1E3<=c&&b(this,!0);u.appendChild(v.tabContainer);n();mxEvent.addListener(window,"resize",function(){n();null!=v.sidebarWindow&&v.sidebarWindow.window.fit();null!=v.formatWindow&&v.formatWindow.window.fit();null!=v.actions.outlineWindow&& | 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 |
delete y[N];return x};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])}; | 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("ok"),la,ja,function(ua){var wa=null!=ua&&0<ua.length;return wa&&g?(la(ua),!1):wa},null,null,null,ha,d?null:[]),b.showDialog(ja.container,350,80,!0,!0),ja.init())}}function L(ja){ia.innerText=mxResources.get(ba||ja?"create":"copy");ja=ja?"none":"";N&&(ya.style.display=ja);for(var aa=K.querySelectorAll(".geTempDlgLinkToDiagram"),la=0;la<aa.length;la++)aa[la].style.display=ja}function G(ja,aa,la,na,pa){pa||(ea.innerText="",B(),X=ja,Y=na);var ha=null;if(la){ha=document.createElement("table"); | 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 |
V.fillStyle=P;return V};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var W=2;W<arguments.length;W+=2)this.lastX=arguments[W-1],this.lastY=arguments[W],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 |
function(H){B.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(H)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,n,t,u){this.isLocalFileSave()?this.saveLocalFile(n,d,t,u,g):this.saveRequest(d,g,mxUtils.bind(this,function(v,B){return this.createEchoRequest(n,
v,t,u,g,B)}),n,u,t)};EditorUi.prototype.saveRequest=function(d,g,n,t,u,v,B){B=null!=B?B:!mxClient.IS_IOS||!navigator.standalone;var H=this.getServiceCount(!1);isLocalStorage&&H++;var L=4>=H?2:6<H?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,T){if("_blank"==T||null!=G&&0<G.length){var p=n("_blank"==T?null:G,T==App.MODE_DEVICE||"download"==T||null==T||"_blank"==T?"0":"1");null!=p&&(T==App.MODE_DEVICE||"download"==T||"_blank"==T?p.simulate(document,"_blank"):this.pickFolder(T,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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.