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
null,B,mxResources.get("cancel"),mxResources.get("discardChanges")):B()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)this.updatePageRoot(this.pages[g]),this.addBasenamesForCell(this.pages[g].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);g=[];for(var n in d)g.push(n);return g};EditorUi.prototype.addBasenamesForCell=function(d,g){function n(B){if(null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxResources.get("pageWithNumber",[ba+1]),mxUtils.write(ma,ea),ma.setAttribute("title",ea+" ("+D[ba].getAttribute("id")+")"),ma.setAttribute("value",ba),ba==z&&ma.setAttribute("selected","selected"),K.appendChild(ma);R=function(){try{var Ca=parseInt(K.value);z=E=Ca;za(D[Ca])}catch(ca){K.value=E,b.handleError(ca)}}}else Ba(ea);ba=V.lastModifyingUserName;null!=ba&&20<ba.length&&(ba=ba.substring(0,20)+"...");F.innerText="";mxUtils.write(F,(null!=ba?ba+" ":"")+X.toLocaleDateString()+" "+X.toLocaleTimeString());
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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=A.editor.graph;if(M.isEnabled()){var Q=A.getCurrentFile();null!=Q&&Q.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(P){A.editor.setAutosave(P);A.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(P){this.listener=function(){P(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&M.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
"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(H){r="";for(i=0;i<H.length;i+=3)r=i+2==H.length?r+u(H.charCodeAt(i),H.charCodeAt(i+1),0):i+1==H.length?r+u(H.charCodeAt(i),0,0):r+u(H.charCodeAt(i),H.charCodeAt(i+1),H.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(B.responseType="blob");B.onload=function(H){if(200<=this.status&&300>this.status)if("txt"==g)n(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(G){var T= new Image;T.onload=function(){try{var p=T.width,q=T.height;if(0==p&&0==q){var C=L.result,J=C.indexOf(","),F=decodeURIComponent(escape(atob(C.substring(J+1)))),O=mxUtils.parseXml(F).getElementsByTagName("svg");0<O.length&&(p=parseFloat(O[0].getAttribute("width")),q=parseFloat(O[0].getAttribute("height")))}n(L.result,p,q)}catch(S){t(S)}};T.src=L.result};L.onerror=function(G){t(G)}}else t(H)};B.onerror=function(H){t(H)};B.send()};EditorUi.prototype.insertAsPreText=function(d,g,n){var t=this.editor.graph,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(M,Q){if(null==Q){var U=mxEvent.getSource(M);"a"==U.nodeName.toLowerCase()&&(Q=U.getAttribute("href"))}null!=Q&&g.isCustomLink(Q)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&g.customLinkClicked(Q)&&mxEvent.consume(M);null!=A&&A(M,Q)};H.call(this,K,R,m)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var L=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(K,R,m){g.isSelectionEmpty()&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
U.getProperty("event");var L=U.getProperty("cell");null==L?(K=mxUtils.convertPoint(this.container,mxEvent.getClientX(K),mxEvent.getClientY(K)),G.start(K.x,K.y)):null!=qa?this.addSelectionCells(qa):1<this.getSelectionCount()&&this.isCellSelected(L)&&this.removeSelectionCell(L);qa=null;U.consume()}}));this.connectionHandler.selectCells=function(K,U){this.graph.setSelectionCell(U||K)};this.connectionHandler.constraintHandler.isStateIgnored=function(K,U){var L=K.view.graph;return U&&(L.isCellSelected(K.cell)||
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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,E,k)}else k()}))):k({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,c,k){var l="/me/drive/root";null!=e&&(l=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+l+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(x){404==x.getStatus()?k(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){k(!0)},function(){k(!1)})): (this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){k(!1)}))}),function(x){k(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,f,c,k){try{var l=e.getData(),x=mxUtils.bind(this,function(E){var D=mxUtils.bind(this,function(N){f(N,l)}),z=this.getItemURL(e.getId());4E6<=E.length?this.writeLargeFile(z,E,D,c,k):this.writeFile(z+"/content/",E,"PUT",null,D,c,k)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var y=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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):p.y+p.height>F+C&&(p.height=F+C-p.y,p.y=Math.min(p.y,F+C));var O=(p.x-J)/q*100;q=100-(p.x+p.width-J)/q*100;J=(p.y-F)/C*100;p=100-(p.y+p.height-F)/C*100;return"inset("+mxUtils.format(J)+"% "+mxUtils.format(q)+"% "+mxUtils.format(p)+"% "+mxUtils.format(O)+"%"+(G?" round "+I+"%":T?" round 50%":"")+")"}function l(G){null!=z&&(!0!==G&&(z.model.setGeometry(d,N.clone()),I=5,B.value=I),z.model.setStyle(d,g+k()),z.selectAll(),v.style.visibility=t.checked?"visible":"hidden")}var x=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
d;this.editor.updateGraphComponents();this.editor.graph.refresh();this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()|| !navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,n){var t=null==d||null==g;n=null!=n?n:24;var u=new Spinner({lines:12,length:n,width:Math.round(n/3),radius:Math.round(n/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),v=u.spin;u.spin=function(H,L){var 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
"ready";B.postMessage(v,"*");if("json"==urlParams.proto){var H=this.editor.graph.openLink;this.editor.graph.openLink=function(L,G,T){H.apply(this,arguments);B.postMessage(JSON.stringify({event:"openLink",href:L,target:G,allowOpener:T}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,n,t){var u="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,v=document.createElement("button");v.setAttribute("title",d+(null!=n?" ("+n+")":""));v.style.marginLeft="6px"; mxUtils.write(v,d);u?(v.className=t?"gePrimaryBtn":"",v.style.marginLeft="8px",v.style.padding="6px"):v.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(v,"click",g);return v};EditorUi.prototype.addEmbedButtons=function(){var d=document.createElement("div");d.style.display="inline-flex";d.style.alignItems="center";d.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(d.style.marginRight="66px",d.style["float"]=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,k,l,x,y,E,D,z,N,I,d){function g(P,V){V=V||document;return V.querySelector(P)}function n(P,V,X){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)X();else{c(P.id,P.parentReference.driveId,function(da){n(da,V,X)},X);return}var Y=new XMLHttpRequest;Y.open("GET",P["@microsoft.graph.downloadUrl"]);var Z=P.file?"image/png"==P.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var da=Y.responseText; Z&&(da="data:image/png;base64,"+Editor.base64Encode(da),da=Editor.extractGraphModelFromPng(da));var ba=mxUtils.parseXml(da),ma="mxlibrary"==ba.documentElement.nodeName?ba.documentElement:Editor.extractGraphModel(ba.documentElement);if(null!=ma){V(ma.ownerDocument);return}}catch(ea){}X()}};Z&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function t(){N&&null!=J?C.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");x(F,P);l(F)},400,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,k=[],l,x=[],y,E=!1,D=!0,z=!0,N=!0,I=!0,d=[],g=!1,n=!1,t=!1,u={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},v=!0;this.setClosedPath=function(C){E=C};this.setAutoClose=function(C){D=C};this.setAutoInsert=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
null!=d)f||b.hideDialog(),d(za,Ca,O.value);else if(c)f||b.hideDialog(),c(ma,O.value,Ba,da);else{var aa=O.value;null!=aa&&0<aa.length&&b.pickFolder(b.mode,function(la){b.createFile(aa,ma,null!=da&&0<da.length?da:null,null,function(){b.hideDialog()},null,la,null,null!=ba&&0<ba.length?ba:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function G(aa,la,na,pa,ha,ka,ua){null!=ea&&(ea.style.backgroundColor="transparent",ea.style.border="1px solid transparent");R.removeAttribute("disabled"); ma=la;da=na;ba=ka;ea=aa;za=pa;Ba=ua;Ca=ha;ea.style.backgroundColor=y;ea.style.border=E}function T(aa,la,na,pa,ha,ka,ua,wa,Ma,Ia,Aa){function Ja(Oa,Ya){null==Ha?(La=Oa,La=/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)?PROXY_URL+"?url="+encodeURIComponent(La):TEMPLATE_PATH+"/"+La,mxUtils.get(La,mxUtils.bind(this,function(Wa){200<=Wa.getStatus()&&299>=Wa.getStatus()&&(Ha=Wa.getText());Ya(Ha,La)}))):Ya(Ha,La)}function Na(Oa,Ya){if(null==aa||A||b.sidebar.currentElt==ra)b.sidebar.hideTooltip();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[e[B]])}}finally{f.getModel().endUpdate()}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(B){13==B.keyCode&&v.click()});l=document.createElement("div");l.style.marginTop="20px";l.style.textAlign="right";b.editor.cancelFirst?(l.appendChild(c),l.appendChild(v)):(l.appendChild(v),l.appendChild(c));k.appendChild(l);this.container=k},LibraryDialog=function(b,e,f,c,k,l){function x(T){for(T=document.elementFromPoint(T.clientX,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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)+"px",G.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=L.substring(L.length-3,L.length)&&"!"!=L.charAt(L.length-1)&&(L+="..."),G.innerHTML=L,H.appendChild(G),u.status=G),this.pause=mxUtils.bind(this,function(){var T=function(){};this.active&&(T=mxUtils.bind(this,function(){this.spin(H,L)}));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
J.translate(Math.floor((1-q.x)/C),Math.floor((1-q.y)/C));J.scale(1/C);var O=0,S=J.save;J.save=function(){O++;S.apply(this,arguments)};var K=J.restore;J.restore=function(){O--;K.apply(this,arguments)};var R=p.drawShape;p.drawShape=function(m){mxLog.debug("entering shape",m,O);R.apply(this,arguments);mxLog.debug("leaving shape",m,O)};p.drawState(k.getView().getState(k.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",O)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
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
J.translate(Math.floor((1-q.x)/C),Math.floor((1-q.y)/C));J.scale(1/C);var O=0,S=J.save;J.save=function(){O++;S.apply(this,arguments)};var K=J.restore;J.restore=function(){O--;K.apply(this,arguments)};var R=p.drawShape;p.drawShape=function(m){mxLog.debug("entering shape",m,O);R.apply(this,arguments);mxLog.debug("leaving shape",m,O)};p.drawState(k.getView().getState(k.model.root),J);mxLog.show();mxLog.debug(mxUtils.getXml(F));mxLog.debug("stateCounter",O)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
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
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||v():v()});g?d():this.handleError(H,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else v();return u};EditorUi.prototype.getHashValueForPages=function(d,g){var n=0,t=new mxGraphModel,u=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var v=0;v<d.length;v++){this.updatePageRoot(d[v]);var B=d[v].node.cloneNode(!1);B.removeAttribute("name");t.root=d[v].root; var H=u.encode(t);this.editor.graph.saveViewState(d[v].viewState,H,!0);H.removeAttribute("pageWidth");H.removeAttribute("pageHeight");B.appendChild(H);null!=g&&(g.eltCount+=B.getElementsByTagName("*").length,g.nodeCount+=B.getElementsByTagName("mxCell").length);n=(n<<5)-n+this.hashValue(B,function(L,G,T,p){return!p||"mxGeometry"!=L.nodeName&&"mxPoint"!=L.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?p&&"mxCell"==L.nodeName&&"previous"==G?null:T:Math.round(T)},g)<<0}return n};EditorUi.prototype.hashValue=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
u?4E3:3E4);G=!0}return G};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,n,t){d=d.toDataURL("image/"+n);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<t&&(d=Editor.writeGraphModelToPng(d,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
Editor.createRoughCanvas=function(m){var A=rough.canvas({getContext:function(){return m}});A.draw=function(M){var Q=M.sets||[];M=M.options||this.getDefaultOptions();for(var U=0;U<Q.length;U++){var W=Q[U];switch(W.type){case "path":null!=M.stroke&&this._drawToContext(m,W,M);break;case "fillPath":this._drawToContext(m,W,M);break;case "fillSketch":this.fillSketch(m,W,M)}}};A.fillSketch=function(M,Q,U){var W=m.state.strokeColor,P=m.state.strokeWidth,V=m.state.strokeAlpha,X=m.state.dashed,Y=U.fillWeight; 0>Y&&(Y=U.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(U.fill||"");m.setStrokeWidth(Y);m.setDashed(!1);this._drawToContext(M,Q,U);m.setDashed(X);m.setStrokeWidth(P);m.setStrokeColor(W);m.setStrokeAlpha(V)};A._drawToContext=function(M,Q,U){M.begin();for(var W=0;W<Q.ops.length;W++){var P=Q.ops[W],V=P.data;switch(P.op){case "move":M.moveTo(V[0],V[1]);break;case "bcurveTo":M.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":M.lineTo(V[0],V[1])}}M.end();"fillPath"===Q.type&& U.filled?M.fill():M.stroke()};return A};(function(){function m(W,P,V){this.canvas=W;this.rc=P;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
parentChildSpacing:parseInt(M.value),siblingSpacing:parseInt(Q.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(U,null,2))});K.className="geBtn";S=new CustomDialog(c,S,function(){null==C&&(C=2);c.loadOrgChartLayouts(O)},null,null,null,K);c.showDialog(S.container,355,140,!0,!0)},q,null,l());p.addSeparator(q);p.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var C=new mxParallelEdgeLayout(k);C.checkOverlap=!0;c.prompt(mxResources.get("spacing"),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(C){z=C};this.setAutoScroll=function(C){N=C};this.setOpenFill=function(C){I=C};this.setStopClickEnabled=function(C){n=C};this.setSelectInserted=function(C){t=C};this.setSmoothing=function(C){f=C};this.setPerfectFreehandMode=function(C){v=C};this.isPerfectFreehandMode=function(){return v};this.setBrushSize=function(C){u.size=C};this.getBrushSize=function(){return u.size};var B=function(C){g=C;b.getRubberband().setEnabled(!C);b.graphHandler.setSelectEnabled(!C);b.graphHandler.setMoveEnabled(!C); b.container.style.cursor=C?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){B(!0)};this.isDrawing=function(){return g};var H=mxUtils.bind(this,function(C){if(c){var J=y.length,F=n&&0<x.length&&null!=y&&2>y.length;F||x.push.apply(x,y);y=[];x.push(null);k.push(c);c=null;(F||z)&&this.stopDrawing();z&&(!F||2<=J)&&this.startDrawing();mxEvent.consume(C)}}),L=new mxCell;L.edge=!0;var G=function(){var C=b.getCurrentCellStyle(L);C=mxUtils.getValue(b.currentVertexStyle,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=n)for(u=0;u<n.length;u++)g.model.execute(new ChangePage(this,n[u],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,n,t,u,v,B,H,L,G,T){g=null!=g?g:this.editor.graph;u=null!=u?u:!1;L=null!=L?L:!0;T=null!=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
l))}catch(u){k(u)}}),k)}),k)):c(new GitHubFile(this.ui,f,{org:E,repo:D,ref:z,name:e,path:N,sha:d,isNew:!0})):k()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,k){var l=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(x){l();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){k()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
if(null!=A&&0<A.length){var W=document.createElement("script");W.setAttribute("type","text/javascript");W.setAttribute("src",m);A[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var A="",M=[""],Q=0,U=!0,W;m=$jscomp.makeIterator(m);for(W=m.next();!W.done;W=m.next())W=W.value,'"'===W?(U&&W===A&&(M[Q]+=W),U=!U):","===W&&U?W=M[++Q]="":M[Q]+=W,A=W;return M}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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==u&&t()}),300)}),10)};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():E.apply(this,arguments)};var D=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;if("1"!=urlParams.embedInline){var 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
preview:aa.getAttribute("preview"),clibs:ha,tags:aa.getAttribute("tags")};ka.push(ha);null!=na&&(ka=va[pa],null==ka&&(ka={},va[pa]=ka),pa=ka[na],null==pa&&(pa=[],ka[na]=pa),pa.push(ha))}aa=aa.nextSibling}K.stop();p()}})};C.appendChild(qa);C.appendChild(ta);C.appendChild(fa);var Ua=!1,ja=z;/^https?:\/\//.test(ja)&&!b.editor.isCorsEnabledForUrl(ja)&&(ja=PROXY_URL+"?url="+encodeURIComponent(ja));K.spin(fa);null!=t?t(function(aa,la){Ea=aa;V=Da=la;Va()},Va):Va();P=sa}mxEvent.addListener(O,"keypress",function(aa){b.dialog.container.firstChild==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
p.setBackgroundImage(J.viewState.backgroundImage);p.getGlobalVariable=function(F){return"page"==F&&null!=J?J.getName():"pagenumber"==F?1:C.apply(this,arguments)};document.body.appendChild(p.container);null!=J&&p.model.setRoot(J.root)}}B=null!=B?B:this.getXmlFileData(u,v,G,T);L=null!=L?L:this.getCurrentFile();d=this.createFileData(B,p,L,window.location.href,d,g,n,t,u,H,G);p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);return d};EditorUi.prototype.getHtml=function(d,g,n,t,u,v){v=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
v.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return n.checked?"blank"===v.value?"_blank":u:null},getEditInput:function(){return n},getEditSelect:function(){return v}}};EditorUi.prototype.addLinkSection=function(d,g){function n(){var H=document.createElement("div");H.style.width="100%";H.style.height="100%";H.style.boxSizing="border-box";null!=v&&v!=mxConstants.NONE?(H.style.border="1px solid black",H.style.backgroundColor=v):(H.style.backgroundPosition="center center", H.style.backgroundRepeat="no-repeat",H.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");B.innerText="";B.appendChild(H)}mxUtils.write(d,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var u=document.createElement("option");u.setAttribute("value","auto");mxUtils.write(u,mxResources.get("automatic"));t.appendChild(u);u=document.createElement("option");
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"cells",[J])),b.fireEvent(new mxEventObject("freehandInserted","cell",J))}finally{b.model.endUpdate()}t&&b.setSelectionCells([J])}}for(J=0;J<k.length;J++)k[J].parentNode.removeChild(k[J]);c=null;k=[];x=[]}B(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(C,J){C=J.getProperty("eventName");J=J.getProperty("event");C==mxEvent.MOUSE_MOVE&&g&&(null!=J.sourceState&&J.sourceState.setCursor("crosshair"),J.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(C,J){if(b.isEnabled()&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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 m=document.createElement("img");m.setAttribute("src",Sidebar.prototype.searchImage);m.setAttribute("title",mxResources.get("preview"));m.className="geActiveButton";m.style.position="absolute";m.style.cursor="default";m.style.padding="8px";m.style.right="0px";m.style.top="0px";var A=!1,M=null,Q=!1;if(N||I){var U=[],W=null,P=null,V=null,X=function(aa){R.setAttribute("disabled","disabled");for(var la=0;la<U.length;la++)U[la].className=la==aa?"geBtn gePrimaryBtn":"geBtn"};J=!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(m,A){for(var M=0;M<A.length;M++){var Q=A[M],U;for(U in Q)this.updateCustomLinkAction(m,Q[U],"cells"),this.updateCustomLinkAction(m,Q[U],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,A,M){if(null!=A&&null!=A[M]){for(var Q=[],U=0;U<A[M].length;U++)if("*"==A[M][U])Q.push(A[M][U]);else{var W=m[A[M][U]];null!=W?""!=W&&Q.push(W):Q.push(A[M][U])}A[M]=Q}};Graph.prototype.getCellsForAction=function(m,A){A=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,A));
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxUtils.bind(this,function(ba){this.cachedFonts[X]=ba;Q--;U()}),mxUtils.bind(this,function(ba){Q--;U()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[m].substring(0,W)),P)}U()}else A(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&& (m[A]=Graph.fontMapping[A]);return m};Editor.prototype.embedExtFonts=function(m){var A=this.graph.getCustomFonts();if(0<A.length){var M=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(M.join(""),m)}),W=0;W<A.length;W++)mxUtils.bind(this,function(P,V){Graph.isCssFontUrl(V)?null==this.cachedGoogleFonts[V]?(Q++,this.loadUrl(V,mxUtils.bind(this,function(X){this.cachedGoogleFonts[V]=X;M.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
K.spin(fa);var la=function(na,pa,ha){S=0;K.stop();Ga=na;ha=ha||{};var ka=0,ua;for(ua in ha)ka+=ha[ua].length;if(pa)fa.innerText=pa;else if(0==na.length&&0==ka)fa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(fa.innerText="",0<ka){ta.style.display="";fa.style.left="160px";ta.innerText="";Da=0;sa={"draw.io":na};for(ua in ha)sa[ua]=ha[ua];p()}else v(!0)};aa?I(Z.value,la):N(la)};N&&(q=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){Y()}),n.appendChild(q),U.push(q));
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
retry:k})}),mxUtils.bind(this,function(){l&&(window.onGitLabCallback=null,l=!1,c({message:mxResources.get("accessDenied"),retry:k}))}))});k()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,k){var l=mxUtils.bind(this,function(y){var E=!0,D=window.setTimeout(mxUtils.bind(this,function(){E=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),z=this.authToken+" "+b;e.setRequestHeaders=function(N,I){N.setRequestHeader("Authorization", z);N.setRequestHeader("PRIVATE_TOKEN",z);N.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(D);if(E)if(200<=e.getStatus()&&299>=e.getStatus()||k&&404==e.getStatus())f(e);else if(401===e.getStatus())y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){l(!0)},c);else if(403===e.getStatus()){var N=!1;try{var I=JSON.parse(e.getText());null!=I&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
R){k(R)},300),mouseUp:function(K,R){k(R)}};z.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(K,R){K=function(M){return null!=M?M.id:null};var m=null!=b.currentPage?b.currentPage.getId():null,A=R.getProperty("added");R=R.getProperty("removed");c("selectionChange",{pageId:m,removed:A?A.map(K):[],added:R?
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
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
var BackgroundImageDialog=function(b,e,f,c,k){function l(){null==C||C==mxConstants.NONE?(q.style.display="none",T.checked=!1):(q.style.backgroundColor=C,q.style.display="",T.checked=!0)}var x=b.editor.graph,y=document.createElement("div");y.style.whiteSpace="nowrap";var E=document.createElement("h2");mxUtils.write(E,mxResources.get("background"));E.style.marginTop="0px";y.appendChild(E);var D=null!=f&&null!=f.originalSrc;E=!1;var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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(y):"")+(null!=u?"-latest_"+u:"")+(null!=n?"-latestRev_"+this.ui.hashValue(n.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+I,action:k,label:"user_"+N+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+d+"-patches_"+e.length+"-size_"+this.getSize()})}catch(v){}}),b)}}catch(n){}};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"checked"):(I=parseInt(O[5]),B.value=I,t.setAttribute("checked","checked"),v.style.visibility="visible"):n.setAttribute("checked","checked")):f=null}else f=null}catch(U){}d.style=g+(f?f:k());d.vertex=!0;z.addCell(d,null,null,null,null);z.selectAll();z.addListener(mxEvent.CELLS_MOVED,G);z.addListener(mxEvent.CELLS_RESIZED,G);var A=z.graphHandler.mouseUp,M=z.graphHandler.mouseDown;z.graphHandler.mouseUp=function(){A.apply(this,arguments);D.style.backgroundColor="#fff9"};z.graphHandler.mouseDown=function(){M.apply(this, arguments);D.style.backgroundColor=""};z.dblClick=function(){};var Q=z.getSelectionModel().changeSelection;z.getSelectionModel().changeSelection=function(){Q.call(this,[d],[d])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";y.appendChild(E);x.appendChild(y);var D=document.createElement("div");D.style.width="300px";D.style.height="300px";D.style.overflow="hidden";D.style.backgroundColor="#fff9";x.appendChild(D);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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(J){this.spinner.stop();try{this.saveCanvas(J,u?this.getFileData(!0,null,null,null,n,H):null,L,null==this.pages||0==this.pages.length,T)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,n,d||1,g,t,null,null,v,B,G,p,q)}catch(J){this.spinner.stop(),this.handleError(J)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"none",d.style.display="none");var t=document.createElement("option"),u=!1,v=!1,B=function(F,O){u||null!=F&&v||(N.checked?null!=O&&O(t.selected?null:d.value):""==I.value||b.isOffline()?(L.value="",G.value="",null!=O&&O("")):(I.value=mxUtils.trim(I.value),b.loadImage(I.value,function(S){L.value=S.width;G.value=S.height;null!=O&&O(I.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";G.value="";null!=O&&O(null)})))},H=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
J.evt.button};var d=N.isCellSelectable;N.isCellSelectable=function(J){return J==I?!1:d.apply(this,arguments)};N.getLinkForCell=function(){return null};var g=N.view.getState(I);z=N.getAllConnectionConstraints(g);for(var n=0;null!=z&&n<z.length;n++){var t=N.getConnectionPoint(g,z[n]);l(t.x-3,t.y-3,z[n])}N.fit(8);N.center();n=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){N.zoomIn()},20);n.setAttribute("disabled","disabled");t=b.createToolbarButton(Editor.zoomOutImage,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"#ffffff";u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var v=mxUtils.parseXml(f),B=b.editor.extractGraphModel(v.documentElement,!0),H=0,L=null,G=u.getGlobalVariable;u.getGlobalVariable=function(p){return"page"==p&&null!=L&&null!=L[H]?L[H].getAttribute("name"):"pagenumber"==p?H+1:"pagecount"==p?null!=L?L.length:1:G.apply(this,arguments)};u.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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(){null!=v&&(v(),v=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(T,p,q){H=!1;if(null!=T){if("data:image/"==T.substring(0,11)){var C=T.indexOf(",");0<C&&(T=T.substring(0,C)+";base64,"+T.substring(C+1))}y(T,null,0,0,p,q);d.scrollTop=d.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(T,p,q,C){b.saveLibrary(T,p,q,C)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=v&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
"keys",Da,"values",Qa,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function U(oa,sa,va){var Ea=mxUtils.getOffset(m,!0),Da=mxUtils.getOffset(oa,!0);sa.style.position="absolute";sa.style.left=Da.x-Ea.x+"px";sa.style.top=Da.y-Ea.y+"px";sa.style.width=oa.offsetWidth+"px";sa.style.height=oa.offsetHeight-(va?4:0)+"px";sa.style.zIndex=5}function W(oa,sa,va){var Ea=document.createElement("div");Ea.style.width="32px";Ea.style.height="4px";Ea.style.margin="2px";Ea.style.border="1px solid black"; Ea.style.background=sa&&"none"!=sa?sa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(Da){this.editorUi.pickColor(sa,function(Qa){Ea.style.background="none"==Qa?"url('"+Dialog.prototype.noColorImage+"')":Qa;Q(oa,Qa,va)});mxEvent.consume(Da)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ea);return btn}function P(oa,sa,va,Ea,Da,Qa,Fa){null!=sa&&(sa=sa.split(","),ba.push({name:oa,values:sa,type:va,defVal:Ea,countProperty:Da,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.readAsText(J)}else this.doImportVisio(J,g,H,t)}catch(O){H(O)}else try{""==C.responseType||"text"==C.responseType?H({message:C.responseText}):(F=new FileReader,F.onload=function(){try{H({message:JSON.parse(F.result).Message})}catch(O){H(O)}},F.readAsText(C.response))}catch(O){H({})}});C.send(G)}else if(B.clear())try{this.doImportVisio(d,g,H,t)}catch(J){H(J)}}else H({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?L():(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
document.createElement("canvas");J.width=T;J.height=p;var F=J.toDataURL();C!==F&&(g=C,H=T,L=p)}}}catch(O){}n(g,H,L)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,n){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;g(t)};null!=n&&(t.onerror=n);t.src=d}catch(u){if(null!=n)n(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
T.preventDefault()}function D(T){T.stopPropagation();T.preventDefault();H=!1;u=x(T);if(null!=t)null!=u&&u<d.children.length?(z.splice(u>t?u-1:u,0,z.splice(t,1)[0]),d.insertBefore(d.children[t],d.children[u])):(z.push(z.splice(t,1)[0]),d.appendChild(d.children[t]));else if(0<T.dataTransfer.files.length)b.importFiles(T.dataTransfer.files,0,0,b.maxImageSize,L(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var p=decodeURIComponent(T.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(p)|| /(\.png)($|\?)/i.test(p)||/(\.gif)($|\?)/i.test(p)||/(\.svg)($|\?)/i.test(p))&&b.loadImage(p,function(q){y(p,null,0,0,q.width,q.height);d.scrollTop=d.scrollHeight})}T.stopPropagation();T.preventDefault()}var z=[];f=document.createElement("div");f.style.height="100%";var N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.height="40px";f.appendChild(N);mxUtils.write(N,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var I=document.createElement("input");I.setAttribute("value",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
J.evt.button};var d=N.isCellSelectable;N.isCellSelectable=function(J){return J==I?!1:d.apply(this,arguments)};N.getLinkForCell=function(){return null};var g=N.view.getState(I);z=N.getAllConnectionConstraints(g);for(var n=0;null!=z&&n<z.length;n++){var t=N.getConnectionPoint(g,z[n]);l(t.x-3,t.y-3,z[n])}N.fit(8);N.center();n=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){N.zoomIn()},20);n.setAttribute("disabled","disabled");t=b.createToolbarButton(Editor.zoomOutImage,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.getGlobalVariable=function(V){return"page"==V&&null!=D&&null!=D[z]?D[z].getAttribute("name"):"pagenumber"==V?z+1:"pagecount"==V?null!=D?D.length:1:N.apply(this,arguments)};y.getLinkForCell=function(){return null};Editor.MathJaxRender&&y.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(V,X){b.editor.graph.mathEnabled&&Editor.MathJaxRender(y.container)}));var I={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
window.console&&console.error(M,K,R)}}function k(K){if(b.shareCursorPosition&&!z.isMouseDown){var R=mxUtils.getOffset(z.container),m=z.view.translate,A=z.view.scale,M=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:M,x:Math.round((K.getX()-R.x+z.container.scrollLeft)/A-m.x),y:Math.round((K.getY()-R.y+z.container.scrollTop)/A-m.y)})}}function l(K,R){var m=null!=b.currentPage?b.currentPage.getId():null;if(null!=K&&null!=K.cursor&&null!=K.lastCursor)if(null!=K.lastCursor.hide||!b.isShowRemoteCursors()|| null!=K.lastCursor.pageId&&K.lastCursor.pageId!=m)K.cursor.style.display="none";else{m=function(){var P=Math.max(z.container.scrollLeft,Math.min(z.container.scrollLeft+z.container.clientWidth-K.cursor.clientWidth,Q)),V=Math.max(z.container.scrollTop-22,Math.min(z.container.scrollTop+z.container.clientHeight-K.cursor.clientHeight,U));W.style.opacity=P!=Q||V!=U?0:1;K.cursor.style.left=P+"px";K.cursor.style.top=V+"px";K.cursor.style.display=""};var A=z.view.translate,M=z.view.scale,Q=(A.x+K.lastCursor.x)* M+8,U=(A.y+K.lastCursor.y)*M-12,W=K.cursor.getElementsByTagName("img")[0];R?(mxUtils.setPrefixedStyle(K.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(W.style,"transition","all 900ms ease-out"),window.setTimeout(m,0)):(mxUtils.setPrefixedStyle(K.cursor.style,"transition",null),mxUtils.setPrefixedStyle(W.style,"transition",null),m())}}function x(K,R){try{var m=function(){if(null==g[M]){var Z=B[M];null==Z&&(Z=N%d.length,B[M]=Z,N++);var da=d[Z];Z=11<Z?"black":"white";g[M]={cursor: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
Editor.createRoughCanvas=function(m){var A=rough.canvas({getContext:function(){return m}});A.draw=function(M){var Q=M.sets||[];M=M.options||this.getDefaultOptions();for(var U=0;U<Q.length;U++){var W=Q[U];switch(W.type){case "path":null!=M.stroke&&this._drawToContext(m,W,M);break;case "fillPath":this._drawToContext(m,W,M);break;case "fillSketch":this.fillSketch(m,W,M)}}};A.fillSketch=function(M,Q,U){var W=m.state.strokeColor,P=m.state.strokeWidth,V=m.state.strokeAlpha,X=m.state.dashed,Y=U.fillWeight; 0>Y&&(Y=U.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(U.fill||"");m.setStrokeWidth(Y);m.setDashed(!1);this._drawToContext(M,Q,U);m.setDashed(X);m.setStrokeWidth(P);m.setStrokeColor(W);m.setStrokeAlpha(V)};A._drawToContext=function(M,Q,U){M.begin();for(var W=0;W<Q.ops.length;W++){var P=Q.ops[W],V=P.data;switch(P.op){case "move":M.moveTo(V[0],V[1]);break;case "bcurveTo":M.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":M.lineTo(V[0],V[1])}}M.end();"fillPath"===Q.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
null!=I.errors&&0<I.errors.length&&(N="too_large"==I.errors[0].code)}catch(d){}c({message:mxResources.get(N?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(N){window.clearTimeout(D);E&&c(N)}))}),x=mxUtils.bind(this,function(y){null==this.user?this.updateUser(function(){x(!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
Q(!1)}),ea.className="geBtn",A.appendChild(ea));ea=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){m.hideDialog();Q(!0)});ea.className="geBtn gePrimaryBtn";A.appendChild(ea);m.editor.cancelFirst||A.appendChild(P);W.appendChild(A);this.container=W};var S=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background= this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else S.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 K=document.createElement("canvas"),R=new Image;R.onload=function(){try{K.getContext("2d").drawImage(R,0,0);var m=K.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(A){}};R.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
g;u.onerror=n;for(var v=0;v<t.length;v++)u.objectStore(t[v]).delete(d[v])}),n)};EditorUi.prototype.getDatabaseItem=function(d,g,n,t){this.openDatabase(mxUtils.bind(this,function(u){try{t=t||"objects";var v=u.transaction([t],"readonly").objectStore(t).get(d);v.onsuccess=function(){g(v.result)};v.onerror=n}catch(B){null!=n&&n(B)}}),n)};EditorUi.prototype.getDatabaseItems=function(d,g,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";var u=t.transaction([n],"readonly").objectStore(n).openCursor(IDBKeyRange.lowerBound(0)),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
P[X[Z]]&&Y++;Y=Y==W}Y&&(1!=Q||this.isCellVisible(A[V]))&&U.push(A[V])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var A=null,M=[],Q=0;Q<m.length;Q++){var U=this.getTagsForCell(m[Q]);M=[];if(0<U.length){U=U.split(" ");for(var W={},P=0;P<U.length;P++)if(null==A||null!=A[U[P]])W[U[P]]=!0,M.push(U[P]);A=W}else return[]}return M};Graph.prototype.getTagsForCells=function(m){for(var A=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
}finally{g.getModel().endUpdate()}v&&(g.setSelectionCell(n),g.scrollCellToVisible(n))}};f=mxUtils.button(mxResources.get("preview"),function(){d(z,N,!1)});f.className="geBtn";E.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){d(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";E.appendChild(f);b.editor.cancelFirst||E.appendChild(k);y.appendChild(E);x.appendChild(y);l.appendChild(x);this.container=l},CustomDialog=function(b,e,f,c,k,l,x,y,E,D,z,N){var I=document.createElement("div"); I.appendChild(e);var d=document.createElement("div");d.style.marginTop=null!=N?N:"30px";d.style.textAlign="center";null!=x&&d.appendChild(x);b.isOffline()||null==l||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(l)}),e.className="geBtn",d.appendChild(e));E=mxUtils.button(E||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});E.className="geBtn";y&&(E.style.display="none");b.editor.cancelFirst&&d.appendChild(E);k=mxUtils.button(k||mxResources.get("ok"),mxUtils.bind(this, function(){D||b.hideDialog(null,null,this.container);if(null!=f){var g=f();if("string"===typeof g){b.showError(mxResources.get("error"),g);return}}D&&b.hideDialog(null,null,this.container)}));d.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||d.appendChild(E);if(null!=z)for(y=0;y<z.length;y++)(function(g,n,t){g=mxUtils.button(g,function(u){n(u)});null!=t&&g.setAttribute("title",t);g.className="geBtn";d.appendChild(g)})(z[y][0],z[y][1],z[y][2]);I.appendChild(d);this.cancelBtn= E;this.okButton=k;this.container=I},TemplatesDialog=function(b,e,f,c,k,l,x,y,E,D,z,N,I,d,g){function n(ja){ta.innerText=ja;ta.style.display="block";setTimeout(function(){ta.style.display="none"},4E3)}function t(){null!=A&&(A.style.fontWeight="normal",A.style.textDecoration="none",M=A,A=null)}function u(ja,aa,la,na,pa,ha,ka){if(-1<ja.className.indexOf("geTempDlgRadioBtnActive"))return!1;ja.className+=" geTempDlgRadioBtnActive";K.querySelector(".geTempDlgRadioBtn[data-id="+na+"]").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
null,M),0<Q.length&&(m=mxUtils.parseXml(Q),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(Q=m.getAttribute("content"),null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(cont,Q))),null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q)),null!=Q&&0<Q.length)m=mxUtils.parseXml(Q).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||A||(U=null,"diagram"==m.nodeName?U=m:"mxfile"==m.nodeName&&(Q=m.getElementsByTagName("diagram"),0< Q.length&&(U=Q[Math.max(0,Math.min(Q.length-1,urlParams.page||0))])),null!=U&&(m=Editor.parseDiagramNode(U,M)));null==m||"mxGraphModel"==m.nodeName||A&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,A){var M=mxUtils.trim(mxUtils.getTextContent(m)),Q=null;0<M.length?(m=Graph.decompress(M,null,A),null!=m&&0<m.length&&(Q=mxUtils.parseXml(m).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(Q=mxUtils.createXmlDocument(),Q.appendChild(Q.importNode(m[0],!0)),Q=Q.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;B=mxUtils.button("",mxUtils.bind(this,function(H){this.pickColor(v||"none",function(L){v=L;n()});mxEvent.consume(H)}));n();B.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";B.style.marginLeft="4px";B.style.height="22px";B.style.width="22px";B.style.position="relative";B.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";B.className="geColorBtn";d.appendChild(B);mxUtils.br(d);return{getColor:function(){return v},getTarget:function(){return t.value},focus:function(){t.focus()}}};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
!1,!0)}finally{L.model.endUpdate()}}}catch(R){if(u)throw R;this.handleError(R)}return H};EditorUi.prototype.updatePageLinks=function(d,g){for(var n=0;n<g.length;n++)this.updatePageLinksForCell(d,g[n].root),null!=g[n].viewState&&this.updateBackgroundPageLink(d,g[n].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var n=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=n&&(g.originalSrc="data:page/id,"+ n)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(d,g){var n=document.createElement("div"),t=this.editor.graph,u=t.getLinkForCell(g);null!=u&&t.setLinkForCell(g,this.updatePageLink(d,u));if(t.isHtmlLabel(g)){n.innerHTML=Graph.sanitizeHtml(t.getLabel(g));for(var v=n.getElementsByTagName("a"),B=!1,H=0;H<v.length;H++)u=v[H].getAttribute("href"),null!=u&&(v[H].setAttribute("href",this.updatePageLink(d,u)),B=!0);B&&t.labelChanged(g,n.innerHTML)}for(H=0;H<t.model.getChildCount(g);H++)this.updatePageLinksForCell(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
K)):(m.noP2PMapDel=!0,m.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",K))});m.on("close",function(){m.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",K),D(u[K]),delete G[K])});m.on("data",x);return L[K]=m}}function E(K,R){D(R||u[K]);null!=K&&(delete u[K],v[K]=!1)}function D(K){var R=g[K];if(null!=R){var m=R.selection,A;for(A in m)null!=m[A]&&m[A].destroy();null!=R.cursor&&null!=R.cursor.parentNode&&R.cursor.parentNode.removeChild(R.cursor);clearTimeout(R.inactiveTO);delete g[K]}}
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(B,null,null,I,d,g)):(B=b.convertDataUri(B),H=null==H?120:H,L=null==L?100:L,b.hideDialog(),c(B,H,L,I,d,g))},t=function(B,H){if(null!=B){var L=k?null:D.getModel().getGeometry(D.getSelectionCell());null!=L?n(B,L.width,L.height,H):n(B,null,null,H)}else b.hideDialog(),c(null)};this.init=function(){N.focus();if(Graph.fileSupport){N.setAttribute("placeholder",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.readAsText(J)}else this.doImportVisio(J,g,H,t)}catch(O){H(O)}else try{""==C.responseType||"text"==C.responseType?H({message:C.responseText}):(F=new FileReader,F.onload=function(){try{H({message:JSON.parse(F.result).Message})}catch(O){H(O)}},F.readAsText(C.response))}catch(O){H({})}});C.send(G)}else if(B.clear())try{this.doImportVisio(d,g,H,t)}catch(J){H(J)}}else H({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?L():(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
EditorUi.debug("P2PCollab:","sendReply error",arguments,m)}});this.sendMessage=c;this.sendDiff=function(K){this.sendMessage("diff",{diff:K})};this.getState=function(){return null!=I?I.readyState:3};this.getLastError=function(){return O};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(K,R){},mouseMove:function(K,R){var m,A=-1;return function(){clearTimeout(m);var M=this,Q=arguments,U=function(){m=null;A=Date.now();K.apply(M,Q)};Date.now()-A>R?U():m=setTimeout(U,R)}}(function(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
B.appendChild(C);var J=document.createElement("div");J.style.marginTop="10px";if(l){var F=function(R,m,A,M,Q){if(null==Q||"1"!=Q.html)return M=R.toLowerCase().indexOf(m,M),0>M?R:R.substr(0,M)+A+R.substr(M+m.length);var U=R;m=mxUtils.htmlEntities(m);Q=[];var W=-1;for(R=R.replace(/<br>/ig,"\n");-1<(W=R.indexOf("<",W+1));)Q.push(W);W=R.match(/<[^>]*>/g);R=R.replace(/<[^>]*>/g,"");M=R.toLowerCase().indexOf(m,M);if(0>M)return U;U=M+m.length;A=mxUtils.htmlEntities(A);R=R.substr(0,M)+A+R.substr(U);for(var P= 0,V=0;V<Q.length;V++){if(Q[V]-P<M)R=R.substr(0,Q[V])+W[V]+R.substr(Q[V]);else{var X=Q[V]-P<U?M+P:Q[V]+(A.length-m.length);R=R.substr(0,X)+W[V]+R.substr(X)}P+=W[V].length}return R.replace(/\n/g,"<br>")},O=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=n&&null!=I){var R=I.cell,m=z.getLabel(R);z.isCellEditable(R)&&z.model.setValue(R,F(m,n,L.value,t-n.length,z.getCurrentCellStyle(R)));H.style.backgroundColor=E(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(A){b.handleError(A)}});
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
!1;l.connectionHandler.createEdgeState=function(n){n=l.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,n,this.graph.getCellStyle(n))};var y=l.getDefaultParent(),E=mxUtils.bind(this,function(n){var t=new mxCellOverlay(this.connectImage,"Add outgoing");t.cursor="hand";t.addListener(mxEvent.CLICK,function(u,v){l.connectionHandler.reset();l.clearSelection();var B=l.getCellGeometry(n),H;N(function(){H=l.insertVertex(y,null,"Entry",B.x,B.y,80,30,"rounded=1;");E(H);l.view.refresh(H);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxEvent.getClientX(C),mxEvent.getClientY(C))},p=function(C){for(d.push(C);d.length>f;)d.shift()},q=function(C){var J=d.length;if(1===J%2||J>=f){var F=0,O=0,S,K=0;for(S=C;S<J;S++)K++,C=d[S],F+=C.x,O+=C.y;return{x:F/K,y:O/K}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(K,R){try{if(!q){var m=e.file.getCurrentUser();if(p&&null!=m&&null!=m.displayName){var A={from:H,id:n,type:K,sessionId:e.clientId,userId:m.id,username:m.displayName,data:R,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};A={bytes:e.objectToString(A),data:"aes"};A=JSON.stringify(A);C&&"cursor"!=K&&EditorUi.debug("P2PCollab: sending to socket server",[A]);n++;m=!C&&("cursor"==K||"selectionChange"==K);T&&!m&&S("message",A);if(m)for(p2pId in G)G[p2pId].send(A)}}}catch(M){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
v.scrollCellToVisible(v.getSelectionCell())}}}else{J=function(K){var R=O[K];null==R&&(R=new mxCell(K,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),R.vertex=!0,O[K]=R,G.push(R));return R};var O={};G=[];for(H=0;H<t.length;H++)if(";"!=t[H].charAt(0)){var S=t[H].split("->");2<=S.length&&(C=J(S[0]),F=J(S[S.length-1]),S=new mxCell(2<S.length?S[1]:"",new mxGeometry),S.edge=!0,C.insertEdge(S,!0),F.insertEdge(S,!1),G.push(S))}if(0<G.length){t=document.createElement("div");t.style.visibility="hidden";
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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",B,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript("js/extensions.min.js",B,null,null,null,v))}),t)};EditorUi.prototype.createMermaidXml=function(d,g,n,t,u){var v=new Graph(document.createElement("div")); n=v.insertVertex(null,null,null,0,0,t,u,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+n+";");v.setAttributeForCell(n,"mermaidData",JSON.stringify({data:d,config:g},null,2));d=(new mxCodec).encode(v.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,n){var t=0,u=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.createTimeout(4E4,mxUtils.bind(this,function(v){EditorUi.logEvent({category:"OPENAI-DIAGRAM",
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var k=this.ui.editor.undoManager,l=k.history.slice(),x=k.indexOfNextAdd,y=this.ui.editor.graph;y.container.style.visibility="hidden";var E=this.changeListenerEnabled;this.changeListenerEnabled=f;var D=y.foldingEnabled,z=y.mathEnabled,N=y.cellRenderer.redraw;y.cellRenderer.redraw=function(I){I.view.graph.isEditing(I.cell)&&(I.view.graph.scrollCellToVisible(I.cell),I.view.graph.cellEditor.resize());N.apply(this,arguments)};y.model.beginUpdate();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.nodeName&&(B=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{v.endUpdate()}null!=B&&this.chromelessResize&&this.chromelessResize(!0,B)}return n};EditorUi.prototype.getCopyFilename=function(d,g){var n=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var t=n.lastIndexOf(".");0<=t&&(d=n.substring(t),n=n.substring(0,t));if(g){g=n;var u=new Date;n=u.getFullYear();t=u.getMonth()+1;var v=u.getDate(),B=u.getHours(),H=u.getMinutes();u=u.getSeconds(); n=g+(" "+(n+"-"+t+"-"+v+"-"+B+"-"+H+"-"+u))}return n=mxResources.get("copyOf",[n])+d};EditorUi.prototype.fileLoaded=function(d,g,n){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var u=!1;this.hideDialog();null!=t&&(EditorUi.debug("File.closed",[t]),t.removeListener(this.descriptorChangedListener),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var v=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.w,e.h,e,e.aspect,e.title);mxEvent.addListener(d,"dragleave",function(T){g.style.cursor="";for(var p=mxEvent.getSource(T);null!=p;){if(p==d||p==g){T.stopPropagation();T.preventDefault();break}p=p.parentNode}});var L=function(T){return function(p,q,C,J,F,O,S,K,R){null!=R&&(/(\.v(dx|sdx?))($|\?)/i.test(R.name)||/(\.vs(x|sx?))($|\?)/i.test(R.name))?b.importVisio(R,mxUtils.bind(this,function(m){y(m,q,C,J,F,O,S,"fixed",mxEvent.isAltDown(T)?null:S.substring(0,S.lastIndexOf(".")).replace(/_/g," "))})): null!=R&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(p,R.name)?b.isExternalDataComms()?b.parseFile(R,mxUtils.bind(this,function(m){4==m.readyState&&(b.spinner.stop(),200<=m.status&&299>=m.status&&(y(m.responseText,q,C,J,F,O,S,"fixed",mxEvent.isAltDown(T)?null:S.substring(0,S.lastIndexOf(".")).replace(/_/g," ")),d.scrollTop=d.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(y(p,q,C,J,F,O,S,"fixed",mxEvent.isAltDown(T)?null:S.substring(0, S.lastIndexOf(".")).replace(/_/g," ")),d.scrollTop=d.scrollHeight)}};mxEvent.addListener(d,"dragover",E);mxEvent.addListener(d,"drop",D);mxEvent.addListener(g,"dragover",E);mxEvent.addListener(g,"drop",D);f.appendChild(d);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";N=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});N.setAttribute("id","btnCancel");N.className="geBtn";b.editor.cancelFirst&&c.appendChild(N);"draw.io"!=b.getServiceName()||
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
I.vertex=!0;N.addCell(I);N.dblClick=function(J,F){if(null!=F&&F!=I)N.setSelectionCell(F);else{F=mxUtils.convertPoint(N.container,mxEvent.getClientX(J),mxEvent.getClientY(J));mxEvent.consume(J);J=N.view.scale;var O=N.view.translate;N.setSelectionCell(l((F.x-3*J)/J-O.x,(F.y-3*J)/J-O.y))}};k=new mxKeyHandler(N);k.bindKey(46,x);k.bindKey(8,x);N.getRubberband().isForceRubberbandEvent=function(J){return 0==J.evt.button&&(null==J.getCell()||J.getCell()==I)};N.panningHandler.isForcePanningEvent=function(J){return 2==
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var A in m)this.globalVars[A]=m[A]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var B=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var A=B.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[m]); return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var H=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,A,M,Q,U,W,P,V,X,Y,Z,da,ba,ma){var ea=null,za=null,Ba=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(ea=this.stylesheet,za=this.shapeForegroundColor,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
A=mxUtils.bind(this,function(Q){f.saveLevel=9;if(Q||null==R)m(Q);else{var U=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){U=!1;I({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(W);if(U){f.saveLevel=10;try{null!=P&&P.headRevisionId==u?("1"==urlParams.test&&R!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from", R,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),R=P.etag,m(Q)):I({error:{code:412}},P)}catch(V){d(V)}}}),mxUtils.bind(this,function(P){window.clearTimeout(W);U&&(f.saveLevel=11,I(P))}))}});if(v&&null==T){f.saveLevel=8;var M=new Image;M.onload=mxUtils.bind(this,function(){try{var Q=this.thumbnailWidth/M.width,U=document.createElement("canvas");U.width=this.thumbnailWidth;U.height=Math.floor(M.height*Q);U.getContext("2d").drawImage(M,0,0,U.width,U.height);var W=U.toDataURL();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
Ha.substring(Ha.indexOf(",")+1);Sa.style.cursor="pointer";Sa.style.width="100%";Sa.style.height="100%";na.appendChild(Sa);ra=b.createMermaidXml("%% Input: "+Na+"\n"+ra,EditorUi.defaultMermaidConfig,Ha,La,Xa);var Ta="<mxfile><diagram>"+Graph.compress(ra)+"</diagram></mxfile>";if(Ia||"undefined"===typeof mxMermaidToDrawio)ca=ma=ra;ra=m.cloneNode(!0);na.appendChild(ra);Ha=function(Pa){Q=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};La=function(Pa){Q||B(Ta,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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 X=this.fill,Y=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,da=W.setStrokeColor;W.setStrokeColor=function(){};var ba=W.setFillColor;W.setFillColor=function(){};V||null==X||(this.configurePointerEvents=function(){});W.handJiggle.passThrough=!0;Q.apply(this,arguments);W.handJiggle.passThrough=!1;W.setFillColor=ba;W.setStrokeColor=da;this.configurePointerEvents=Z;this.stroke=Y;this.fill=X;W.restore();V&&null!=X&&(W.addTolerance=function(){})}Q.apply(this,arguments);W.addTolerance=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.getPngFileProperties=function(d){var g=1,n=0;if(null!=d){if(d.hasAttribute("scale")){var t=parseFloat(d.getAttribute("scale"));!isNaN(t)&&0<t&&(g=t)}d.hasAttribute("border")&&(t=parseInt(d.getAttribute("border")),!isNaN(t)&&0<t&&(n=t))}return{scale:g,border:n}};EditorUi.prototype.getEmbeddedPng=function(d,g,n,t,u){try{var v=this.editor.graph,B=null!=v.themes&&"darkTheme"==v.defaultThemeName,H=null;if(null!=n&&0<n.length)v=this.createTemporaryGraph(B?v.getDefaultStylesheet():v.getStylesheet()),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
f=mxUtils.button(f,c);f.insertBefore(y,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";k.appendChild(l);k.appendChild(b);k.appendChild(f);this.container=k},FontDialog=function(b,e,f,c,k){function l(B){this.style.border="";13==B.keyCode&&v.click()}var x=document.createElement("table"),y=document.createElement("tbody");x.style.marginTop="8px";var E=document.createElement("tr");var D=document.createElement("td");D.colSpan=2;D.style.whiteSpace=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
function(d){f(I.result,N)});k?I.readAsDataURL(N.fileBlob):I.readAsText(N.fileBlob)}catch(d){c(d)}}}));z["catch"](mxUtils.bind(this,function(N){window.clearTimeout(D);E&&(E=!1,null==N||500!=N.status&&400!=N.status&&401!=N.status?c({message:mxResources.get("error")+" "+N.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,y?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){x(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
38==F.keyCode?(I(O,mxConstants.DIRECTION_NORTH),mxEvent.consume(F)):39==F.keyCode?(I(O,mxConstants.DIRECTION_EAST),mxEvent.consume(F)):40==F.keyCode&&(I(O,mxConstants.DIRECTION_SOUTH),mxEvent.consume(F)))}}catch(K){d.handleError(K)}mxEvent.isConsumed(F)||G.apply(this,arguments)};var T=g.connectVertex;g.connectVertex=function(F,O,S,K,R,m,A){var M=g.getIncomingTreeEdges(F);if(c(F)){var Q=y(F),U=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,W=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST; return Q==O||0==M.length?z(F,O):U==W?D(F):E(F,O!=mxConstants.DIRECTION_NORTH&&O!=mxConstants.DIRECTION_WEST)}return T.apply(this,arguments)};g.getSubtree=function(F){var O=[F];!k(F)&&!c(F)||x(F)||g.traverse(F,!0,function(S,K){var R=null!=K&&g.isTreeEdge(K);R&&0>mxUtils.indexOf(O,K)&&O.push(K);(null==K||R)&&0>mxUtils.indexOf(O,S)&&O.push(S);return null==K||R});return O};var p=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){p.apply(this,arguments);(k(this.state.cell)||c(this.state.cell))&&
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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,0,M.length);U+=V(M.length)+A+M+V(Q^4294967295);U+=m.substring(X-8,m.length);break}U+=m.substring(X-8,X-4+Y);W(m,Y);W(m,4)}while(Y);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var y=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,A){y.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var E=ColorDialog.resetRecentColors;
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
C[S]&&(C[S]=(C[S]||0)+1,q++),J.push(O))}k.setCellStyles(mxConstants.STYLE_IMAGE,null,J);console.log("Removed",q,"image(s) from",J.length,"cell(s): ",[J,C])}finally{k.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,k.getModel())}));c.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var p=new mxImageExport,q=k.getGraphBounds(),C=k.view.scale,J=mxUtils.createXmlDocument(),F=J.createElement("output");J.appendChild(F);J=new mxXmlCanvas2D(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
0,0,80,30,"ellipse");E(D)}finally{l.getModel().endUpdate()}if("horizontalTree"==f){var z=new mxCompactTreeLayout(l);z.edgeRouting=!1;z.levelDistance=30;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(z=new mxCompactTreeLayout(l,!1),z.edgeRouting=!1,z.levelDistance=30,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(z=new mxRadialTreeLayout(l,!1),z.edgeRouting=!1,z.levelDistance=80):"verticalFlow"==f?z=new mxHierarchicalLayout(l,mxConstants.DIRECTION_NORTH):"horizontalFlow"== f?z=new mxHierarchicalLayout(l,mxConstants.DIRECTION_WEST):"circle"==f?z=new mxCircleLayout(l):(z=new mxFastOrganicLayout(l,!1),z.forceConstant=80);if(null!=z){var N=function(n,t){l.getModel().beginUpdate();try{null!=n&&n(),z.execute(l.getDefaultParent(),D)}catch(u){throw u;}finally{n=new mxMorphing(l),n.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=t&&t()})),n.startAnimation()}},I=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(n,t, u,v,B){I.apply(this,arguments);N()};l.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);N()};l.connectionHandler.addListener(mxEvent.CONNECT,function(){N()})}var d=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=k.parentNode&&(l.destroy(),k.parentNode.removeChild(k));b.hideDialog()})});d.className="geBtn";b.editor.cancelFirst&&c.appendChild(d);var g=mxUtils.button(mxResources.get("insert"),function(n){l.clearCellOverlays();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
arguments);D.style.backgroundColor=""};z.dblClick=function(){};var Q=z.getSelectionModel().changeSelection;z.getSelectionModel().changeSelection=function(){Q.call(this,[d],[d])}};E.onerror=function(){E.onload=null;E.src=Editor.errorImage};E.setAttribute("src",e);E.style.maxWidth="300px";E.style.maxHeight="300px";y.appendChild(E);x.appendChild(y);var D=document.createElement("div");D.style.width="300px";D.style.height="300px";D.style.overflow="hidden";D.style.backgroundColor="#fff9";x.appendChild(D);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.addFontCss(d,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(n){try{null!=n&&this.editor.addFontCss(d,n),g(d)}catch(t){g(d)}}))}catch(n){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,n,t,u,v,B,H,L,G,T,p,q){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var C=this.editor.graph.isSelectionEmpty();n=null!=n?n:C;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this, function(J){this.spinner.stop();try{this.saveCanvas(J,u?this.getFileData(!0,null,null,null,n,H):null,L,null==this.pages||0==this.pages.length,T)}catch(F){this.handleError(F)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){this.spinner.stop();this.handleError(J)}),null,n,d||1,g,t,null,null,v,B,G,p,q)}catch(J){this.spinner.stop(),this.handleError(J)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var C=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(F){C.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=F?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(F,O){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var 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
Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.createFontElement=function(m,A){var M=Graph.fontMapping[A];null==M&&Graph.isCssFontUrl(A)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",A)):(null==M&&(M='@font-face {\nfont-family: "'+
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
this.timeout),H=mxUtils.bind(this,function(){window.clearTimeout(B);v&&t.apply(this,arguments)}),L=mxUtils.bind(this,function(){window.clearTimeout(B);v&&u.apply(this,arguments)});n=n||{};n.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:H,error:L});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:n});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d, g){var n=mxUtils.bind(this,function(G,T){var p={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=T?p.error={errResp:T}:null!=G&&(p.resp=G);this.remoteWin.postMessage(JSON.stringify(p),"*")});try{var t=d.funtionName,u=this.remoteInvokableFns[t];if(null!=u&&"function"===typeof this[t]){if(u.allowedDomains){for(var v=!1,B=0;B<u.allowedDomains.length;B++)if(g=="https://"+u.allowedDomains[B]){v=!0;break}if(!v){n(null,"Invalid Call: "+t+" is not allowed.");return}}var H=d.functionArgs;Array.isArray(H)|| (H=[]);if(u.isAsync)H.push(function(){n(Array.prototype.slice.apply(arguments))}),H.push(function(G){n(null,G||"Unkown Error")}),this[t].apply(this,H);else{var L=this[t].apply(this,H);n([L])}}else n(null,"Invalid Call: "+t+" is not found.")}catch(G){n(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var n=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=n)try{var t=n.open("database",2);t.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
}finally{g.getModel().endUpdate()}v&&(g.setSelectionCell(n),g.scrollCellToVisible(n))}};f=mxUtils.button(mxResources.get("preview"),function(){d(z,N,!1)});f.className="geBtn";E.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){d(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";E.appendChild(f);b.editor.cancelFirst||E.appendChild(k);y.appendChild(E);x.appendChild(y);l.appendChild(x);this.container=l},CustomDialog=function(b,e,f,c,k,l,x,y,E,D,z,N){var I=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
d)}),c,this.ui.getCurrentFile()!=e?e.getData():null,I.scale,I.border)}else z(e.meta.sha,Base64.encode(e.getData()))});k?this.getSha(x,y,D,E,mxUtils.bind(this,function(I){e.meta.sha=I;N()}),c):N()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,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
"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,n=this.remoteInvokeCallbacks[g.callbackId];if(null==n)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?n.error&&n.error(d.error.errResp):n.callback&&n.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,n,t,u){var v=!0,B=window.setTimeout(mxUtils.bind(this,function(){v=!1;u({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
Ha.substring(Ha.indexOf(",")+1);Sa.style.cursor="pointer";Sa.style.width="100%";Sa.style.height="100%";na.appendChild(Sa);ra=b.createMermaidXml("%% Input: "+Na+"\n"+ra,EditorUi.defaultMermaidConfig,Ha,La,Xa);var Ta="<mxfile><diagram>"+Graph.compress(ra)+"</diagram></mxfile>";if(Ia||"undefined"===typeof mxMermaidToDrawio)ca=ma=ra;ra=m.cloneNode(!0);na.appendChild(ra);Ha=function(Pa){Q=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};La=function(Pa){Q||B(Ta,mxEvent.getClientX(Pa),mxEvent.getClientY(Pa), Sa,Na)};mxEvent.addGestureListeners(Sa,Ha,null,La);mxEvent.addGestureListeners(ra,Ha,null,La)},function(ra){b.handleError(ra)})});Ma.setAttribute("disabled","disabled");Ma.className="geBtn gePrimaryBtn";pa=function(){window.setTimeout(function(){""!=la.value?Ma.removeAttribute("disabled"):Ma.setAttribute("disabled","disabled")},0)};ka=urlParams["smart-template"];null!=ka&&"1"!=ka&&(la.value=decodeURIComponent(ka),pa(),"1"==urlParams["smart-template-generate"]&&window.setTimeout(function(){Ma.click()},
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
mxUtils.getTextContent(Z[Y]);W=b.stringToCells(Graph.decompress(A));var da=b.editor.graph.getBoundingBoxFromGeometry(W);y(null,null,0,0,0,0,{xml:A,w:da.width,h:da.height})}J=!0}}catch(ba){null!=window.console&&console.log("Error in library dialog: "+ba)}J||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){null!=window.console&&console.log("Error in library dialog: "+ba)}return null}function E(T){T.dataTransfer.dropEffect=null!=t?"move":"copy";T.stopPropagation();
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed 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.editor.loadFonts()};var x=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth= d}x.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,n=this.sketchPickerMenuElt,t=this.editor.graph;n.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var u=
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
App.prototype.createFile=function(b,e,f,c,k,l,x,y,E,D){c=y?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var z=mxUtils.bind(this,function(){this.spinner.stop()}),N=mxUtils.bind(this,function(I){z();null==I&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=I&&this.handleError(I)});try{c==App.MODE_GOOGLE&&null!=this.drive?(null== x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),this.drive.insertFile(b,e,x,mxUtils.bind(this,function(I){z();this.fileCreated(I,f,l,k,E,D)}),N)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,mxUtils.bind(this,function(I){z();this.fileCreated(I,f,l,k,E,D)}),N,!1,x):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,mxUtils.bind(this,function(I){z();this.fileCreated(I,f,l,k,E,D)}),N,!1,x):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b, e,mxUtils.bind(this,function(I){z();this.fileCreated(I,f,l,k,E,D)}),N,!1,x):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(I){z();this.fileCreated(I,f,l,k,E,D)}),N):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(I){z();this.fileCreated(I,f,l,k,E,D)}),N,!1,x):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,mxUtils.bind(this,function(I){z();this.fileCreated(I,f,l,k,E,D)}),N):!y&&c==App.MODE_DEVICE&& EditorUi.nativeFileSupport?(z(),this.showSaveFilePicker(mxUtils.bind(this,function(I,d){var g=new LocalFile(this,e,d.name,null,I,d);g.saveFile(d.name,!1,mxUtils.bind(this,function(){this.fileCreated(g,f,l,k,E,D)}),N,!0)}),mxUtils.bind(this,function(I){"AbortError"!=I.name&&N(I)}),this.createFileSystemOptions(b))):(z(),this.fileCreated(new LocalFile(this,e,b,null==c),f,l,k,E,D))}catch(I){z(),this.handleError(I)}}};
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
K.cell.id,K.text),S=!1);S||F++;O++});console.log("states checked",O,"invalid",F)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var p=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";p=new TextareaDialog(c,"Paste Data:",p,function(q){if(0<q.length)try{var C=function(K){function R(Y){if(null==X[Y]){if(X[Y]=!0,null!=M[Y]){for(;0<M[Y].length;){var Z=M[Y].pop();R(Z)}delete M[Y]}}else mxLog.debug(m+": Visited: "+Y)}var m=K.parentNode.id, A=K.childNodes;K={};for(var M={},Q=null,U={},W=0;W<A.length;W++){var P=A[W];if(null!=P.id&&0<P.id.length)if(null==K[P.id]){K[P.id]=P.id;var V=P.getAttribute("parent");null==V?null!=Q?mxLog.debug(m+": Multiple roots: "+P.id):Q=P.id:(null==M[V]&&(M[V]=[]),M[V].push(P.id))}else U[P.id]=P.id}A=Object.keys(U);0<A.length?(A=m+": "+A.length+" Duplicates: "+A.join(", "),mxLog.debug(A+" (see console)")):mxLog.debug(m+": Checked");var X={};null==Q?mxLog.debug(m+": No root"):(R(Q),Object.keys(X).length!=Object.keys(K).length&& (mxLog.debug(m+": Invalid tree: (see console)"),console.log(m+": Invalid tree",M)))};"<"!=q.charAt(0)&&(q=Graph.decompress(q),mxLog.debug("See console for uncompressed XML"),console.log("xml",q));var J=mxUtils.parseXml(q),F=c.getPagesForNode(J.documentElement,"mxGraphModel");if(null!=F&&0<F.length)try{var O=c.getHashValueForPages(F);mxLog.debug("Checksum: ",O)}catch(K){mxLog.debug("Error: ",K.message)}else mxLog.debug("No pages found for checksum");var S=J.getElementsByTagName("root");for(q=0;q<S.length;q++)C(S[q]);
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe