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
"pHYs","dpi",q));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,k,q,p){var t="jpeg"==k?"jpg":k;q=this.getBaseFilename(q)+(null!=e?".drawio":"")+"."+t;c=this.createImageDataUri(c,e,k,p);this.saveData(q,t,c.substring(c.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!= document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,k,q,p,t){"text/xml"!=k||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));
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},ConnectionPointsDialog=function(b,f){function m(){null!=u&&u.destroy()}var d=document.createElement("div");d.style.userSelect="none";var u=null;this.init=function(){function v(E,A,N){E=new mxCell("",new mxGeometry(E,A,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");E.vertex=!0;E.cp=!0;E.constObj=N;return S.addCell(E)}function D(E){E=S.getSelectionCells();S.deleteCells(E)}function F(){var E=parseInt(T.value)||0;E=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
O));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",O);P.setAttribute("as","font");P.setAttribute("crossorigin","");y.parentNode.insertBefore(P,y)}}}};Editor.trimCssUrl=function(g){return g.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(g){g= null!=g?g:Editor.GUID_LENGTH;for(var y=[],H=0;H<g;H++)y.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return y.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",
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(L,U){L=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=L){var g=L.indexOf(",");if(0<g)for(L=L.substring(g+1),U=U.getProperty("patches"),g=0;g<U.length;g++)if(null!=U[g][EditorUi.DIFF_UPDATE]&&null!=U[g][EditorUi.DIFF_UPDATE][L]||null!=U[g][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(U[g][EditorUi.DIFF_REMOVE],L)){e.refreshBackgroundImage();break}}}));var t=e.getBackgroundImageObject;e.getBackgroundImageObject=function(L,U){var g=t.apply(this,arguments); if(null!=g&&null!=g.originalSrc)if(!U)g={src:g.originalSrc};else if(U&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var y=this.stylesheet,H=this.shapeForegroundColor,O=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";g=c.createImageForPageLink(g.originalSrc);this.shapeBackgroundColor=O;this.shapeForegroundColor=H;this.stylesheet=y}return g};this.isOffline()||"undefined"===typeof window.EditDataDialog||
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
46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var u=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(J){u.apply(this, arguments);null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var v=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){v.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var D=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(J,c){null!=c.shortcut&&900>d&&!mxClient.IS_IOS?J.firstChild.nextSibling.setAttribute("title",
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
"checked"):(J=parseInt(N[5]),x.value=J,q.setAttribute("checked","checked"),t.style.visibility="visible"):k.setAttribute("checked","checked")):m=null}else m=null}catch(P){}c.style=e+(m?m:u());c.vertex=!0;G.addCell(c,null,null,null,null);G.selectAll();G.addListener(mxEvent.CELLS_MOVED,B);G.addListener(mxEvent.CELLS_RESIZED,B);var y=G.graphHandler.mouseUp,H=G.graphHandler.mouseDown;G.graphHandler.mouseUp=function(){y.apply(this,arguments);M.style.backgroundColor="#fff9"};G.graphHandler.mouseDown=function(){H.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
Menus.prototype.init=function(){function m(l,n,z){this.ui=l;this.previousExtFonts=this.extFonts=n;this.prevCustomFonts=this.customFonts=z}f.apply(this,arguments);var d=this.editorUi,u=d.editor.graph,v=mxUtils.bind(u,u.isEnabled),D=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),F=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
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)+"px",B.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(B.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(B.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),B.innerHTML=I,C.appendChild(B),p.status=B),this.pause=mxUtils.bind(this,function(){var T=function(){};this.active&&(T=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxEvent.isAltDown(K.getEvent())?!1:null!=this.currentState&&K.getState()==this.currentState&&2E3<F||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&R.apply(this,arguments)};var S=this.isToggleEvent;this.isToggleEvent=function(K){return S.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K)};var Q=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(K){return Q.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(K.getEvent())||
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
W,(J.y*L+O.y)*W,X*W,L*W));for(ha=1;ha<J.height;ha++)U.push(new mxRectangle((J.x*X+O.x)*W,((J.y+ha)*L+O.y)*W,X*W,L*W));K=U.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,U){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this, arguments)};var z=this.graphHandler.getCells;this.graphHandler.getCells=function(K){for(var U=z.apply(this,arguments),L=new mxDictionary,O=[],X=0;X<U.length;X++){var W=this.graph.isTableCell(K)&&this.graph.isTableCell(U[X])&&this.graph.isCellSelected(U[X])?this.graph.model.getParent(U[X]):this.graph.isTableRow(K)&&this.graph.isTableRow(U[X])&&this.graph.isCellSelected(U[X])?U[X]:this.graph.getCompositeParent(U[X]);null==W||L.get(W)||(L.put(W,!0),O.push(W))}return O};var C=this.graphHandler.start;
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(l,n){var z=d.getCurrentFile();null==z||z.getMode()!=App.MODE_GOOGLE&&z.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(z.getTitle())||this.addMenuItems(l,["liveImage","-"],n);this.addMenuItems(l,["embedImage","embedSvg","-","embedHtml"],n);navigator.standalone||d.isOffline()||this.addMenuItems(l,["embedIframe"],n);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(l,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),n)})));d.addInsertItem=function(l,n,z, E){("plantUml"!=E||EditorUi.enablePlantUml&&!d.isOffline())&&l.addItem(z,null,mxUtils.bind(this,function(){if("fromText"==E||"formatSql"==E||"plantUml"==E||"mermaid"==E){var A=new ParseDialog(d,z,E);d.showDialog(A.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else A=new CreateGraphDialog(d,z,E),d.showDialog(A.container,620,420,!0,!1);A.init()}),n,null,v())};var x=function(l){u.getModel().beginUpdate();try{l=u.addCell(l),u.fireEvent(new mxEventObject("cellsInserted","cells",[l])),
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.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(x);t&&q.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(x);t&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:I});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c, e){var k=mxUtils.bind(this,function(B,T){var l={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=T?l.error={errResp:T}:null!=B&&(l.resp=B);this.remoteWin.postMessage(JSON.stringify(l),"*")});try{var q=c.funtionName,p=this.remoteInvokableFns[q];if(null!=p&&"function"===typeof this[q]){if(p.allowedDomains){for(var t=!1,x=0;x<p.allowedDomains.length;x++)if(e=="https://"+p.allowedDomains[x]){t=!0;break}if(!t){k(null,"Invalid Call: "+q+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)|| (C=[]);if(p.isAsync)C.push(function(){k(Array.prototype.slice.apply(arguments))}),C.push(function(B){k(null,B||"Unkown Error")}),this[q].apply(this,C);else{var I=this[q].apply(this,C);k([I])}}else k(null,"Invalid Call: "+q+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var q=k.open("database",2);q.onupgradeneeded=
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?4E3:3E4);B=!0}return B};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,k,q){c=c.toDataURL("image/"+k);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<q&&(c=Editor.writeGraphModelToPng(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
A.readAsText(E)}else this.doImportVisio(E,e,C,q)}catch(N){C(N)}else try{""==z.responseType||"text"==z.responseType?C({message:z.responseText}):(A=new FileReader,A.onload=function(){try{C({message:JSON.parse(A.result).Message})}catch(N){C(N)}},A.readAsText(z.response))}catch(N){C({})}});z.send(B)}else if(x.clear())try{this.doImportVisio(c,e,C,q)}catch(E){C(E)}}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?I():(this.loadingExtensions=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.diagramContainer.scrollLeft+=c.x-e.x;this.diagramContainer.scrollTop+=c.x-e.x};EditorUi.prototype.setDarkMode=function(c){this.doSetDarkMode(c,mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("darkModeChanged"))}),mxUtils.bind(this,function(e){null!=window.console&&console.error(e);this.editor.setStatus(e.message)}))};EditorUi.prototype.createDarkStyle=function(){var c=document.createElement("link");c.setAttribute("rel","stylesheet");c.setAttribute("href",STYLE_PATH+"/dark.css"); c.setAttribute("charset","UTF-8");c.setAttribute("type","text/css");return c};EditorUi.prototype.doSetDarkMode=function(c,e,k){var q=mxUtils.bind(this,function(){if(Editor.darkMode!=c){var t=this.editor.graph;Editor.darkMode=c;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";t.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;t.view.gridColor=t.view.defaultGridColor;t.defaultPageBackgroundColor="1"==urlParams.embedInline?
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
else if("svg"==k)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(I.getSvg(q,p,t)),"image/svg+xml");else{var B=c.getFileData(!0,null,null,null,null,!0),T=I.getGraphBounds(),l=Math.floor(T.width*p/I.view.scale),n=Math.floor(T.height*p/I.view.scale);if(B.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.isExportToCanvas()){var z={globalVars:I.getExportVariables()};C&&(z.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});c.saveRequest(e,k,function(E, A){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(A||"0")+(null!=E?"&filename="+encodeURIComponent(E):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<x?"&dpi="+x:"")+"&bg="+(null!=q?q:"none")+"&w="+l+"&h="+n+"&border="+t+"&xml="+encodeURIComponent(B))})}else"png"==k?c.exportImage(p,null==q||"none"==q,!0,!1,!1,t,!0,!1,null,C,x):c.exportImage(p,!1,!0,!1,!1,t,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"transform-origin",null);0==p&&q()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var K=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var c=this.formatWindow;return null!=c?c.window.isVisible():K.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(c){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){c=null!=c?c:!0;if("1"!=urlParams.embedInline){var e=
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")};ja.push(ha);null!=ma&&(ja=va[oa],null==ja&&(ja={},va[oa]=ja),oa=ja[ma],null==oa&&(oa=[],ja[ma]=oa),oa.push(ha))}aa=aa.nextSibling}L.stop();l()}})};z.appendChild(qa);z.appendChild(wa);z.appendChild(ca);var Ua=!1,ia=G;/^https?:\/\//.test(ia)&&!b.editor.isCorsEnabledForUrl(ia)&&(ia=PROXY_URL+"?url="+encodeURIComponent(ia));L.spin(ca);null!=q?q(function(aa,la){Ea=aa;W=Da=la;Va()},Va):Va();R=ua}mxEvent.addListener(N,"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
Editor.prototype.addFontCss=function(g,y){y=null!=y?y:this.absoluteCssFonts(this.fontCss);if(null!=y){var H=g.getElementsByTagName("defs"),O=g.ownerDocument;0==H.length?(H=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=g.firstChild?g.insertBefore(H,g.firstChild):g.appendChild(H)):H=H[0];g=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"style"):O.createElement("style");g.setAttribute("type","text/css");mxUtils.setTextContent(g,y);H.appendChild(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
EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,k,q,p,t,x){p=null!=p?p:this.maxImageSize;var C=Math.max(1,c.width),I=Math.max(1,c.height);if(q&&this.isResampleImageSize(null!=x?x:e.length,t))try{var B=Math.max(C/p,I/p);if(1<B){var T=Math.round(C/B),l=Math.round(I/B),n=document.createElement("canvas");n.width=T;n.height=l;n.getContext("2d").drawImage(c,0,0,T,l);var z=n.toDataURL();if(z.length<e.length){var E= document.createElement("canvas");E.width=T;E.height=l;var A=E.toDataURL();z!==A&&(e=z,C=T,I=l)}}}catch(N){}k(e,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,k){try{var q=new Image;q.onload=function(){q.width=0<q.width?q.width:120;q.height=0<q.height?q.height:120;e(q)};null!=k&&(q.onerror=k);q.src=c}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),m=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),u=parseFloat(b.getAttribute("pageHeight")),v=b.getAttribute("background"),D=this.parseBackgroundImage(b.getAttribute("backgroundImage")),F=b.getAttribute("extFonts");if(F)try{F=F.split("|").map(function(K){K=K.split("^");return{name:K[0],url:K[1]}})}catch(K){console.log("ExtFonts format error: "+K.message)}return{gridEnabled:"0"!=b.getAttribute("grid"), gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=v&&0<v.length?v:null,backgroundImage:D,pageScale:isNaN(m)?mxGraph.prototype.pageScale:m,pageFormat:isNaN(d)||isNaN(u)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat: mxSettings.getPageFormat():new mxRectangle(0,0,d,u),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts: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
function(){d.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired"))}catch(E){d.handleError(E)}})}]];if(!d.isOfflineApp()&&isLocalStorage&&d.mode!=App.MODE_ATLAS){var z=d.actions.get("plugins");null==z||"sketch"!=Editor.currentTheme&&"simple"!=Editor.currentTheme&&"min"!=Editor.currentTheme||n.push([mxResources.get("plugins"),z.funct])}EditorUi.isElectronApp||n.push([mxResources.get("link"),
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",[E])),b.fireEvent(new mxEventObject("freehandInserted","cell",E))}finally{b.model.endUpdate()}q&&b.setSelectionCells([E])}}for(E=0;E<u.length;E++)u[E].parentNode.removeChild(u[E]);d=null;u=[];D=[]}x(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(z,E){z=E.getProperty("eventName");E=E.getProperty("event");z==mxEvent.MOUSE_MOVE&&e&&(null!=E.sourceState&&E.sourceState.setCursor("crosshair"),E.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(z,E){if(b.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
mxUtils.bind(this,function(P){this.spinner.stop();y(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(P))})))}else z=n+".svg",g=this.getFileData(!1,!0,null,mxUtils.bind(this,function(P){this.spinner.stop();y(P)}),q)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(c,e,k,q,p,t,x,C,I,B,T,l,n){c=this.downloadRequestBuilder(c,e,k,q,p,t,x,C,I,B,T,l,n);e="";for(var z in c)k=c[z],null!=k&&(e+=z+"="+encodeURIComponent(k)+"&");return new mxXmlRequest(EXPORT_URL, e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,k,q,p,t,x,C,I,B,T,l,n){var z=this.editor.graph,E=z.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var A=null,N=null,Q=null;if(E.width*E.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};B=B?"1":"0";"pdf"==e&&(null!=T?(A=T.from,N=T.to):0==t&&(Q="1"));"xmlpng"==e&&(B="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.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
[E],"{1} ago"));z.setAttribute("title",n.toLocaleDateString()+" "+n.toLocaleTimeString())}function M(n){var z=document.createElement("img");z.className="geCommentBusyImg";z.src=IMAGE_PATH+"/spin.gif";n.appendChild(z);n.busyImg=z}function G(n){n.style.border="1px solid red";n.removeChild(n.busyImg)}function S(n){n.style.border="";n.removeChild(n.busyImg)}function J(n,z,E,A,N){function Q(V,R,W){var X=document.createElement("li");X.className="geCommentAction";var Z=document.createElement("a");Z.className=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
c;this.editor.updateGraphComponents();this.editor.graph.refresh();this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()|| !navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,k){var q=null==c||null==e;k=null!=k?k:24;var p=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=p.spin;p.spin=function(C,I){var 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
function(){var c=document.createElement("div");c.className="geButtonContainer";c.style.overflow="1"==urlParams.embed?"hidden":"";return c};EditorUi.prototype.openLink=function(c,e,k){return this.editor.graph.openLink(c,e,k)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,k){localStorage.setItem(c,e);null!=k&&k()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(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
"geBtn gePrimaryBtn";var g=document.createElement("img");g.setAttribute("src",Sidebar.prototype.searchImage);g.setAttribute("title",mxResources.get("preview"));g.className="geActiveButton";g.style.position="absolute";g.style.cursor="default";g.style.padding="8px";g.style.right="0px";g.style.top="0px";var y=!1,H=null,O=!1;if(S||J){var P=[],V=null,R=null,W=null,X=function(aa){U.setAttribute("disabled","disabled");for(var la=0;la<P.length;la++)P[la].className=la==aa?"geBtn gePrimaryBtn":"geBtn"};E=!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
"center";m=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&F.appendChild(m);ImageDialog.filePicked=function(x){x.action==google.picker.Action.PICKED&&null!=x.docs[0].thumbnails&&(x=x.docs[0].thumbnails[x.docs[0].thumbnails.length-1],null!=x&&(S.value=x.url));S.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var p=document.createElement("input");p.setAttribute("multiple","multiple");p.setAttribute("type",
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(fa){this.cachedFonts[X]=fa;O--;P()}),mxUtils.bind(this,function(fa){O--;P()}),!0,null,"data:"+Y+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(H[g].substring(0,V)),R)}P()}else y(g)};Editor.prototype.loadFonts=function(g){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(y){this.resolvedFontCss=y;null!=g&&g()})):null!=g&&g()};Editor.prototype.createGoogleFontCache=function(){var g={},y;for(y in Graph.fontMapping)Graph.isCssFontUrl(y)&& (g[y]=Graph.fontMapping[y]);return g};Editor.prototype.embedExtFonts=function(g){var y=this.graph.getCustomFonts();if(0<y.length){var H=[],O=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==O&&this.embedCssFonts(H.join(""),g)}),V=0;V<y.length;V++)mxUtils.bind(this,function(R,W){Graph.isCssFontUrl(W)?null==this.cachedGoogleFonts[W]?(O++,this.loadUrl(W,mxUtils.bind(this,function(X){this.cachedGoogleFonts[W]=X;H.push(X+"\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
parseInt(ea.value))))}function O(Ta){function Ia(ya,Ja,Ma,ra){var Fa=ya.useCssTransforms,Ka=ya.currentTranslate,Xa=ya.currentScale,Pa=ya.view.translate,Ra=ya.view.scale;ya.useCssTransforms&&(ya.useCssTransforms=!1,ya.currentTranslate=new mxPoint(0,0),ya.currentScale=1,ya.view.translate=new mxPoint(0,0),ya.view.scale=1);var Oa=ya.getGraphBounds(),Na=0,Ya=0,Wa=Ea.get(),ab=1/ya.pageScale,$a=Ba.checked;if($a){ab=parseInt(ua.value);var gb=parseInt(va.value);ab=Math.min(Wa.height*gb/(Oa.height/ya.view.scale), Wa.width*ab/(Oa.width/ya.view.scale))}else ab=parseInt(Ca.value)/(100*ya.pageScale),isNaN(ab)&&(Sa=1/ya.pageScale,Ca.value="100 %");Wa=mxRectangle.fromRectangle(Wa);Wa.width=Math.ceil(Wa.width*Sa);Wa.height=Math.ceil(Wa.height*Sa);ab*=Sa;!$a&&ya.pageVisible?(Oa=ya.getPageLayout(),Na-=Oa.x*Wa.width,Ya-=Oa.y*Wa.height):$a=!0;ra=null!=ra?"page/id,"+ra:null;if(null==Ja){Ja=PrintDialog.createPrintPreview(ya,ab,Wa,0,Na,Ya,$a);Ja.pageSelector=!1;Ja.mathEnabled=!1;na.checked&&(Ja.isCellVisible=function(Za){return ya.isCellSelected(Za)});
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
(ja?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");L.querySelector("."+aa).src="/images/"+la+"-sel.svg";L.querySelector("."+oa).src="/images/"+ha+".svg";return!0}function t(ia,aa,la,ma){function oa(ta,La){null==ja?(ta=/^https?:\/\//.test(ta)&&!b.editor.isCorsEnabledForUrl(ta)?PROXY_URL+"?url="+encodeURIComponent(ta):TEMPLATE_PATH+"/"+ta,mxUtils.get(ta,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(ja=Ga.getText());La(ja)}))):La(ja)}function ha(ta,La,Ga){if(null!=ta&&
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.getPageLayout(a.getBoundingBoxFromGeometry(a.model.getCells(),!0),aa,1),J=a.getDefaultTranslate(W);this.x0=W.x;this.y0=W.y;a.setScrollbarPositions(e.currentPage.viewState,J.x,J.y);if(J.x!=this.translate.x||J.y!=this.translate.y){this.setTranslate(J.x,J.y);return}}W=a.getPagePadding();J=a.getPageSize();this.translate.x=W.x-(this.x0||0)*J.width;this.translate.y=W.y-(this.y0||0)*J.height}V.apply(this,arguments)};if(!a.isViewer()){var da=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&& mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var W=this.getPageLayout(),J=this.getDefaultTranslate(W),ha=this.view.translate.x,oa=this.view.translate.y;if(J.x!=ha||J.y!=oa){this.view.x0=W.x;this.view.y0=W.y;this.autoTranslate=!0;this.view.setTranslate(J.x,J.y);this.container.scrollLeft+=Math.round((J.x-ha)*this.view.scale);this.container.scrollTop+=Math.round((J.y-oa)*this.view.scale);this.autoTranslate=!1;return}}da.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE, "bounds",this.getGraphBounds()))}}}var ja=a.view.getBackgroundPane(),ia=a.view.getDrawPane();a.cumulativeZoomFactor=1;var qa=null,K=null,U=null,L=null,O=null,X=function(W){null!=qa&&window.clearTimeout(qa);0<=W&&window.setTimeout(function(){if(!a.isMouseDown||L)qa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
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
"-rev_"+this.ui.hashValue(F):"")+(null!=p?"-latest_"+p:"")+(null!=k?"-latestRev_"+this.ui.hashValue(k.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+J,action:u,label:"user_"+S+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+c+"-patches_"+f.length+"-size_"+this.getSize()})}catch(t){}}),b)}}catch(k){}};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
x);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(J.value=A.url,x()));J.focus()};F.appendChild(S);F.appendChild(c);mxUtils.br(F);mxUtils.br(F);M?(S.setAttribute("checked","checked"),S.checked=!0):(G.setAttribute("checked","checked"),G.checked=!0);!K&&S.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),
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!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(C){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(C){}}catch(C){this.fileLoadedError=C;if(null!=c)try{c.close()}catch(I){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+C.message,label:"stack_"+C.stack})}catch(I){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body, mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=q?this.fileLoaded(q)||t():t()});e?c():this.handleError(C,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else t();return p};EditorUi.prototype.getHashValueForPages=function(c,e){var k=0,q=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var x=c[t].node.cloneNode(!1);x.removeAttribute("name");q.root=c[t].root;
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(c,e,k,q,p){this.openDatabase(mxUtils.bind(this,function(t){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c],e=[e]);var x=t.transaction(p,"readwrite");x.oncomplete=k;x.onerror=q;for(t=0;t<p.length;t++)x.objectStore(p[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(C){null!=q&&q(C)}}),q)};EditorUi.prototype.removeDatabaseItem=function(c,e,k,q){this.openDatabase(mxUtils.bind(this,function(p){q=q||"objects";Array.isArray(q)||(q=[q],c=[c]);p=p.transaction(q,"readwrite");p.oncomplete= e;p.onerror=k;for(var t=0;t<q.length;t++)p.objectStore(q[t]).delete(c[t])}),k)};EditorUi.prototype.getDatabaseItem=function(c,e,k,q){this.openDatabase(mxUtils.bind(this,function(p){try{q=q||"objects";var t=p.transaction([q],"readonly").objectStore(q).get(c);t.onsuccess=function(){e(t.result)};t.onerror=k}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.getDatabaseItems=function(c,e,k){this.openDatabase(mxUtils.bind(this,function(q){try{k=k||"objects";var p=q.transaction([k],"readonly").objectStore(k).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
function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var k=this.getCurrentFile();return null!=k?k.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
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.baseUrl||H.crossOriginImages&&H.isCorsEnabledForUrl(O)?"chrome-extension://"==O.substring(0,19)||mxClient.IS_CHROMEAPP||(O=y.apply(this,arguments)):O=PROXY_URL+"?url="+encodeURIComponent(O)}return O};return g};Editor.createSvgDataUri=function(g){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(g)))};Editor.prototype.convertImageToDataUri=function(g,y){try{var H=!0,O=window.setTimeout(mxUtils.bind(this,function(){H=!1;y(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(g))mxUtils.get(g, mxUtils.bind(this,function(V){window.clearTimeout(O);H&&y(Editor.createSvgDataUri(V.getText()))}),function(){window.clearTimeout(O);H&&y(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(O);if(H)try{var V=document.createElement("canvas"),R=V.getContext("2d");V.height=P.height;V.width=P.width;R.drawImage(P,0,0);y(V.toDataURL())}catch(W){y(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(O); H&&y(Editor.svgBrokenImage.src)};P.src=g}}catch(V){y(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(g,y,H,O){null==O&&(O=this.createImageUrlConverter());var P=0,V=H||{};H=mxUtils.bind(this,function(R,W){R=g.getElementsByTagName(R);for(var X=0;X<R.length;X++)mxUtils.bind(this,function(Z){try{if(null!=Z){var Y=O.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ea=V[Y];null==ea?(P++,this.convertImageToDataUri(Y,function(fa){null!=fa&&(V[Y]=fa,Z.setAttribute(W,
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(z){G=z};this.setAutoScroll=function(z){S=z};this.setOpenFill=function(z){J=z};this.setStopClickEnabled=function(z){k=z};this.setSelectInserted=function(z){q=z};this.setSmoothing=function(z){m=z};this.setPerfectFreehandMode=function(z){t=z};this.isPerfectFreehandMode=function(){return t};this.setBrushSize=function(z){p.size=z};this.getBrushSize=function(){return p.size};var x=function(z){e=z;b.getRubberband().setEnabled(!z);b.graphHandler.setSelectEnabled(!z);b.graphHandler.setMoveEnabled(!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
null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(C){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(C){}}catch(C){this.fileLoadedError=C;if(null!=c)try{c.close()}catch(I){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+C.message,label:"stack_"+C.stack})}catch(I){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body, mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=q?this.fileLoaded(q)||t():t()});e?c():this.handleError(C,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else t();return p};EditorUi.prototype.getHashValueForPages=function(c,e){var k=0,q=new mxGraphModel,p=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var x=c[t].node.cloneNode(!1);x.removeAttribute("name");q.root=c[t].root;
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.setCellStyles(mxConstants.STYLE_ROTATION,Number(p.value),[f[x]])}}finally{m.getModel().endUpdate()}});t.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(x){13==x.keyCode&&t.click()});v=document.createElement("div");v.style.marginTop="20px";v.style.textAlign="right";b.editor.cancelFirst?(v.appendChild(d),v.appendChild(t)):(v.appendChild(t),v.appendChild(d));u.appendChild(v);this.container=u},LibraryDialog=function(b,f,m,d,u,v){function D(T){for(T=document.elementFromPoint(T.clientX, T.clientY);null!=T&&T.parentNode!=c;)T=T.parentNode;var l=null;if(null!=T){var n=c.firstChild;for(l=0;null!=n&&n!=T;)n=n.nextSibling,l++}return l}function F(T,l,n,z,E,A,N,Q,L){try{if(b.spinner.stop(),null==l||"image/"==l.substring(0,6))if(null==T&&null!=N||null==k[T]){var U=function(){W.innerText="";W.style.cursor="pointer";W.style.whiteSpace="nowrap";W.style.textOverflow="ellipsis";mxUtils.write(W,null!=X.title&&0<X.title.length?X.title:mxResources.get("untitled"));W.style.color=null==X.title||0==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(A){if(e.isEnabled()&&1==e.getSelectionCount()){var N=e.getSelectionCell(),Q=mxEvent.isControlDown(A)?null:e.getIncomingTreeEdges(N);A=[];if(null!=Q&&0<Q.length&&(Q=e.getOutgoingTreeEdges(e.model.getTerminal(Q[0],!0)),null!=Q))for(var L=0;L<Q.length;L++)A.push(e.model.getTerminal(Q[L],!1));0==A.length&&(A=e.model.getChildren(e.model.getParent(N)));e.setSelectionCells(A)}},null,null,"Alt+Shift+S");var p=e.removeCells;e.removeCells=function(A,N){N=null!=N?N:!0;null==A&&(A=this.getDeletableCells(this.getSelectionCells())); N&&(A=this.getDeletableCells(this.addAllEdges(A)));for(var Q=[],L=0;L<A.length;L++){var U=A[L];k.isEdge(U)&&v(U)&&(Q.push(U),U=k.getTerminal(U,!1));if(d(U)){var g=[];e.traverse(U,!0,function(y,H){var O=null!=H&&e.isTreeEdge(H);O&&g.push(H);(null==H||O)&&g.push(y);return null==H||O});0<g.length&&(Q=Q.concat(g),U=e.getIncomingTreeEdges(A[L]),A=A.concat(U))}else null!=U&&Q.push(A[L])}A=Q;return p.apply(this,arguments)};c.hoverIcons.getStateAt=function(A,N,Q){return d(A.cell)?null:this.graph.view.getState(this.graph.getCellAt(N,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
""),mxUtils.bind(this,function(e){window.clearTimeout(c);J&&(200<=e.getStatus()&&299>=e.getStatus()?null!=m&&m():d({message:mxResources.get("realtimeCollaboration")+(0!=e.getStatus()?": "+e.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",M,S.length,"bytes","from",F,"to",K,"etag",this.file.getCurrentEtag(),"checksum",G)}}this.file.setShadowPages(b);this.scheduleCleanup()};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
e.getCurrentCellStyle(A).treeMoving);return N}function v(A){var N=!1;null!=A&&(A=k.getParent(A),N=e.view.getState(A),N="tree"==(null!=N?N.style:e.getCellStyle(A)).containerType);return N}function D(A){var N=!1;null!=A&&(A=k.getParent(A),N=e.view.getState(A),e.view.getState(A),N=null!=(null!=N?N.style:e.getCellStyle(A)).childLayout);return N}function F(A){A=e.view.getState(A);if(null!=A){var N=e.getIncomingTreeEdges(A.cell);if(0<N.length&&(N=e.view.getState(N[0]),null!=N&&(N=N.absolutePoints,null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
O(!1)}),da.className="geBtn",y.appendChild(da));da=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){g.hideDialog();O(!0)});da.className="geBtn gePrimaryBtn";y.appendChild(da);g.editor.cancelFirst||y.appendChild(R);V.appendChild(y);this.container=V};var Q=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background= this.color);if(!this.ignoreImage){var g=this.image;null!=g&&null!=g.src&&Graph.isPageLink(g.src)&&(g={originalSrc:g.src});this.page.viewState.backgroundImage=g}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Q.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled), this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var L=document.createElement("canvas"),U=new Image;U.onload=function(){try{L.getContext("2d").drawImage(U,0,0);var g=L.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=g&&6<g.length}catch(y){}};U.src="data:image/svg+xml;base64,"+
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.container.scrollTop=0,this.chromelessResize()));f||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",u))}}catch(D){this.handleError(D)}};EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
App.prototype.fileCreated=function(b,f,m,d,u,v){var D=window.location.pathname;null!=f&&0<f.length&&(D+="?libs="+f);null!=u&&0<u.length&&(D+="?clibs="+u);D=this.getUrl(D);b.getMode()!=App.MODE_DEVICE&&(D+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var F=b.getData();F=0<F.length?this.editor.extractGraphModel(mxUtils.parseXml(F).documentElement,!0):null;var K=window.location.protocol+"//"+window.location.hostname+D,M=F,G=null;null!=F&&/\.svg$/i.test(b.getTitle())&& (G=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(G.container),M=this.decodeNodeIntoGraph(M,G));b.setData(this.createFileData(F,G,b,K));null!=G&&G.container.parentNode.removeChild(G.container);var S=mxUtils.bind(this,function(){this.spinner.stop()}),J=mxUtils.bind(this,function(){S();var c=this.getCurrentFile();null==m&&null!=c&&(m=!c.isModified()&&null==c.getMode());var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,v);m&&b.addAllSavedStatus(); null!=f&&this.sidebar.showEntries(f);if(null!=u){for(var q=[],p=u.split(";"),t=0;t<p.length;t++)q.push(decodeURIComponent(p[t]));this.loadLibraries(q)}}),k=mxUtils.bind(this,function(){m||null==c||!c.isModified()?e():this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==m||m?k():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(), null==b.getMode())),null!=d&&d(),window.openWindow(D,null,k))});b.constructor==LocalFile?J():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){J()}),mxUtils.bind(this,function(c){S();null!=c&&"AbortError"==c.name||this.handleError(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
document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,k,q,p,t){"text/xml"!=k||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));
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[X[Y]]&&Z++;Z=Z==V}Z&&(1!=O||this.isCellVisible(y[W]))&&P.push(y[W])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(g){for(var y=null,H=[],O=0;O<g.length;O++){var P=this.getTagsForCell(g[O]);H=[];if(0<P.length){P=P.split(" ");for(var V={},R=0;R<P.length;R++)if(null==y||null!=y[P[R]])V[P[R]]=!0,H.push(P[R]);y=V}else return[]}return H};Graph.prototype.getTagsForCells=function(g){for(var y=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
A):l.y+l.height>A+z&&(l.height=A+z-l.y,l.y=Math.min(l.y,A+z));var N=(l.x-E)/n*100;n=100-(l.x+l.width-E)/n*100;E=(l.y-A)/z*100;l=100-(l.y+l.height-A)/z*100;return"inset("+mxUtils.format(E)+"% "+mxUtils.format(n)+"% "+mxUtils.format(l)+"% "+mxUtils.format(N)+"%"+(B?" round "+J+"%":T?" round 50%":"")+")"}function v(B){null!=G&&(!0!==B&&(G.model.setGeometry(c,S.clone()),J=5,x.value=J),G.model.setStyle(c,e+u()),G.selectAll(),t.style.visibility=q.checked?"visible":"hidden")}var D=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
null,H),0<O.length&&(g=mxUtils.parseXml(O),g=g.documentElement))))}if(null!=g&&"svg"==g.nodeName)if(O=g.getAttribute("content"),null!=O&&"<"!=O.charAt(0)&&"%"!=O.charAt(0)&&(O=unescape(window.atob?atob(O):Base64.decode(cont,O))),null!=O&&"%"==O.charAt(0)&&(O=decodeURIComponent(O)),null!=O&&0<O.length)g=mxUtils.parseXml(O).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==g||y||(P=null,"diagram"==g.nodeName?P=g:"mxfile"==g.nodeName&&(O=g.getElementsByTagName("diagram"),0< O.length&&(P=O[Math.max(0,Math.min(O.length-1,urlParams.page||0))])),null!=P&&(g=Editor.parseDiagramNode(P,H)));null==g||"mxGraphModel"==g.nodeName||y&&"mxfile"==g.nodeName||(g=null);return g};Editor.parseDiagramNode=function(g,y){var H=mxUtils.trim(mxUtils.getTextContent(g)),O=null;0<H.length?(g=Graph.decompress(H,null,y),null!=g&&0<g.length&&(O=mxUtils.parseXml(g).documentElement)):(g=mxUtils.getChildNodes(g),0<g.length&&(O=mxUtils.createXmlDocument(),O.appendChild(O.importNode(g[0],!0)),O=O.documentElement));
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;x=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(t||"none",function(I){t=I;k()});mxEvent.consume(C)}));k();x.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";x.style.marginLeft="4px";x.style.height="22px";x.style.width="22px";x.style.position="relative";x.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";x.className="geColorBtn";c.appendChild(x);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return q.value},focus:function(){q.focus()}}};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e], "*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,k=this.remoteInvokeCallbacks[e.callbackId];if(null==k)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,k,q,p){var t=!0,x=window.setTimeout(mxUtils.bind(this,function(){t=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
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=la;ea=ma;fa=ja;da=aa;za=oa;Ca=sa;Ba=ha;da.style.backgroundColor=F;da.style.border=K}function T(aa,la,ma,oa,ha,ja,sa,ta,La,Ga,ya){function Ja(Na,Ya){null==Fa?(Ka=Na,Ka=/^https?:\/\//.test(Ka)&&!b.editor.isCorsEnabledForUrl(Ka)?PROXY_URL+"?url="+encodeURIComponent(Ka):TEMPLATE_PATH+"/"+Ka,mxUtils.get(Ka,mxUtils.bind(this,function(Wa){200<=Wa.getStatus()&&299>=Wa.getStatus()&&(Fa=Wa.getText());Ya(Fa,Ka)}))):Ya(Fa,Ka)}function Ma(Na,Ya){if(null==aa||y||b.sidebar.currentElt==ra)b.sidebar.hideTooltip(); else if(b.sidebar.hideTooltip(),null!=H){var Wa="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+H.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+H.naturalWidth+'" height="'+H.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";x(Wa,mxEvent.getClientX(Na),mxEvent.getClientY(Na),ma,aa)}else b.sidebar.currentElt=ra,y=!0,Ja(aa,function(ab){y&&b.sidebar.currentElt== ra&&x(ab,mxEvent.getClientX(Na),mxEvent.getClientY(Na),ra,Ya);y=!1})}var ra=document.createElement("div");ra.className="geTemplate geAdaptiveAsset";ra.style.position="relative";ra.style.height=Qa+"px";ra.style.width=pa+"px";ra.style.border="1px solid transparent";var Fa=null,Ka=aa;null!=ma?ra.setAttribute("title",mxResources.get(ma,null,ma)):null!=oa&&0<oa.length&&ra.setAttribute("title",oa);if(null!=ja){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
(this.file.stats.cacheFail++,this.reload(f,m,d))}catch(t){null!=m&&m(t)}}else null!=m&&m()}),m)}else null!=m&&m()});window.setTimeout(M,this.cacheReadyDelay)}}else null!=m&&m()}};DrawioFileSync.prototype.reload=function(b,f,m,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(u){null!=f&&f(u)}),m,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
this.editor.graph.mathEnabled&&this.editor.addMathCss(N);var U=mxUtils.bind(this,function(g){t?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(g,L,this.thumbImageCache)):L(g)});n?this.embedFonts(N,U):(this.editor.addFontCss(N),U(N))}catch(g){this.handleError(g)}};EditorUi.prototype.addRadiobox=function(c,e,k,q,p,t,x){return this.addCheckbox(c,k,q,p,t,x,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,k,q,p,t,x,C){t=null!=t?t:!0;var I=document.createElement("input"); I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();I.id=x;null!=C&&I.setAttribute("name",C);k&&(I.setAttribute("checked","checked"),I.defaultChecked=!0);q&&I.setAttribute("disabled","disabled");t&&(c.appendChild(I),k=document.createElement("label"),mxUtils.write(k,e),k.setAttribute("for",x),c.appendChild(k),p||mxUtils.br(c));return I};EditorUi.prototype.addEditButton=function(c,e){var k=this.addCheckbox(c,mxResources.get("edit")+
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return k.checked?"blank"===t.value?"_blank":p:null},getEditInput:function(){return k},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function k(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=t):(C.style.backgroundPosition="center center",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxUtils.bind(this,function(){k(Error(mxResources.get("timeout")+" "+p.getAttribute("href")))}))}};EditorUi.prototype.setPagesVisible=function(c){Editor.pagesVisible!=c&&(Editor.pagesVisible=c,mxSettings.settings.pagesVisible=c,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(c,e){this.sidebar.sidebarTitles!=c&&(this.sidebar.sidebarTitles=c,this.sidebar.refresh(),Editor.isSettingsEnabled()&&e&&(mxSettings.settings.sidebarTitles= c,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,e=mxUtils.getOffset(this.diagramContainer),k=this.diagramContainer.scrollLeft-e.x;e=this.diagramContainer.scrollTop-e.y;null!=this.embedViewport&&(Editor.inlineFullscreen?(k-=this.embedViewport.x,e-=this.embedViewport.y):(k+=this.embedViewport.x,e+=this.embedViewport.y));return{x:k,y:e,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=
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||null==c};EditorUi.prototype.doSetCurrentTheme=function(c,e,k){function q(I){return"simple"==I||0==e&&"sketch"==I}e=null!=e?e:150;var p=Editor.currentTheme,t=q(p)&&this.isDefaultTheme(c)||this.isDefaultTheme(p)&&q(c),x=t&&"sketch"!=c&&"sketch"!=p;if(t&&!this.themeSwitching){Editor.currentTheme=c;this.themeSwitching=!0;var C=this.saveScrollState();mxUtils.setPrefixedStyle(this.container.style,"transition","all "+e+"ms ease-in-out");0==e&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"hidden";na.style.bottom="0px";na.style.height="42px";na.style.right="10px";na.style.left="10px";R.isEnabled()&&(na.appendChild(Y),na.appendChild(ea),X.appendChild(na));return{div:X,refresh:fa}};Graph.prototype.getCustomFonts=function(){var g=this.extFonts;g=null!=g?g.slice():[];for(var y in Graph.customFontElements){var H=Graph.customFontElements[y];g.push({name:H.name,url:H.url})}return g};Graph.prototype.setFont=function(g,y){Graph.addFont(g,y);document.execCommand("fontname",!1,g);if(null!=y){var H= this.cellEditor.textarea.getElementsByTagName("font");y=Graph.getFontUrl(g,y);for(var O=0;O<H.length;O++)H[O].getAttribute("face")==g&&H[O].getAttribute("data-font-src")!=y&&H[O].setAttribute("data-font-src",y)}};var t=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return t.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=
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.join(" ")}null!=ia?(O=ia,O.className+=" "+aa,P=la,ka.className="geTempDlgCreateBtn"):(P=O=null,ka.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function C(ia,aa){if(null!=P){var la=function(sa){ja.isExternal?K(ja,function(ta){ma(ta,sa)},oa):ja.url?mxUtils.get(TEMPLATE_PATH+"/"+ja.url,mxUtils.bind(this,function(ta){200<=ta.getStatus()&&299>=ta.getStatus()?ma(ta.getText(),sa):oa()})):ma(b.emptyDiagramXml,sa)},ma=function(sa,ta){e||b.hideDialog(!0);f(sa,ta,ja,aa)},oa=function(){k(mxResources.get("cannotLoad"));
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!=c)m||b.hideDialog(),c(za,Ba,N.value);else if(d)m||b.hideDialog(),d(na,N.value,Ca,ea);else{var aa=N.value;null!=aa&&0<aa.length&&b.pickFolder(b.mode,function(la){b.createFile(aa,na,null!=ea&&0<ea.length?ea:null,null,function(){b.hideDialog()},null,la,null,null!=fa&&0<fa.length?fa:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function B(aa,la,ma,oa,ha,ja,sa){null!=da&&(da.style.backgroundColor="transparent",da.style.border="1px solid transparent");U.removeAttribute("disabled"); na=la;ea=ma;fa=ja;da=aa;za=oa;Ca=sa;Ba=ha;da.style.backgroundColor=F;da.style.border=K}function T(aa,la,ma,oa,ha,ja,sa,ta,La,Ga,ya){function Ja(Na,Ya){null==Fa?(Ka=Na,Ka=/^https?:\/\//.test(Ka)&&!b.editor.isCorsEnabledForUrl(Ka)?PROXY_URL+"?url="+encodeURIComponent(Ka):TEMPLATE_PATH+"/"+Ka,mxUtils.get(Ka,mxUtils.bind(this,function(Wa){200<=Wa.getStatus()&&299>=Wa.getStatus()&&(Fa=Wa.getText());Ya(Fa,Ka)}))):Ya(Fa,Ka)}function Ma(Na,Ya){if(null==aa||y||b.sidebar.currentElt==ra)b.sidebar.hideTooltip();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
var CreateDialog=function(b,f,m,d,u,v,D,F,K,M,G,S,J,c,e,k,q){function p(n,z,E,A){function N(){mxEvent.addListener(Q,"click",function(){var H=E;if(D){var O=C.value,P=O.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>P){H=null!=H?H:l.value;var V="";H==App.MODE_GOOGLE?V=b.drive.extension:H==App.MODE_GITHUB?V=b.gitHub.extension:H==App.MODE_GITLAB?V=b.gitLab.extension:H==App.MODE_TRELLO?V=b.trello.extension:H==App.MODE_DROPBOX?V=b.dropbox.extension:H==App.MODE_ONEDRIVE?V=b.oneDrive.extension:H==App.MODE_DEVICE&& (V=".drawio");0<=P&&(O=O.substring(0,P));C.value=O+V}}t(E)})}var Q=document.createElement("a");Q.style.overflow="hidden";var L=document.createElement("img");L.src=n;L.setAttribute("border","0");L.setAttribute("align","absmiddle");L.style.width="60px";L.style.height="60px";L.style.paddingBottom="6px";Q.style.display="inline-block";Q.className="geBaseButton";Q.style.position="relative";Q.style.margin="4px";Q.style.padding="8px 8px 10px 8px";Q.style.whiteSpace="nowrap";Q.appendChild(L);Q.style.color=
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(g,y){for(var H=0;H<y.length;H++){var O=y[H],P;for(P in O)this.updateCustomLinkAction(g,O[P],"cells"),this.updateCustomLinkAction(g,O[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(g,y,H){if(null!=y&&null!=y[H]){for(var O=[],P=0;P<y[H].length;P++)if("*"==y[H][P])O.push(y[H][P]);else{var V=g[y[H][P]];null!=V?""!=V&&O.push(V):O.push(y[H][P])}y[H]=O}};Graph.prototype.getCellsForAction=function(g,y){y=this.getCellsById(g.cells).concat(this.getCellsForTags(g.tags,null,y)); if(null!=g.excludeCells){for(var H=[],O=0;O<y.length;O++)0>g.excludeCells.indexOf(y[O].id)&&H.push(y[O]);y=H}return y};Graph.prototype.getCellsById=function(g){var y=[];if(null!=g)for(var H=0;H<g.length;H++)if("*"==g[H]){var O=this.model.getRoot();y=y.concat(this.model.filterDescendants(function(V){return V!=O},O))}else{var P=this.model.getCell(g[H]);null!=P&&y.push(P)}return y};var E=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(g){return E.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(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
Na=g.getCurrentFile();null!=Na&&(Ja.title=Na.getTitle());var hb=Ja.writeHead;Ja.writeHead=function(Za){hb.apply(this,arguments);mxClient.IS_GC&&(Za.writeln('<style type="text/css">'),Za.writeln("@media print {"),Za.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Za.writeln("}"),Za.writeln("</style>"));null!=g.editor.fontCss&&(Za.writeln('<style type="text/css">'),Za.writeln(g.editor.fontCss),Za.writeln("</style>"));for(var cb=ya.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name, db=cb[bb].url;Graph.isCssFontUrl(db)?Za.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):(Za.writeln('<style type="text/css">'),Za.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Za.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Ja.renderPage;Ja.renderPage=function(Za,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;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
EditorUi.prototype.updateDiagram=function(c){function e(U){var g=new mxCellOverlay(U.image||p.warningImage,U.tooltip,U.align,U.valign,U.offset);g.addListener(mxEvent.CLICK,function(y,H){q.alert(U.tooltip)});return g}var k=null,q=this;if(null!=c&&0<c.length&&(k=mxUtils.parseXml(c),c=null!=k?k.documentElement:null,null!=c&&"updates"==c.nodeName)){var p=this.editor.graph,t=p.getModel();t.beginUpdate();var x=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var C=t.getCell(c.getAttribute("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
mxUtils.setTextContent(k,JSON.stringify(c,null,2));e.appendChild(k);return mxUtils.getXml(e,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var k=0;k<e.length;k++)e[k].parentNode.removeChild(e[k]);delete this.sidebar.palettes[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
for(var e=[],k=2;k<c.length;k++){var q=mxUtils.trim(c[k]);"["!=q&&"]"!=q&&"%%"!=q.substring(0,2)&&"##"!=q.substring(0,2)&&(q=c[k].replace(/[-|>]/g," "),""!=mxUtils.trim(q)&&" "==q.charAt(0)&&e.push(q))}return"mindmap\nroot(("+mxUtils.trim(c[1])+"))\n"+e.join("\n")};EditorUi.prototype.extractMermaidDeclaration=function(c){"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)"); e=mxUtils.trim(1>=e.length?c:e[1]);var k=e.split("\n");if(0<k.length&&"mermaid"==mxUtils.trim(k[0])||1<k.length&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k[1]))k.shift(),e=mxUtils.trim(k.join("\n")),k=e.split("\n");var q=k[0].split(" ")[0].replace(/:$/,"");try{"mindmap"==q&&2<k.length&&(e=this.extractMermaidMindmap(k))}catch(p){}"@"!=q.charAt(0)&&0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,q)&&(e="classDiagram\n"+e);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",k,"\ntype:", q,"\nvalue:",c,"\ntext:",e);return e};EditorUi.prototype.generateMermaidImage=function(c,e,k,q,p){var t=mxUtils.bind(this,function(C){this.loadingMermaid=!1;null!=q?q(C):this.handleError(C)}),x=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);e.securityLevel="strict";e.startOnLoad=!1;Editor.isDarkMode()&&(e.theme="dark");var C=mxUtils.bind(this,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/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
y,H,O){for(var P=0;P<O;P++)g=Editor.crcTable[(g^y.charCodeAt(H+P))&255]^g>>>8;return g};Editor.crc32=function(g){for(var y=-1,H=0;H<g.length;H++)y=y>>>8^Editor.crcTable[(y^g.charCodeAt(H))&255];return(y^-1)>>>0};Editor.writeGraphModelToPng=function(g,y,H,O,P){function V(Y,ea){var fa=X;X+=ea;return Y.substring(fa,X)}function R(Y){Y=V(Y,4);return Y.charCodeAt(3)+(Y.charCodeAt(2)<<8)+(Y.charCodeAt(1)<<16)+(Y.charCodeAt(0)<<24)}function W(Y){return String.fromCharCode(Y>>24&255,Y>>16&255,Y>>8&255,Y&255)}
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);this.handleError(c,e,k,q,p)}),T,mxResources.get("changeUser"),mxUtils.bind(this,function(){function z(){Q.innerText="";for(var L=0;L<E.length;L++){var U=document.createElement("option");mxUtils.write(U,E[L].displayName);U.value=L;Q.appendChild(U);U=document.createElement("option");U.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(U,"<"+E[L].email+">");U.setAttribute("disabled","disabled");Q.appendChild(U)}U=document.createElement("option");mxUtils.write(U,mxResources.get("addAccount"));U.value=E.length; Q.appendChild(U)}var E=this.drive.getUsersList(),A=document.createElement("div"),N=document.createElement("span");N.style.marginTop="6px";mxUtils.write(N,mxResources.get("changeUser")+": ");A.appendChild(N);var Q=document.createElement("select");Q.style.width="200px";z();mxEvent.addListener(Q,"change",mxUtils.bind(this,function(){var L=Q.value,U=E.length!=L;U&&this.drive.setUser(E[L]);this.drive.authorize(U,mxUtils.bind(this,function(){U||(E=this.drive.getUsersList(),z())}),mxUtils.bind(this,function(g){this.handleError(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
c=x)}this.spinner.stop();this.openLocalFile(c,e,q,p,null!=p?k:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=0;k<c.length;k++)mxUtils.bind(this,function(q){var p=new FileReader;p.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,q.name,q,e)}catch(x){this.handleError(x)}});p.onerror=mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t);window.openFile=null});"image"!==q.type.substring(0, 5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?p.readAsText(q):p.readAsDataURL(q)})(c[k])};EditorUi.prototype.openLocalFile=function(c,e,k,q,p){var t=this.getCurrentFile(),x=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,k,q,p))});if(null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
R};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(V,R,W,X,Z,Y){null!=V.handJiggle&&V.handJiggle.constructor==g?(V.handJiggle.passThrough=!0,P.apply(this,arguments),V.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:Graph.arrayBufferToString(pako.deflateRaw(g))};Editor.fastDecompress=function(g){return null==g||0==g.length||"undefined"===typeof pako?g:pako.inflateRaw(Graph.stringToArrayBuffer(atob(g)),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"4px");null!=Y&&na.setAttribute("title",Y);null!=ea&&(W=function(){ea.isEnabled()?(na.removeAttribute("disabled"),na.style.cursor="pointer"):(na.setAttribute("disabled","disabled"),na.style.cursor="default")},ea.addListener("stateChanged",W),x.addListener("enabledChanged",W),W());return na}function e(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px"; Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=t.statusContainer?C.insertBefore(Z,t.statusContainer):C.appendChild(Z);return Z}function k(){for(var W=C.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}I=C.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
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;ja<ta.length;ja++)oa=ta[ja],0==ha==(null==la[oa.url])&&(Ga[oa.url]=!0,La.push(oa));la=Ga;ha++}0==La.length?za.innerText=mxResources.get("noResultsFor",[ia]):B(La,!0)}}function A(ia){if(Y!=ia||R!=ea)q(),Ba.scrollTop=0,da.innerText="",za.innerText=mxResources.get("searchResults")+' "'+ia+'"',Ua=null,fa?E(ia):F&&(ia?(Qa.spin(da),g=!1,U=!0,F(ia,Va,function(){k(mxResources.get("searchFailed"));Va([])},R?null:v)):z(R)),Y=ia,ea=R}function N(ia){null!=Ua&&clearTimeout(Ua);13==ia.keyCode?A(xa.value):Ua=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(M){return this.isTreeEdge(M)}))};Graph.prototype.getIncomingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,u){return this.getTreeEdges(d,u,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(A){return k.isVertex(A)&&v(A)}function u(A){var N=!1;null!=A&&(N="1"==
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);M.style.backgroundColor=""};G.dblClick=function(){};var O=G.getSelectionModel().changeSelection;G.getSelectionModel().changeSelection=function(){O.call(this,[c],[c])}};K.onerror=function(){K.onload=null;K.src=Editor.errorImage};K.setAttribute("src",f);K.style.maxWidth="300px";K.style.maxHeight="300px";F.appendChild(K);D.appendChild(F);var M=document.createElement("div");M.style.width="300px";M.style.height="300px";M.style.overflow="hidden";M.style.backgroundColor="#fff9";D.appendChild(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.offsetTop);this.showShapePicker(Math.max(this.diagramContainer.scrollLeft+Math.max(24,E.x)),this.diagramContainer.scrollTop+E.y,null,null,null,null,mxUtils.bind(this,function(A){return e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(A,!0))}),"simple"==c,!1)}mxEvent.consume(z)}));x.style.backgroundSize="24px";"simple"==c?x.style.flexShrink="0":x.style.marginBottom="4px";var B=!1,T=mxUtils.bind(this,function(z){if(z||document.body.contains(k)){z=function(Q,L,U,g,y,H){null!=L&&Q.setAttribute("title", L);Q.style.cursor="pointer";Q.style.margin="simple"==c?"0px":"8px 0px 8px 2px";Q.style.display="simple"==c?"inline-block":"block";k.appendChild(Q);"simple"==c?Q.style.opacity="0.7":null!=g&&(L=y,L=null!=L?L:30,H=null!=H?H:26,Q.style.position="relative",Q.style.overflow="visible",U=document.createElement("div"),U.style.position="absolute",U.style.fontSize="8px",U.style.left=L+"px",U.style.top=H+"px",mxUtils.write(U,g),Q.appendChild(U));return Q};k.innerText="";if(!B){var E=window.innerWidth||document.documentElement.clientWidth||
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(k,q,p){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(p.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(t){q.fireEvent(new mxEventObject("pointerdown","event",t,"state",k))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(p.node,"touchstart",function(t){q.fireEvent(new mxEventObject("pointerdown","event",t,"state",k))})};v.getAllConnectionConstraints=function(){return null};v.connectionHandler.marker.highlight.keepOnTop=
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
"ellipsis";A.setAttribute("title",E.title+" ("+E.id+")");var N=document.createElement("input");N.setAttribute("type","checkbox");N.checked=b.sidebar.isEntryVisible(E.id);N.defaultChecked=N.checked;A.appendChild(N);mxUtils.write(A," "+E.title);G.appendChild(A);var Q=function(L){if(null==L||"INPUT"!=mxEvent.getSource(L).nodeName){S.style.textAlign="center";S.style.padding="0px";S.style.color="";S.innerText="";if(null!=E.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily= "inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,E.desc);S.appendChild(U)}null!=E.imageCallback?E.imageCallback(S):null!=E.image?S.innerHTML+='<img border="0" style="max-width:100%;" src="'+E.image+'"/>':null==E.desc&&(S.style.padding="20px",S.style.color="rgb(179, 179, 179)",mxUtils.write(S,mxResources.get("noPreview")));null!=J&&(J.style.backgroundColor="");J=A;J.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=L&&mxEvent.consume(L)}};
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
StorageFile.insertFile=function(b,f,m,d,u){var v=mxUtils.bind(this,function(D){var F=function(){var K=new StorageFile(b,m,f);K.saveFile(f,!1,function(){d(K)},u)};D?b.confirm(mxResources.get("replaceIt",[f]),F,u):F()});StorageFile.getFileContent(b,f,function(D){v(null!=D)},function(){v(!1)})};StorageFile.getFileContent=function(b,f,m,d){b.getDatabaseItem(f,function(u){m(null!=u?u.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,m):null!=d&&d()}),"files")};
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
6)this.curveTo(fa[na],fa[na+1],fa[na+2],fa[na+3],fa[na+4],fa[na+5]);this.lastX=Y;this.lastY=ea}};g.prototype.rect=function(V,R,W,X){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(V,R,W,X,this.getStyle(!0,!0)))};g.prototype.ellipse=function(V,R,W,X){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(V+W/2,R+X/2,W,X,this.getStyle(!0,!0)))};g.prototype.roundrect=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",x,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript("js/extensions.min.js",x,null,null,null,t))}),q)};EditorUi.prototype.createMermaidXml=function(c,e,k,q,p){var t=new Graph(document.createElement("div")); k=t.insertVertex(null,null,null,0,0,q,p,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");t.setAttributeForCell(k,"mermaidData",JSON.stringify({data:c,config:e},null,2));c=(new mxCodec).encode(t.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,k){var q=0,p=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.createTimeout(4E4,mxUtils.bind(this,function(t){EditorUi.logEvent({category:"OPENAI-DIAGRAM",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
StorageFile.listFiles=function(b,f,m,d){b.getDatabaseItems(function(u){var v=[];if(null!=u)for(var D=0;D<u.length;D++)"."==u[D].title.charAt(0)||null!=f&&u[D].type!=f||v.push(u[D]);m(v)},function(){null==b.database?m(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,m,d){b.removeDatabaseItem([f,f],m,function(){null==b.database?(localStorage.removeItem(f),m()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,m){StorageFile.call(this,b,f,m)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,m){this.saveFile(b,!1,f,m)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
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 F[S];return D};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var m in f)try{this.patchViewStateProperty(b,f,m)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,m){b.viewState[m]=JSON.parse(f[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
function(z){G=z};this.setAutoScroll=function(z){S=z};this.setOpenFill=function(z){J=z};this.setStopClickEnabled=function(z){k=z};this.setSelectInserted=function(z){q=z};this.setSmoothing=function(z){m=z};this.setPerfectFreehandMode=function(z){t=z};this.isPerfectFreehandMode=function(){return t};this.setBrushSize=function(z){p.size=z};this.getBrushSize=function(){return p.size};var x=function(z){e=z;b.getRubberband().setEnabled(!z);b.graphHandler.setSelectEnabled(!z);b.graphHandler.setMoveEnabled(!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
var StorageDialog=function(b,f,m){function d(S,J,c,e,k,q){function p(){mxEvent.addListener(t,"click",null!=q?q:function(){c==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(c,!0);f()})):c==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(c,!0);f()}),function(T){b.spinner.stop();b.handleError(T)}): (b.setMode(c,!0),f())})}F++;++D>m&&(mxUtils.br(K),D=1);var t=document.createElement("a");t.style.overflow="hidden";t.style.display="inline-block";t.className="geBaseButton";t.style.boxSizing="border-box";t.style.fontSize="11px";t.style.position="relative";t.style.margin="4px";t.style.marginTop="8px";t.style.marginBottom="0px";t.style.padding="8px 10px 8px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",J);var x=document.createElement("div");x.style.textOverflow=
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.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,k=this.remoteInvokeCallbacks[e.callbackId];if(null==k)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?k.error&&k.error(c.error.errResp):k.callback&&k.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,k,q,p){var t=!0,x=window.setTimeout(mxUtils.bind(this,function(){t=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),
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(Y[Z]);V=b.stringToCells(Graph.decompress(y));var ea=b.editor.graph.getBoundingBoxFromGeometry(V);F(null,null,0,0,0,0,{xml:y,w:ea.width,h:ea.height})}E=!0}}catch(fa){null!=window.console&&console.log("Error in library dialog: "+fa)}E||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&console.log("Error in library dialog: "+fa)}return null}function K(T){T.dataTransfer.dropEffect=null!=q?"move":"copy";T.stopPropagation();
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.editor.loadFonts()};var D=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=e&&c<e?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<e&&c>=e&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth= c}D.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,q=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(B),mxEvent.getClientY(B)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var 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
5)&&"application/pdf"!==q.type||"image/svg"===q.type.substring(0,9)?p.readAsText(q):p.readAsDataURL(q)})(c[k])};EditorUi.prototype.openLocalFile=function(c,e,k,q,p){var t=this.getCurrentFile(),x=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,k,q,p))});if(null!= c&&0<c.length)null==t||!t.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)?x():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=q)&&null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"),null,x,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=t&&t.isModified()?this.confirm(mxResources.get("allChangesLost"), null,x,mxResources.get("cancel"),mxResources.get("discardChanges")):x()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var k in c)e.push(k);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function k(x){if(null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Z)}function ea(){F(na,da,function(za){Y()},!0)}var fa=L().pdiv,na=b.newComment(V,b.getCurrentUser());na.pCommentId=n.id;null==n.replies&&(n.replies=[]);var da=J(na,n.replies,fa,A+1);R?ea():Y()}if(N||!n.isResolved){x.style.display="none";var g=document.createElement("div");g.className="geCommentContainer";g.setAttribute("data-commentId",n.id);g.style.marginLeft=20*A+5+"px";n.isResolved&&!Editor.isDarkMode()&&(g.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
B=new mxAsyncCanvas(this.thumbImageCache);I.images=this.thumbImageCache.images;var T=new mxImageExport;T.drawShape=function(l,n){l.shape instanceof mxShape&&l.shape.checkBounds()&&(n.save(),n.translate(.5,.5),l.shape.paint(n),n.translate(-.5,-.5),n.restore())};T.drawText=function(l,n){};T.drawState(D.getView().getState(D.model.root),B);B.finish(mxUtils.bind(this,function(){try{T.drawState(D.getView().getState(D.model.root),I),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(l){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
if(null!=t.hoverIcons){var z=t.hoverIcons.update;t.hoverIcons.update=function(){x.freehand.isDrawing()||z.apply(this,arguments)}}if(null!=x.freehand){var E=x.freehand.createStyle;x.freehand.createStyle=function(W){return E.apply(this,arguments)+"sketch=0;"}}t.editor.addListener("statusChanged",mxUtils.bind(this,function(){t.setStatusText(t.editor.getStatus())}));t.setStatusText(t.editor.getStatus());var A=t.menus.get("viewZoom");if(null!=A){var N=function(W){if(mxEvent.isAltDown(W))t.hideCurrentMenu(), t.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))t.hideCurrentMenu(),t.actions.get("smartFit").funct(),mxEvent.consume(W)},Q=t.actions.get("zoomIn"),L=t.actions.get("zoomOut"),U=t.actions.get("resetView"),g=t.actions.get("undo"),y=t.actions.get("redo"),H=c("",g.funct,null,mxResources.get("undo")+" ("+g.shortcut+")",g,Editor.undoImage),O=c("",y.funct,null,mxResources.get("redo")+" ("+y.shortcut+")",y,Editor.redoImage),
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.x,v.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(n);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());t.destroy();q.parentNode.removeChild(q)}}}function u(){return"list"==F.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==F.value|| "mermaid2drawio"==F.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==F.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==F.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml": "plantUmlSvg"==F.value||"plantUmlTxt"==F.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var v=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var D=document.createElement("textarea");D.style.boxSizing="border-box";D.style.resize=
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.substring(0,11)?d.loadImage(N,mxUtils.bind(this,function(O){var P=!0,V=mxUtils.bind(this,function(){d.resizeImage(O,N,mxUtils.bind(this,function(R,W,X){R=P?Math.min(1,Math.min(d.maxImageSize/W,d.maxImageSize/X)):1;d.importFile(N,Q,y,H,Math.round(W*R),Math.round(X*R),L,function(Z){d.spinner.stop();u.setSelectionCells(Z);u.scrollCellToVisible(u.getSelectionCell())})}),P)});N.length>d.resampleThreshold?d.confirmImageResize(function(R){P=R;V()}):V()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):
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
"geCommentActionLnk";mxUtils.write(Z,V);X.appendChild(Z);mxEvent.addListener(Z,"click",function(Y){R(Y,n);Y.preventDefault();mxEvent.consume(Y)});P.appendChild(X);W&&(X.style.display="none")}function L(){function V(X){R.push(W);if(null!=X.replies)for(var Z=0;Z<X.replies.length;Z++)W=W.nextSibling,V(X.replies[Z])}var R=[],W=g;V(n);return{pdiv:W,replies:R}}function U(V,R,W,X,Z){function Y(){M(da);n.addReply(na,function(za){na.id=za;n.replies.push(na);S(da);W&&W()},function(za){ea();G(da);b.handleError(za, null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,Z)}function ea(){F(na,da,function(za){Y()},!0)}var fa=L().pdiv,na=b.newComment(V,b.getCurrentUser());na.pCommentId=n.id;null==n.replies&&(n.replies=[]);var da=J(na,n.replies,fa,A+1);R?ea():Y()}if(N||!n.isResolved){x.style.display="none";var g=document.createElement("div");g.className="geCommentContainer";g.setAttribute("data-commentId",n.id);g.style.marginLeft=20*A+5+"px";n.isResolved&&!Editor.isDarkMode()&&(g.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
(q<<5)-q+this.hashValue(c.childNodes[p],e,k)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=k&&(k.byteCount+=c.length);for(p=0;p<c.length;p++)e=(e<<5)-e+c.charCodeAt(p)<<0;q^=e}return q};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,k,q,p,t,x){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&& (null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var e=0;e<c.length;e++)null!=c[e].xml&&"<"!=c[e].xml.charAt(0)&&(c[e].xml=mxUtils.trim(Graph.decompress(c[e].xml)));e=mxUtils.createXmlDocument();var k=e.createElement("mxlibrary");
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;this.okButton=u;this.container=J},TemplatesDialog=function(b,f,m,d,u,v,D,F,K,M,G,S,J,c,e){function k(ia){wa.innerText=ia;wa.style.display="block";setTimeout(function(){wa.style.display="none"},4E3)}function q(){null!=y&&(y.style.fontWeight="normal",y.style.textDecoration="none",H=y,y=null)}function p(ia,aa,la,ma,oa,ha,ja){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";L.querySelector(".geTempDlgRadioBtn[data-id="+ma+"]").className="geTempDlgRadioBtn "+
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
" "+Y.getStatus()})},X,this.timeout,function(){P&&null!=H&&H({code:App.ERROR_TIMEOUT,retry:Z})},W)});Z()}catch(Y){null!=H&&H(Y)}};Editor.prototype.absoluteCssFonts=function(g){var y=null;if(null!=g){var H=g.split("url(");if(0<H.length){y=[H[0]];g=window.location.pathname;var O=null!=g?g.lastIndexOf("/"):-1;0<=O&&(g=g.substring(0,O+1));O=document.getElementsByTagName("base");var P=null;null!=O&&0<O.length&&(P=O[0].getAttribute("href"));for(var V=1;V<H.length;V++)if(O=H[V].indexOf(")"),0<O){var R=Editor.trimCssUrl(H[V].substring(0, O));this.graph.isRelativeUrl(R)&&(R=null!=P?P+R:window.location.protocol+"//"+window.location.hostname+("/"==R.charAt(0)?"":g)+R);y.push('url("'+R+'"'+H[V].substring(O))}else y.push(H[V])}else y=[g]}return null!=y?y.join(""):null};Editor.prototype.mapFontUrl=function(g,y,H){/^https?:\/\//.test(y)&&!this.isCorsEnabledForUrl(y)&&(y=PROXY_URL+"?url="+encodeURIComponent(y));H(g,y)};Editor.prototype.embedCssFonts=function(g,y){var H=g.split("url("),O=0;null==this.cachedFonts&&(this.cachedFonts={});var 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