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
function(C){z=C};this.setAutoScroll=function(C){M=C};this.setOpenFill=function(C){I=C};this.setStopClickEnabled=function(C){n=C};this.setSelectInserted=function(C){t=C};this.setSmoothing=function(C){f=C};this.setPerfectFreehandMode=function(C){v=C};this.isPerfectFreehandMode=function(){return v};this.setBrushSize=function(C){u.size=C};this.getBrushSize=function(){return u.size};var A=function(C){g=C;b.getRubberband().setEnabled(!C);b.graphHandler.setSelectEnabled(!C);b.graphHandler.setMoveEnabled(!C);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
""),Da.value=sa,Da.style.width="96px",Da.style.borderWidth="0px",Ga.appendChild(Da)):(Ga.innerHTML=mxUtils.htmlEntities(decodeURIComponent(sa)),mxEvent.addListener(Ga,"click",mxUtils.bind(Z,function(){function Ua(){var aa=ja.value;aa=0==aa.length&&"string"!=Fa?0:aa;va.allowAuto&&(null!=aa.trim&&"auto"==aa.trim().toLowerCase()?(aa="auto",Fa="string"):(aa=parseFloat(aa),aa=isNaN(aa)?0:aa));null!=va.min&&aa<va.min?aa=va.min:null!=va.max&&aa>va.max&&(aa=va.max);aa=encodeURIComponent(("int"==Fa?parseInt(aa): aa)+"");R(oa,aa,va)}var ja=document.createElement("input");U(Ga,ja,!0);ja.value=decodeURIComponent(sa);ja.className="gePropEditor";"int"!=Fa&&"float"!=Fa||va.allowAuto||(ja.type="number",ja.step="int"==Fa?"1":"any",null!=va.min&&(ja.min=parseFloat(va.min)),null!=va.max&&(ja.max=parseFloat(va.max)));m.appendChild(ja);mxEvent.addListener(ja,"keypress",function(aa){13==aa.keyCode&&Ua()});ja.focus();mxEvent.addListener(ja,"blur",function(){Ua()})})));va.isDeletable&&(Da=mxUtils.button("-",mxUtils.bind(Z,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
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;M()}),c):M()};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)};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
B,K,R){for(var U=0;U<R;U++)m=Editor.crcTable[(m^B.charCodeAt(K+U))&255]^m>>>8;return m};Editor.crc32=function(m){for(var B=-1,K=0;K<m.length;K++)B=B>>>8^Editor.crcTable[(B^m.charCodeAt(K))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(m,B,K,R,U){function W(Z,ca){var da=X;X+=ca;return Z.substring(da,X)}function Q(Z){Z=W(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d=A)}this.spinner.stop();this.openLocalFile(d,g,t,u,null!=u?n:null)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=0;n<d.length;n++)mxUtils.bind(this,function(t){var u=new FileReader;u.onload=mxUtils.bind(this,function(v){try{this.openFileHandle(v.target.result,t.name,t,g)}catch(A){this.handleError(A)}});u.onerror=mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v);window.openFile=null});"image"!==t.type.substring(0, 5)&&"application/pdf"!==t.type||"image/svg"===t.type.substring(0,9)?u.readAsText(t):u.readAsDataURL(t)})(d[n])};EditorUi.prototype.openLocalFile=function(d,g,n,t,u){var v=this.getCurrentFile(),A=mxUtils.bind(this,function(){window.openFile=null;if(null==g&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var H=mxUtils.parseXml(d);null!=H&&(this.editor.setGraphXml(H.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,g||this.defaultFilename,n,t,u))});if(null!=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
new Image;S.onload=function(){try{var p=S.width,q=S.height;if(0==p&&0==q){var C=L.result,J=C.indexOf(","),G=decodeURIComponent(escape(atob(C.substring(J+1)))),P=mxUtils.parseXml(G).getElementsByTagName("svg");0<P.length&&(p=parseFloat(P[0].getAttribute("width")),q=parseFloat(P[0].getAttribute("height")))}n(L.result,p,q)}catch(O){t(O)}};S.src=L.result};L.onerror=function(F){t(F)}}else t(H)};A.onerror=function(H){t(H)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,n){var t=this.editor.graph,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
T){k(T)},300),mouseUp:function(N,T){k(T)}};z.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(N,T){N=function(K){return null!=K?K.id:null};var m=null!=b.currentPage?b.currentPage.getId():null,B=T.getProperty("added");T=T.getProperty("removed");c("selectionChange",{pageId:m,removed:B?B.map(N):[],added:T?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
null!=aa&&0<aa.length){var Sa=function(Oa){T.setAttribute("disabled","disabled");ra.style.backgroundColor="transparent";ra.style.border="1px solid transparent";N.spin(fa);Ja(aa,function(Ya,Wa){N.stop();null!=Ya&&(F(ra,Ya,la,null,null,Aa,Wa),Oa&&L())})};ha=Ma||TEMPLATE_PATH+"/"+aa.substring(0,aa.length-4)+".png";ra.style.backgroundImage="url("+ha+")";ra.style.backgroundPosition="center center";ra.style.backgroundRepeat="no-repeat";if(null!=na){ka=document.createElement("table");ka.setAttribute("width",
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
A.appendChild(C);var J=document.createElement("div");J.style.marginTop="10px";if(l){var G=function(T,m,B,K,R){if(null==R||"1"!=R.html)return K=T.toLowerCase().indexOf(m,K),0>K?T:T.substr(0,K)+B+T.substr(K+m.length);var U=T;m=mxUtils.htmlEntities(m);R=[];var W=-1;for(T=T.replace(/<br>/ig,"\n");-1<(W=T.indexOf("<",W+1));)R.push(W);W=T.match(/<[^>]*>/g);T=T.replace(/<[^>]*>/g,"");K=T.toLowerCase().indexOf(m,K);if(0>K)return U;U=K+m.length;B=mxUtils.htmlEntities(B);T=T.substr(0,K)+B+T.substr(U);for(var Q= 0,V=0;V<R.length;V++){if(R[V]-Q<K)T=T.substr(0,R[V])+W[V]+T.substr(R[V]);else{var X=R[V]-Q<U?K+Q:R[V]+(B.length-m.length);T=T.substr(0,X)+W[V]+T.substr(X)}Q+=W[V].length}return T.replace(/\n/g,"<br>")},P=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=n&&null!=I){var T=I.cell,m=z.getLabel(T);z.isCellEditable(T)&&z.model.setValue(T,G(m,n,L.value,t-n.length,z.getCurrentCellStyle(T)));H.style.backgroundColor=E(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(B){b.handleError(B)}});
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(U){B=null});this.isMouseInsertPoint=function(){return null!=B};var K=this.getInsertPoint;this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):K.apply(this,arguments)};var R=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var W=this.graph.getCellStyle(U);if(null!=W&&"rack"==W.childLayout){var Q=new mxStackLayout(this.graph,!1);Q.gridSize=null!=W.rackUnitSize? parseFloat(W.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Q.marginLeft=W.marginLeft||0;Q.marginRight=W.marginRight||0;Q.marginTop=W.marginTop||0;Q.marginBottom=W.marginBottom||0;Q.allowGaps=W.allowGaps||0;Q.horizontal="1"==mxUtils.getValue(W,"horizontalRack","0");Q.resizeParent=!1;Q.fill=!0;return Q}return R.apply(this,arguments)};this.updateGlobalUrlVariables()};var n=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,B){return Graph.processFontStyle(n.apply(this,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
g.getCurrentCellStyle(G).treeMoving);return P}function l(G){var P=!1;null!=G&&(G=n.getParent(G),P=g.view.getState(G),P="tree"==(null!=P?P.style:g.getCellStyle(G)).containerType);return P}function x(G){var P=!1;null!=G&&(G=n.getParent(G),P=g.view.getState(G),g.view.getState(G),P=null!=(null!=P?P.style:g.getCellStyle(G)).childLayout);return P}function y(G){G=g.view.getState(G);if(null!=G){var P=g.getIncomingTreeEdges(G.cell);if(0<P.length&&(P=g.view.getState(P[0]),null!=P&&(P=P.absolutePoints,null!= P&&0<P.length&&(P=P[P.length-1],null!=P)))){if(P.y==G.y&&Math.abs(P.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_SOUTH;if(P.y==G.y+G.height&&Math.abs(P.x-G.getCenterX())<G.width/2)return mxConstants.DIRECTION_NORTH;if(P.x>G.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function E(G,P){P=null!=P?P:!0;g.model.beginUpdate();try{var O=g.model.getParent(G),N=g.getIncomingTreeEdges(G),T=g.cloneCells([N[0],G]);g.model.setTerminal(T[0],g.model.getTerminal(N[0],
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(){b.spinner.stop();if(null==b.linkPicker){var A=b.drive.createLinkPicker();b.linkPicker=A.setCallback(function(H){LinkDialog.filePicked(H)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(A){z.value=A[0].link;z.focus()}})});null!=b.oneDrive&&y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(m,B){for(var K=0;K<B.length;K++){var R=B[K],U;for(U in R)this.updateCustomLinkAction(m,R[U],"cells"),this.updateCustomLinkAction(m,R[U],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,B,K){if(null!=B&&null!=B[K]){for(var R=[],U=0;U<B[K].length;U++)if("*"==B[K][U])R.push(B[K][U]);else{var W=m[B[K][U]];null!=W?""!=W&&R.push(W):R.push(B[K][U])}B[K]=R}};Graph.prototype.getCellsForAction=function(m,B){B=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,B));
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
G.readAsText(J)}else this.doImportVisio(J,g,H,t)}catch(P){H(P)}else try{""==C.responseType||"text"==C.responseType?H({message:C.responseText}):(G=new FileReader,G.onload=function(){try{H({message:JSON.parse(G.result).Message})}catch(P){H(P)}},G.readAsText(C.response))}catch(P){H({})}});C.send(F)}else if(A.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=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
if(null!=v.hoverIcons){var C=v.hoverIcons.update;v.hoverIcons.update=function(){A.freehand.isDrawing()||C.apply(this,arguments)}}if(null!=A.freehand){var J=A.freehand.createStyle;A.freehand.createStyle=function(V){return J.apply(this,arguments)+"sketch=0;"}}v.editor.addListener("statusChanged",mxUtils.bind(this,function(){v.setStatusText(v.editor.getStatus())}));v.setStatusText(v.editor.getStatus());var G=v.menus.get("viewZoom");if(null!=G){var P=function(V){if(mxEvent.isAltDown(V))v.hideCurrentMenu(),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
ma=la;ca=na;da=ka;ea=aa;za=pa;Ba=ua;Ca=ha;ea.style.backgroundColor=y;ea.style.border=E}function S(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||B||b.sidebar.currentElt==ra)b.sidebar.hideTooltip();
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,k,l,x){var y=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:k.file_name,path:k.file_path,html_url:y+e+"/"+f+"/blob/"+c+"/"+k.file_path,download_url:y+e+"/"+f+"/raw/"+c+"/"+k.file_path+ "?inline=false",last_commit_id:k.last_commit_id,refPos:x};k=this.getFileContent(k);return l?new GitLabLibrary(this.ui,k,e):new GitLabFile(this.ui,k,e)};GitLabClient.prototype.insertFile=function(e,f,c,k,l,x,y){l=null!=l?l:!1;x=x.split("/");this.getRefIndex(x,!0,mxUtils.bind(this,function(E,D){var z=Math.max(D-1,0),M=E.slice(0,z).join("/"),I=E[z],d=E[D];path=E.slice(D+1,E.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(M+"/"+I+"/"+d+"/"+path,!0,mxUtils.bind(this,function(g,n){g?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(k){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname? "https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,k,l){var x=mxUtils.bind(this,function(E){var D=!0,z=window.setTimeout(mxUtils.bind(this,function(){D=!1;c({code:App.ERROR_TIMEOUT,retry:y})}),this.ui.timeout),M=this.authToken+" "+b;e.setRequestHeaders=function(I,d){I.setRequestHeader("Authorization",M)};e.send(mxUtils.bind(this,function(){window.clearTimeout(z);var I=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
za,this.stylesheet=ea,this.refresh());return Ca};var L=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){L.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var F=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){F.apply(this,arguments);this.enumerationState=0};var S=mxGraphView.prototype.stateValidated;
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Editor.extractGraphModelFromXref(W));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(m){var B=m.trailer,K=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=m[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(m=m[B[1]],null!=m&&(m=m.join("\n"),K=m.substring(1,m.length-1))))));return K};Editor.extractParserError=function(m,B){var K=null;m=null!=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
var GoogleSitesDialog=function(b,e){function f(){var S=null!=F&&null!=F.getTitle()?F.getTitle():this.defaultFilename;if(H.checked&&""!=I.value){var p="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(I.value));null!=S&&(p+="&title="+encodeURIComponent(S));0<L.length&&(p+="&s="+L);""!=d.value&&"0"!=d.value&&(p+="&border="+d.value);""!=M.value&&(p+="&height="+M.value);p+="&pan="+(g.checked?"1":"0");p+="&zoom="+(n.checked?"1":"0");p+="&fit="+(A.checked?"1":"0"); p+="&resize="+(v.checked?"1":"0");p+="&x0="+Number(z.value);p+="&y0="+E;k.mathEnabled&&(p+="&math=1");u.checked?p+="&edit=_blank":t.checked&&(p+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));D.value=p}else F.constructor==DriveFile||F.constructor==DropboxFile?(p="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=I.value?p+=encodeURIComponent(mxUtils.htmlEntities(I.value))+"&type=3":(p+=F.getHash().substring(1),p=F.constructor==DropboxFile?p+"&type=2":p+"&type=1"),null!= S&&(p+="&title="+encodeURIComponent(S)),""!=M.value&&(S=parseInt(M.value)+parseInt(z.value),p+="&height="+S),D.value=p):D.value=""}var c=document.createElement("div"),k=b.editor.graph,l=k.getGraphBounds(),x=k.view.scale,y=Math.floor(l.x/x-k.view.translate.x),E=Math.floor(l.y/x-k.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var D=document.createElement("input");D.setAttribute("type","text");D.style.marginBottom="8px";D.style.marginTop="2px";D.style.width="410px";
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
v=mxEvent.getClientX(F);t.popupMenuHandler.hideMenu();mxEvent.consume(F)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(F){var S=!1;null!=v&&(this.diagramContainer.style.width=Math.max(20,H+mxEvent.getClientX(F)-v)+"px",S=!0);null!=A&&(this.diagramContainer.style.height=Math.max(20,L+mxEvent.getClientY(F)-A)+"px",S=!0);S&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}), "*"),this.inlineSizeChanged(),this.refresh())}),function(F){null==v&&null==A||mxEvent.consume(F);A=v=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";n.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(F){this.inlineSizeChanged();
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
}finally{g.getModel().endUpdate()}v&&(g.setSelectionCell(n),g.scrollCellToVisible(n))}};f=mxUtils.button(mxResources.get("preview"),function(){d(z,M,!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,M){var I=document.createElement("div"); I.appendChild(e);var d=document.createElement("div");d.style.marginTop=null!=M?M:"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,M,I,d,g){function n(ja){ta.innerText=ja;ta.style.display="block";setTimeout(function(){ta.style.display="none"},4E3)}function t(){null!=B&&(B.style.fontWeight="normal",B.style.textDecoration="none",K=B,B=null)}function u(ja,aa,la,na,pa,ha,ka){if(-1<ja.className.indexOf("geTempDlgRadioBtnActive"))return!1;ja.className+=" geTempDlgRadioBtnActive";N.querySelector(".geTempDlgRadioBtn[data-id="+na+"]").className="geTempDlgRadioBtn "+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.setVisible(!1)};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&& (this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus&&(null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null),null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null),null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null),null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null))};EditorUi.prototype.switchThemeConstants=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
F=new mxAsyncCanvas(this.thumbImageCache);L.images=this.thumbImageCache.images;var S=new mxImageExport;S.drawShape=function(p,q){p.shape instanceof mxShape&&p.shape.checkBounds()&&(q.save(),q.translate(.5,.5),p.shape.paint(q),q.translate(-.5,-.5),q.restore())};S.drawText=function(p,q){};S.drawState(x.getView().getState(x.model.root),F);F.finish(mxUtils.bind(this,function(){try{S.drawState(x.getView().getState(x.model.root),L),x!=this.editor.graph&&null!=x.container.parentNode&&x.container.parentNode.removeChild(x.container)}catch(p){M=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
for(var g=[],n=2;n<d.length;n++){var t=mxUtils.trim(d[n]);"["!=t&&"]"!=t&&"%%"!=t.substring(0,2)&&"##"!=t.substring(0,2)&&(t=d[n].replace(/[-|>]/g," "),""!=mxUtils.trim(t)&&" "==t.charAt(0)&&g.push(t))}return"mindmap\nroot(("+mxUtils.trim(d[1])+"))\n"+g.join("\n")};EditorUi.prototype.extractMermaidDeclaration=function(d){"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)"); g=mxUtils.trim(1>=g.length?d:g[1]);var n=g.split("\n");if(0<n.length&&"mermaid"==mxUtils.trim(n[0])||1<n.length&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,n[1]))n.shift(),g=mxUtils.trim(n.join("\n")),n=g.split("\n");var t=n[0].split(" ")[0].replace(/:$/,"");try{"mindmap"==t&&2<n.length&&(g=this.extractMermaidMindmap(n))}catch(u){}"@"!=t.charAt(0)&&0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,t)&&(g="classDiagram\n"+g);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",n,"\ntype:", t,"\nvalue:",d,"\ntext:",g);return g};EditorUi.prototype.generateMermaidImage=function(d,g,n,t,u){var v=mxUtils.bind(this,function(H){this.loadingMermaid=!1;null!=t?t(H):this.handleError(H)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;Editor.isDarkMode()&&(g.theme="dark");var H=mxUtils.bind(this,function(L){try{if(mxClient.IS_IE||mxClient.IS_IE11)L=L.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(K,U){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var K=x.apply(this,arguments);if(this.graph.pageVisible){var U=[],L=this.graph.pageFormat,O=this.graph.pageScale,X=L.width*O;L=L.height*O;O=this.graph.view.translate;for(var W=this.graph.view.scale,J=this.graph.getPageLayout(),ha=0;ha<J.width;ha++)U.push(new mxRectangle(((J.x+ha)*X+O.x)*W,(J.y*L+O.y)*W,X*W,L*W));for(ha=1;ha<J.height;ha++)U.push(new mxRectangle((J.x*
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
b.showDialog(S.container,450,240,!0);S.init()}else k.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(k.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var S=b.createLibraryDataFromImages(z),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(X){f.saveLevel=7;try{if(null!=X&&X.etag==T)if(M<this.staleEtagMaxRetries){M++;var Y=Math.round(2*M*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(B,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",M,"delay",Y)}else{B(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()? "":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(Z){}}else"1"==urlParams.test&&X.headRevisionId==u&&EditorUi.debug("DriveClient: Remote Etag Changed","local",T,"remote",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I(V,X)}catch(Z){d(Z)}}),mxUtils.bind(this,function(){I(V)})):I(V)}catch(X){d(X)}}}))}catch(V){d(V)}}),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"4px");null!=Z&&ma.setAttribute("title",Z);null!=ca&&(V=function(){ca.isEnabled()?(ma.removeAttribute("disabled"),ma.style.cursor="pointer"):(ma.setAttribute("disabled","disabled"),ma.style.cursor="default")},ca.addListener("stateChanged",V),A.addListener("enabledChanged",V),V());return ma}function g(V,X,Y){Y=document.createElement("div");Y.className="geMenuItem";Y.style.display="inline-block";Y.style.verticalAlign="top";Y.style.marginRight="6px";Y.style.padding="0 4px 0 4px";Y.style.height="30px"; Y.style.position="relative";Y.style.top="0px";for(var Z=0;Z<V.length;Z++)null!=V[Z]&&(V[Z].style.margin="0px",V[Z].style.boxShadow="none",Y.appendChild(V[Z]));null!=X&&mxUtils.setOpacity(Y,X);null!=v.statusContainer?H.insertBefore(Y,v.statusContainer):H.appendChild(Y);return Y}function n(){for(var V=H.firstChild;null!=V;){var X=V.nextSibling;"geMenuItem"!=V.className&&"geItem"!=V.className||V.parentNode.removeChild(V);V=X}L=H.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"FONT"==m[B].nodeName?m[B].getAttribute("face"):m[B].style.fontFamily;null!=R&&Graph.addFont(R,K)}}};Graph.processFontStyle=function(m){if(null!=m){var B=mxUtils.getValue(m,"fontSource",null);if(null!=B){var K=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);null!=K&&Graph.addFont(K,decodeURIComponent(B))}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.fileLoaded(new LocalFile(this,Q,da,!0)),null):this.importFile(Q,V,X,Y,Z,ca,da,ma,ea,C,p,q)}catch(za){return this.handleError(za),null}});v=null!=v?v:mxUtils.bind(this,function(Q){T.setSelectionCells(Q)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var B=d.length,K=B,R=[],U=mxUtils.bind(this,function(Q,V){R[Q]=V;if(0==--K){this.spinner.stop();if(null!=H)H(R);else{var X=[];T.getModel().beginUpdate();try{for(Q=0;Q<R.length;Q++){var Y=R[Q]();null!=Y&&(X=X.concat(Y))}}finally{T.getModel().endUpdate()}}v(X)}}),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
f,c,k,l){this.insertFile(e,f,c,k,!0,l,!1)};GitHubClient.prototype.insertFile=function(e,f,c,k,l,x,y){l=null!=l?l:!1;x=x.split("/");var E=x[0],D=x[1],z=x[2],M=x.slice(3,x.length).join("/");0<M.length&&(M+="/");M+=e;this.checkExists(E+"/"+D+"/"+z+"/"+M,!0,mxUtils.bind(this,function(I,d){I?l?(y||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(g){this.writeFile(E,D,z,M,g,f,d,mxUtils.bind(this,function(n){try{var t=JSON.parse(n.getText());c(this.createGitHubFile(E,D,z,t.content, l))}catch(u){k(u)}}),k)}),k)):c(new GitHubFile(this.ui,f,{org:E,repo:D,ref:z,name:e,path:M,sha:d,isNew:!0})):k()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,k){var l=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(x){l();c(x)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){k()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.ui.getEmbeddedPng(mxUtils.bind(this,function(d){z(e.meta.last_commit_id,d)}),c,this.ui.getCurrentFile()!=e?e.getData():null,I.scale,I.border)}else z(e.meta.last_commit_id,Base64.encode(e.getData()))});k?this.getFile(x+"/"+y+"/"+E+"/"+D,mxUtils.bind(this,function(I){e.meta.last_commit_id=I.meta.last_commit_id;M()}),c):M()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+ encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var k=null,l=null,x=null,y=null,E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.height="304px";var D=document.createElement("h3");mxUtils.write(D,mxResources.get(e?"selectFile":"selectFolder"));D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";E.appendChild(D);var z=document.createElement("div");z.style.whiteSpace=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
X+O.x)*W,((J.y+ha)*L+O.y)*W,X*W,L*W));K=U.concat(K)}return K};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(K,U){return null==K.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(K){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var z=this.graphHandler.getCells;this.graphHandler.getCells=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxUtils.bind(this,function(Oa){R=b.sidebar.currentElt==ra}),null,null),mxEvent.addListener(ha,"click",mxUtils.bind(this,function(Oa){R||Na(Oa,null!=na?na:pa);mxEvent.consume(Oa)})));fa.appendChild(ra);return ra}function p(){function aa(ra,Ha){ra=mxResources.get(ra,null,ra.substring(0,1).toUpperCase()+ra.substring(1));18<ra.length&&(ra=ra.substring(0,18)+"&hellip;");return ra+(null!=Ha?" ("+Ha.length+")":"")}function la(ra,Ha,La){mxEvent.addListener(Ha,"click",function(){Fa!=Ha&&(Fa.style.backgroundColor=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
libs:ja.getAttribute("libs"),clibs:ja.getAttribute("clibs"),title:ja.getAttribute("title")}),ja=ja.nextSibling;S(Fa)}});var Va=function(ja,aa,la){Ba.style.display="";Ka.stop();T=!1;if(m)m=!1;else if(aa)ea.innerText=aa;else{la=la||{};aa=0;for(var na in la)aa+=la[na].length;0==ja.length&&0==aa?ea.innerText=mxResources.get("noDiagrams"):F(ja,!1,V,0==aa?null:la)}};C(Q);var Ua=null;mxEvent.addListener(xa,"keyup",P);mxEvent.addListener(xa,"search",P);mxEvent.addListener(xa,"input",P);mxEvent.addListener(ia, "click",function(ja){H(!1,!1)});M&&mxEvent.addListener(ya,"click",function(ja){H(!1,!0)});I&&mxEvent.addListener(N.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ja){H(!0)});mxEvent.addListener(N.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();g||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
!O)if("sharepoint"==P)H("site",null,G.id,G.displayName);else if("site"==P)H("subsite",null,G.id,G.name);else{var Q=G.folder;G=G.remoteItem?G.remoteItem:G;var V=(G.parentReference?G.parentReference.driveId:null)||P,X=G.id;Q?H(V,X,null,G.name):t()}}function H(Q,V,X,Y,Z){function ca(ya){q.stop();var xa=document.createElement("table");xa.className="odFileListGrid";for(var ta=null,Ka=0,oa=0;null!=ya&&oa<ya.length;oa++){var sa=ya[oa];if(1!=ea||!sa.webUrl||0<sa.webUrl.indexOf("sharepoint.com/sites/")||0> sa.webUrl.indexOf("sharepoint.com/")){var va=sa.displayName||sa.name,Ea=mxUtils.htmlEntities(sa.description||va);ea&&(sa.folder=2==ea?{isRoot:!0}:!0);var Da=null!=sa.folder;if(!E||Da){var Qa=document.createElement("tr");Qa.className=Ka++%2?"odOddRow":"odEvenRow";var Fa=document.createElement("td");Fa.style.width="36px";var Ra=document.createElement("img");Ra.src="/images/"+(Da?"folder.png":"file.png");Ra.className="odFileImg";Fa.appendChild(Ra);Qa.appendChild(Fa);Fa=document.createElement("td");Da= document.createElement("div");Da.className="odFileTitle";Da.innerHTML=mxUtils.htmlEntities(va);Da.setAttribute("title",Ea);Fa.appendChild(Da);Qa.appendChild(Fa);xa.appendChild(Qa);null==ta&&(ta=Qa,ta.className+=" odRowSelected",G=sa,P=Q,d||e(G));(function(Ga,Va){Qa.addEventListener("dblclick",A);Qa.addEventListener("click",function(){ta!=Va&&(ta.className=ta.className.replace("odRowSelected",""),ta=Va,ta.className+=" odRowSelected",G=Ga,P=Q,d||e(G))})})(sa,Qa)}}}0==Ka?(ya=document.createElement("div"), ya.className="odEmptyFolder",ya.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),Ba.appendChild(ya)):Ba.appendChild(xa);v();O=!1}function da(ya){f(ya?ya:qa,function(xa){if(ma){var ta=xa.value||[];if(d||ea)Array.prototype.push.apply(ia,ta);else for(var Ka=0;Ka<ta.length;Ka++){var oa=ta[Ka],sa=oa.file?oa.file.mimeType:null;(oa.folder||"text/html"==sa||"text/xml"==sa||"application/xml"==sa||"image/png"==sa||/\.svg$/.test(oa.name)||/\.html$/.test(oa.name)||/\.xml$/.test(oa.name)||
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxUtils.bind(this,function(){function p(O){return null==O||null==O.boundingBox||!isNaN(O.boundingBox.x)&&!isNaN(O.boundingBox.y)&&!isNaN(O.boundingBox.width)&&!isNaN(O.boundingBox.height)}var q=k.getGraphBounds(),C=k.view.translate,J=k.view.scale;k.insertVertex(k.getDefaultParent(),null,"",q.x/J-C.x,q.y/J-C.y,q.width/J,q.height/J,"fillColor=none;strokeColor=red;");var G=0,P=0;k.view.states.visit(function(O,N){O=!0;p(N.shape)||(console.log("invalid shape",N.cell.id,N.shape),O=!1);p(N.text)||(console.log("invalid text",
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Editor.extractGraphModelFromXref(W));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(m){var B=m.trailer,K=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=m[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(m=m[B[1]],null!=m&&(m=m.join("\n"),K=m.substring(1,m.length-1))))));return K};Editor.extractParserError=function(m,B){var K=null;m=null!= m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(K=B||mxResources.get("invalidChars"),B=m[0].getElementsByTagName("div"),0<B.length&&(K=mxUtils.getTextContent(B[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(m,B){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=B))};Editor.mermaidToDrawio=function(m,B,K){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,B,K)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
return S}),F=!0);return F};var A=u.stop;u.stop=function(){A.call(this);this.active=!1;null!=u.status&&null!=u.status.parentNode&&u.status.parentNode.removeChild(u.status);u.status=null};u.pause=function(){return function(){}};return u};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),n=this.editor.extractGraphModel(g.documentElement,!0);return null!=n&&0==n.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
mxUtils.indexOf(this.hiddenTags,m[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,B,K,R){var U=[];if(null!=m){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var W=0,Q={},V=0;V<m.length;V++)0<m[V].length&&(Q[m[V]]=!0,W++);for(V=0;V<B.length;V++)if(K&&this.model.getParent(B[V])==this.model.root||this.model.isVertex(B[V])||this.model.isEdge(B[V])){var X=this.getTagsForCell(B[V]),Y=!1;if(0<X.length&&(X=X.split(" "),X.length>=m.length)){for(var Z=Y=0;Z<X.length&&Y<W;Z++)null!= Q[X[Z]]&&Y++;Y=Y==W}Y&&(1!=R||this.isCellVisible(B[V]))&&U.push(B[V])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var B=null,K=[],R=0;R<m.length;R++){var U=this.getTagsForCell(m[R]);K=[];if(0<U.length){U=U.split(" ");for(var W={},Q=0;Q<U.length;Q++)if(null==B||null!=B[U[Q]])W[U[Q]]=!0,K.push(U[Q]);B=W}else return[]}return K};Graph.prototype.getTagsForCells=function(m){for(var B=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
f.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[e[A]])}}finally{f.getModel().endUpdate()}});v.className="geBtn gePrimaryBtn";mxEvent.addListener(k,"keypress",function(A){13==A.keyCode&&v.click()});l=document.createElement("div");l.style.marginTop="20px";l.style.textAlign="right";b.editor.cancelFirst?(l.appendChild(c),l.appendChild(v)):(l.appendChild(v),l.appendChild(c));k.appendChild(l);this.container=k},LibraryDialog=function(b,e,f,c,k,l){function x(S){for(S=document.elementFromPoint(S.clientX,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.editor.graph.isEnabled()};var z=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(d){var g=z.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){g.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){g.refresh()}));return g};var M=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){M.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),n=this.getSelectionState(),
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"/sites?search=";N=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:Q}];ea=1;break;case "site":N.push({name:Y,driveId:Q,folderId:V,siteId:X});qa="/sites/"+X+"/drives";ea=2;break;case "subsite":N.push({name:Y,driveId:Q,folderId:V,siteId:X});qa="/drives/"+X+(V?"/items/"+V:"/root")+"/children";break;case "search":Q=P;N=[{driveId:Q,name:mxResources.get("back",null,"Back")}];Z=encodeURIComponent(Z.replace(/'/g,"\\'"));qa=Q?"/drives/"+Q+"/root/search(q='"+Z+"')":"/me/drive/root/search(q='"+ Z+"')";break;default:null==V?N=[{driveId:Q}]:N.push({name:Y,driveId:Q,folderId:V}),qa=(Q?"/drives/"+Q:"/me/drive")+(V?"/items/"+V:"/root")+"/children"}ea||(qa+=(0<qa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");var ia=[];da()}}function L(Q){U.className=U.className.replace("odCatSelected","");U=Q;U.className+=" odCatSelected"}function F(Q){O||(W=null,H("search",null,null,null,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
!c.isOffline()&&!c.printPdfExport){var p=null==c.pages||1>=c.pages.length,q=document.createElement("div");q.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("formatPdf"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(C);var J=function(){N!=this&&this.checked?(U.removeAttribute("disabled"),U.checked=!k.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};C=200;var G=1,P=null;if(c.pdfPageExport&&
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
I.formatElt.style.width)}function e(I,d){function g(u,v){var A=I.menus.get(u);u=n.addMenu(v,mxUtils.bind(this,function(){A.funct.apply(this,arguments)}));u.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";u.className="geTitle";d.appendChild(u);return u}var n=new Menubar(I,d);if(Editor.enableCustomLibraries&&("1"!=urlParams.embed|| "1"==urlParams.libraries))if(null!=I.actions.get("newLibrary")){var t=document.createElement("div");t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";t.className="geTitle";mxUtils.write(t,mxResources.get("newLibrary"));d.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("newLibrary").funct);t=t.cloneNode(!1); t.style.left="50%";t.style.borderLeftStyle="solid";mxUtils.write(t,mxResources.get("openLibrary"));d.appendChild(t);mxEvent.addListener(t,"click",this.actions.get("openLibrary").funct)}else t=g("newLibrary",mxResources.get("newLibrary")),t.style.fontSize="11px",t.style.left="0",t=g("openLibraryFrom",mxResources.get("openLibraryFrom")),t.style.borderLeftStyle="solid",t.style.fontSize="11px",t.style.left="50%";d.appendChild(I.sidebar.container);d.style.overflow="hidden"}function f(I,d){if(EditorUi.windowed){var g=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var B=mxUtils.indexOf(this.hiddenTags,m);0>B?this.hiddenTags.push(m):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var B=0;B<m.length;B++)if(0>
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d=G;this.confirmImageResize(function(T){J=T;N()},L)}else N()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var n=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,u=function(v,A){if(v||g)mxSettings.setResizeImages(v?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
this.defaultFonts[G];"string"===typeof P?C(P):null!=P.fontFamily&&null!=P.fontUrl&&(J[encodeURIComponent(P.fontFamily)+"@"+encodeURIComponent(P.fontUrl)]=!0,C(P.fontFamily,P.fontUrl))}p.addSeparator(q);if("1"!=urlParams["ext-fonts"]){P=function(K){var R=encodeURIComponent(K.name)+(null==K.url?"":"@"+encodeURIComponent(K.url));if(!J[R]){for(var U=K.name,W=0;null!=N[U.toLowerCase()];)U=K.name+" ("+ ++W+")";null==O[R]&&(T.push({name:K.name,url:K.url,label:U,title:K.url}),N[U.toLowerCase()]=K,O[R]=K)}};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(C){z=C};this.setAutoScroll=function(C){M=C};this.setOpenFill=function(C){I=C};this.setStopClickEnabled=function(C){n=C};this.setSelectInserted=function(C){t=C};this.setSmoothing=function(C){f=C};this.setPerfectFreehandMode=function(C){v=C};this.isPerfectFreehandMode=function(){return v};this.setBrushSize=function(C){u.size=C};this.getBrushSize=function(){return u.size};var A=function(C){g=C;b.getRubberband().setEnabled(!C);b.graphHandler.setSelectEnabled(!C);b.graphHandler.setMoveEnabled(!C);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(v){return mxEvent.getSource(v)==n?!0:u.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,g){mxSettings.setUi(d);(g=this.doSetCurrentTheme(d)||g)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(d){return""==d||"dark"==d||"default"==d||"kennedy"==d||null==d};EditorUi.prototype.doSetCurrentTheme=function(d,g,n){function t(L){return"simple"==L||0==g&&"sketch"==L}g=null!=g?g:150;var u=Editor.currentTheme,v=t(u)&&this.isDefaultTheme(d)||
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
ya.className="odEmptyFolder",ya.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),Ba.appendChild(ya)):Ba.appendChild(xa);v();O=!1}function da(ya){f(ya?ya:qa,function(xa){if(ma){var ta=xa.value||[];if(d||ea)Array.prototype.push.apply(ia,ta);else for(var Ka=0;Ka<ta.length;Ka++){var oa=ta[Ka],sa=oa.file?oa.file.mimeType:null;(oa.folder||"text/html"==sa||"text/xml"==sa||"application/xml"==sa||"image/png"==sa||/\.svg$/.test(oa.name)||/\.html$/.test(oa.name)||/\.xml$/.test(oa.name)|| /\.png$/.test(oa.name)||/\.drawio$/.test(oa.name)||/\.drawiolib$/.test(oa.name))&&ia.push(oa)}xa["@odata.nextLink"]&&1E3>ia.length?da(xa["@odata.nextLink"]):(clearTimeout(za),ca(ia))}},function(xa){if(ma){clearTimeout(za);var ta=null;try{ta=JSON.parse(xa.responseText).error.message}catch(Ka){}y(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ta?" ("+ta+")":""));O=!1;q.stop()}},null!=ya)}if(!O){g(".odCatsList").style.display="block";g(".odFilesSec").style.display="block";
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(p,"plugins",q),this.addMenuItems(p,["-","editDiagram"],q),this.addSubmenu("diagramLanguage",p,q),p.addSeparator(q),"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(p,["showStartScreen"],q),this.addMenuItems(p,["configuration"],q),p.addSeparator(q),"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function J(P){return{id:P.id,isExt:!0,url:P.downloadUrl,title:P.title,imgUrl:P.thumbnailLink,changedBy:P.lastModifyingUserName, lastModifiedOn:P.modifiedDate}}var G=new TemplatesDialog(c,function(P){console.log(arguments)},null,null,null,"user",function(P,O,N){var T=new Date;T.setDate(T.getDate()-7);c.drive.listFiles(null,T,N?!0:!1,function(m){for(var B=[],K=0;K<m.items.length;K++)B.push(J(m.items[K]));P(B)},O)},function(P,O,N,T){c.drive.listFiles(P,null,T?!0:!1,function(m){for(var B=[],K=0;K<m.items.length;K++)B.push(J(m.items[K]));O(B)},N)},function(P,O,N){c.drive.getFile(P.id,function(T){O(T.data)},N)},null,function(P){P({Test:[]},
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(B,K){if(null==K){var R=mxEvent.getSource(B);"a"==R.nodeName.toLowerCase()&&(K=R.getAttribute("href"))}null!=K&&g.isCustomLink(K)&&(mxEvent.isTouchEvent(B)||!mxEvent.isPopupTrigger(B))&&g.customLinkClicked(K)&&mxEvent.consume(B);null!=m&&m(B,K)};H.call(this,O,N,T)};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(O,N,T){g.isSelectionEmpty()&&
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
za,this.stylesheet=ea,this.refresh());return Ca};var L=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){L.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var F=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){F.apply(this,arguments);this.enumerationState=0};var S=mxGraphView.prototype.stateValidated;
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var n=g.getFunction,t=this.editor.graph,u=this;g.getFunction=function(v){if(t.isSelectionEmpty()&&null!=u.pages&&0<u.pages.length){var A= u.getSelectedPageIndex();if(mxEvent.isShiftDown(v)){if(37==v.keyCode)return function(){0<A&&u.movePage(A,A-1)};if(38==v.keyCode)return function(){0<A&&u.movePage(A,0)};if(39==v.keyCode)return function(){A<u.pages.length-1&&u.movePage(A,A+1)};if(40==v.keyCode)return function(){A<u.pages.length-1&&u.movePage(A,u.pages.length-1)}}else if(mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)){if(37==v.keyCode)return function(){0<A&&u.selectNextPage(!1)};if(38==v.keyCode)return function(){0< A&&u.selectPage(u.pages[0])};if(39==v.keyCode)return function(){A<u.pages.length-1&&u.selectNextPage(!0)};if(40==v.keyCode)return function(){A<u.pages.length-1&&u.selectPage(u.pages[u.pages.length-1])}}}return!(65<=v.keyCode&&90>=v.keyCode)||t.isSelectionEmpty()||mxEvent.isAltDown(v)||mxEvent.isShiftDown(v)||mxEvent.isControlDown(v)||mxClient.IS_MAC&&mxEvent.isMetaDown(v)?n.apply(this,arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,B,K){var R=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(R/m,R/B))};Editor.prototype.exportToCanvas=function(m,B,K,R,U,W,Q,V,X,Y,Z,ca,da,ma,ea,za,Ba,Ca){try{W=null!=W?W:!0;Q=null!=Q?Q:!0;ca=null!=ca?ca:this.graph;da=null!=da?da:0;var ba=X?null:ca.background;ba==mxConstants.NONE&&(ba=null);null==ba&&(ba=R);null==ba&&0==X&&(ba=za?this.graph.defaultPageBackgroundColor:
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
A,null,null,null,v)):mxscript("js/extensions.min.js",A,null,null,null,v))};EditorUi.prototype.generatePlantUmlImage=function(d,g,n,t){function u(H,L,F){c1=H>>2;c2=(H&3)<<4|L>>4;c3=(L&15)<<2|F>>6;c4=F&63;r="";r+=v(c1&63);r+=v(c2&63);r+=v(c3&63);return r+=v(c4&63)}function v(H){if(10>H)return String.fromCharCode(48+H);H-=10;if(26>H)return String.fromCharCode(65+H);H-=26;if(26>H)return String.fromCharCode(97+H);H-=26;return 0==H?"-":1==H?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
for(var U=R.getElementsByTagName("a"),W=!1,Q=0;Q<U.length;Q++)K=U[Q].getAttribute("href"),null!=K&&"data:action/json,"==K.substring(0,17)&&(U[Q].setAttribute("href",this.updateCustomLink(m,K)),W=!0);W&&this.labelChanged(B,R.innerHTML)}};Graph.prototype.updateCustomLink=function(m,B){if("data:action/json,"==B.substring(0,17))try{var K=JSON.parse(B.substring(17));null!=K.actions&&(this.updateCustomLinkActions(m,K.actions),B="data:action/json,"+JSON.stringify(K))}catch(R){}return B};Graph.prototype.updateCustomLinkActions=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
e+"?ref="+D;var z={Authorization:"token "+b};x=e.split("/");this.ui.convertFile(l,0<x.length?x[x.length-1]:e,null,this.extension,f,c,null,z)}else c({message:mxResources.get("accessDenied")});else x="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+y+"/"+E+"/contents/"+e+"?ref="+D+x,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(M){try{f(this.createGitHubFile(y,E,D,JSON.parse(M.getText()),k))}catch(I){c(I)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f, c,k,l){e={org:e,repo:f,ref:c,name:k.name,path:k.path,sha:k.sha,html_url:k.html_url,download_url:k.download_url};f=k.content;"base64"===k.encoding&&(/\.jpe?g$/i.test(k.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(k.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(k.name)?(k=this.ui.extractGraphModelFromPng(f),f=null!=k&&0<k.length?k:"data:image/png;base64,"+f):f=Base64.decode(f));return l?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
va,Ga=Fa+(Qa.x-Fa)/va-da,Va=Ra+(Qa.y-Ra)/va-da,Ua=new Image;Ua.onload=function(){try{for(var ja=-Math.round(Da-mxUtils.mod((Fa-Ga)*V,Da)),aa=-Math.round(Da-mxUtils.mod((Ra-Va)*V,Da));ja<ta;ja+=Da)for(var la=aa;la<Ka;la+=Da)oa.drawImage(Ua,ja/V,la/V);ya()}catch(na){null!=U&&U(na)}};Ua.onerror=function(ja){null!=U&&U(ja)};Ua.src=Ea}else ya()}catch(ja){null!=U&&U(ja)}});qa.onerror=function(ya){null!=U&&U(ya)};Y&&this.graph.addSvgShadow(fa);this.graph.mathEnabled&&this.addMathCss(fa);var ia=mxUtils.bind(this,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(m,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var K=function(){R=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var R=null;Editor.doMathJaxRender=function(Q){try{null==R?(MathJax.typesetClear([Q]),MathJax.typeset([Q]),K()):R!=Q&&Editor.mathJaxQueue.push(Q)}catch(V){MathJax.typesetClear([Q]),null!=V.retry?(R=Q,V.retry.then(function(){MathJax.typesetPromise([Q]).then(K)["catch"](function(X){console.log("Error in MathJax.typesetPromise: "+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
m+'";\nsrc: url("'+B+'");\n}'),m=document.createElement("style"),mxUtils.write(m,K));return m};Graph.addFont=function(m,B,K){if(null!=m&&0<m.length&&null!=B&&0<B.length){var R=m.toLowerCase();if("helvetica"!=R&&"arial"!=m&&"sans-serif"!=R){var U=Graph.customFontElements[R];null!=U&&U.url!=B&&(U.elt.parentNode.removeChild(U.elt),U=null);null==U?(U=B,"http:"==B.substring(0,5)&&(U=PROXY_URL+"?url="+encodeURIComponent(B)),U={name:m,url:B,elt:Graph.createFontElement(m,U)},Graph.customFontElements[R]=U, Graph.recentCustomFonts[R]=U,B=document.getElementsByTagName("head")[0],null!=K&&("link"==U.elt.nodeName.toLowerCase()?(U.elt.onload=K,U.elt.onerror=K):K()),null!=B&&B.appendChild(U.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();return m};Graph.getFontUrl=function(m,B){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(B=m.url);return B};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var B=0;B<m.length;B++){var K=m[B].getAttribute("data-font-src");if(null!=K){var R=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,n,t,u,v,A){u=null!=u?u:this.maxImageSize;var H=Math.max(1,d.width),L=Math.max(1,d.height);if(t&&this.isResampleImageSize(null!=A?A:g.length,v))try{var F=Math.max(H/u,L/u);if(1<F){var S=Math.round(H/F),p=Math.round(L/F),q=document.createElement("canvas");q.width=S;q.height=p;q.getContext("2d").drawImage(d,0,0,S,p);var C=q.toDataURL();if(C.length<g.length){var J= document.createElement("canvas");J.width=S;J.height=p;var G=J.toDataURL();C!==G&&(g=C,H=S,L=p)}}}catch(P){}n(g,H,L)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,n){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;g(t)};null!=n&&(t.onerror=n);t.src=d}catch(u){if(null!=n)n(u);else throw u;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
if(null!=m.excludeCells){for(var K=[],R=0;R<B.length;R++)0>m.excludeCells.indexOf(B[R].id)&&K.push(B[R]);B=K}return B};Graph.prototype.getCellsById=function(m){var B=[];if(null!=m)for(var K=0;K<m.length;K++)if("*"==m[K]){var R=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(W){return W!=R},R))}else{var U=this.model.getCell(m[K]);null!=U&&B.push(U)}return B};var J=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return J.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
ColorDialog.resetRecentColors=function(){E.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,B){var K=null;null!=m.editor.graph.getModel().getParent(B)?K=B.getId():null!=m.currentPage&&(K=m.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var D=Format.prototype.init;Format.prototype.init=function(){D.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Math.round(25*Math.random()))):/\s/.test(u)?n.push(" "):n.push("?"):n.push(g?"0":Math.round(9*Math.random()))}return n.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var n=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);null!=n.getAttribute("name")&&n.setAttribute("name",this.anonymizeString(n.getAttribute("name")));d[EditorUi.DIFF_INSERT][g].data=mxUtils.getXml(n)}catch(v){d[EditorUi.DIFF_INSERT][g].data= v.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var t in d[EditorUi.DIFF_UPDATE]){var u=d[EditorUi.DIFF_UPDATE][t];null!=u.name&&(u.name=this.anonymizeString(u.name));null!=u.cells&&(g=mxUtils.bind(this,function(v){var A=u.cells[v];if(null!=A){for(var H in A)null!=A[H].value&&(A[H].value="["+A[H].value.length+"]"),null!=A[H].xmlValue&&(A[H].xmlValue="["+A[H].xmlValue.length+"]"),null!=A[H].style&&(A[H].style="["+A[H].style.length+"]"),mxUtils.isEmptyObject(A[H])&&delete A[H];mxUtils.isEmptyObject(A)&& delete u.cells[v]}}),g(EditorUi.DIFF_INSERT),g(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(u.cells)&&delete u.cells);mxUtils.isEmptyObject(u)&&delete d[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var n=0;n<d.attributes.length;n++)"as"!=d.attributes[n].name&&d.setAttribute(d.attributes[n].name,this.anonymizeString(d.attributes[n].value,g));if(null!=d.childNodes)for(n=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
D)}};GitLabClient.prototype.saveFile=function(e,f,c,k,l){var x=e.meta.org,y=e.meta.repo,E=e.meta.ref,D=e.meta.path,z=mxUtils.bind(this,function(I,d){this.writeFile(x,y,E,D,l,d,I,mxUtils.bind(this,function(g){delete e.meta.isNew;this.getFile(x+"/"+y+"/"+E+"/"+D,mxUtils.bind(this,function(n){n.getData()==e.getData()?f(n.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),M=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(D)){var I=this.ui.getPngFileProperties(this.ui.fileNode);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
0==K%2,ea.flipBkg),B.parentNode.insertBefore(qa,B.nextSibling),B=qa;m.appendChild(ma);Ca();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var B=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},K=this.editorUi,R=K.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";m.style.paddingLeft=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(u){try{var v=t.result;1>u.oldVersion&&v.createObjectStore("objects",{keyPath:"key"});2>u.oldVersion&&(v.createObjectStore("files",{keyPath:"title"}),v.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};t.onsuccess=mxUtils.bind(this,function(u){try{var v=t.result;this.database=v;EditorUi.migrateStorageFiles&&(StorageFile.migrate(v),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
c,k,l){e={org:e,repo:f,ref:c,name:k.name,path:k.path,sha:k.sha,html_url:k.html_url,download_url:k.download_url};f=k.content;"base64"===k.encoding&&(/\.jpe?g$/i.test(k.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(k.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(k.name)?(k=this.ui.extractGraphModelFromPng(f),f=null!=k&&0<k.length?k:"data:image/png;base64,"+f):f=Base64.decode(f));return l?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e, f,c,k,l){this.insertFile(e,f,c,k,!0,l,!1)};GitHubClient.prototype.insertFile=function(e,f,c,k,l,x,y){l=null!=l?l:!1;x=x.split("/");var E=x[0],D=x[1],z=x[2],M=x.slice(3,x.length).join("/");0<M.length&&(M+="/");M+=e;this.checkExists(E+"/"+D+"/"+z+"/"+M,!0,mxUtils.bind(this,function(I,d){I?l?(y||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(g){this.writeFile(E,D,z,M,g,f,d,mxUtils.bind(this,function(n){try{var t=JSON.parse(n.getText());c(this.createGitHubFile(E,D,z,t.content,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
parseInt(ca.value))))}function R(Qa){function Fa(Aa,Ja,Na,ra){var Ha=Aa.useCssTransforms,La=Aa.currentTranslate,Xa=Aa.currentScale,Sa=Aa.view.translate,Ta=Aa.view.scale;Aa.useCssTransforms&&(Aa.useCssTransforms=!1,Aa.currentTranslate=new mxPoint(0,0),Aa.currentScale=1,Aa.view.translate=new mxPoint(0,0),Aa.view.scale=1);var Pa=Aa.getGraphBounds(),Oa=0,Ya=0,Wa=Ea.get(),ab=1/Aa.pageScale,$a=Ca.checked;if($a){ab=parseInt(sa.value);var gb=parseInt(va.value);ab=Math.min(Wa.height*gb/(Pa.height/Aa.view.scale), Wa.width*ab/(Pa.width/Aa.view.scale))}else ab=parseInt(Ba.value)/(100*Aa.pageScale),isNaN(ab)&&(Ra=1/Aa.pageScale,Ba.value="100 %");Wa=mxRectangle.fromRectangle(Wa);Wa.width=Math.ceil(Wa.width*Ra);Wa.height=Math.ceil(Wa.height*Ra);ab*=Ra;!$a&&Aa.pageVisible?(Pa=Aa.getPageLayout(),Oa-=Pa.x*Wa.width,Ya-=Pa.y*Wa.height):$a=!0;ra=null!=ra?"page/id,"+ra:null;if(null==Ja){Ja=PrintDialog.createPrintPreview(Aa,ab,Wa,0,Oa,Ya,$a);Ja.pageSelector=!1;Ja.mathEnabled=!1;ma.checked&&(Ja.isCellVisible=function(Za){return Aa.isCellSelected(Za)});
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
K+8,U=(B.y+N.lastCursor.y)*K-12,W=N.cursor.getElementsByTagName("img")[0];T?(mxUtils.setPrefixedStyle(N.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(W.style,"transition","all 900ms ease-out"),window.setTimeout(m,0)):(mxUtils.setPrefixedStyle(N.cursor.style,"transition",null),mxUtils.setPrefixedStyle(W.style,"transition",null),m())}}function x(N,T){try{var m=function(){if(null==g[K]){var Z=A[K];null==Z&&(Z=M%d.length,A[K]=Z,M++);var ca=d[Z];Z=11<Z?"black":"white";g[K]={cursor:document.createElement("div"), color:ca,selection:{}};u[T]=K;R=g[K].cursor;R.style.pointerEvents="none";R.style.position="absolute";R.style.display="none";R.style.opacity="0.9";var da=document.createElement("img");mxUtils.setPrefixedStyle(da.style,"transform","rotate(-45deg)translateX(-14px)");da.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ca+'" fill="'+ca+'"/>').src);da.style.width="10px";R.appendChild(da);da=document.createElement("div");da.style.backgroundColor=ca;da.style.color= Z;da.style.fontSize="9pt";da.style.padding="3px 7px";da.style.marginTop="8px";da.style.borderRadius="10px";da.style.maxWidth="100px";da.style.overflow="hidden";da.style.textOverflow="ellipsis";da.style.whiteSpace="nowrap";mxUtils.write(da,B);R.appendChild(da);b.diagramContainer.appendChild(R)}else R=g[K].cursor;U=g[K].selection};if(!q){N=JSON.parse(N);null!=N.bytes&&(N=e.stringToObject(N.bytes));C&&"cursor"!=N.type&&EditorUi.debug("P2PCollab: msg received",[N]);if(null!=T){if(N.from==H||t[N.from]>=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
[J],"{1} ago"));C.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function D(q){var C=document.createElement("img");C.className="geCommentBusyImg";C.src=IMAGE_PATH+"/spin.gif";q.appendChild(C);q.busyImg=C}function z(q){q.style.border="1px solid red";q.removeChild(q.busyImg)}function M(q){q.style.border="";q.removeChild(q.busyImg)}function I(q,C,J,G,P){function O(W,Q,V){var X=document.createElement("li");X.className="geCommentAction";var Y=document.createElement("a");Y.className= "geCommentActionLnk";mxUtils.write(Y,W);X.appendChild(Y);mxEvent.addListener(Y,"click",function(Z){Q(Z,q);Z.preventDefault();mxEvent.consume(Z)});U.appendChild(X);V&&(X.style.display="none")}function N(){function W(X){Q.push(V);if(null!=X.replies)for(var Y=0;Y<X.replies.length;Y++)V=V.nextSibling,W(X.replies[Y])}var Q=[],V=m;W(q);return{pdiv:V,replies:Q}}function T(W,Q,V,X,Y){function Z(){D(ea);q.addReply(ma,function(za){ma.id=za;q.replies.push(ma);M(ea);V&&V()},function(za){ca();z(ea);b.handleError(za,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
K=B.editor.graph;if(K.isEnabled()){var R=B.getCurrentFile();null!=R&&R.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(Q){B.editor.setAutosave(Q);B.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(Q){this.listener=function(){Q(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&K.isEnabled()&&
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var S=g.getExportVariables;g.getExportVariables=function(){var O=S.apply(this,arguments),N=d.getCurrentFile();null!=N&&(O.filename=N.getTitle());
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
return R==P||0==K.length?z(G,P):U==W?D(G):E(G,P!=mxConstants.DIRECTION_NORTH&&P!=mxConstants.DIRECTION_WEST)}return S.apply(this,arguments)};g.getSubtree=function(G){var P=[G];!k(G)&&!c(G)||x(G)||g.traverse(G,!0,function(O,N){var T=null!=N&&g.isTreeEdge(N);T&&0>mxUtils.indexOf(P,N)&&P.push(N);(null==N||T)&&0>mxUtils.indexOf(P,O)&&P.push(O);return null==N||T});return P};var p=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){p.apply(this,arguments);(k(this.state.cell)||c(this.state.cell))&& !x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(G){this.graph.graphHandler.start(this.state.cell, mxEvent.getClientX(G),mxEvent.getClientY(G),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(G);this.graph.isMouseDown=!0;d.hoverIcons.reset();mxEvent.consume(G)})))};var q=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){q.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
O.y||0<O.height)&&mxUtils.intersects(K,new mxRectangle(U.x,U.y+(O.y-O.height-1)*W+(0==O.y?U.height:0),U.width,1))&&(X="row-resize")),U=this.view.getState(this.model.getParent(U.cell))}null!=X&&L.setCursor(X)}}}),mouseUp:mxUtils.bind(this,function(K,U){m=h=n=t=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(K){var U=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);K.view.graph.isHtmlLabel(K.cell)&&(1!=K.style.html?U=mxUtils.htmlEntities(U,!1):K.lastLabelValue!= U&&(K.lastLabelValue=U,U=Graph.sanitizeHtml(U)));return U};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
N)):(m.noP2PMapDel=!0,m.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",N))});m.on("close",function(){m.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",N),D(u[N]),delete F[N])});m.on("data",x);return L[N]=m}}function E(N,T){D(T||u[N]);null!=N&&(delete u[N],v[N]=!1)}function D(N){var T=g[N];if(null!=T){var m=T.selection,B;for(B in m)null!=m[B]&&m[B].destroy();null!=T.cursor&&null!=T.cursor.parentNode&&T.cursor.parentNode.removeChild(T.cursor);clearTimeout(T.inactiveTO);delete g[N]}}
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(d,g,n,t,u,v,A){if(null!=d){u=null!=u?u:Error(d);u.stack=null!=u.stack?u.stack:"";v=null!=v?v:0>d.indexOf("NetworkError")&&0>d.indexOf("SecurityError")&&0>d.indexOf("NS_ERROR_FAILURE")&&0>d.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&d!=EditorUi.lastErrorMessage&&0>d.indexOf("extension:")&&0>u.stack.indexOf("extension:")&&0>u.stack.indexOf("<anonymous>:")&&(EditorUi.lastErrorMessage=d,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL: "")+"/log?severity="+v+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(n)+(null!=t?":colno:"+encodeURIComponent(t):"")+(""!=u.stack?"&stack="+encodeURIComponent(u.stack):""))}catch(H){}try{A||null==window.console||console.error(v,d,g,n,t,u)}catch(H){}}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var g=null!=window.DRAWIO_LOG_URL?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.createUrlParameters=function(d,g,n,t,u,v,A){A=null!=A?A:[];t&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||A.push("lightbox=1"),"auto"!=d&&A.push("target="+d),null!=g&&g!=mxConstants.NONE&&A.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=u&&0<u.length&&A.push("edit="+encodeURIComponent(u)),v&&A.push("layers=1"),this.editor.graph.foldingEnabled&&A.push("nav=1"));n&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&& A.push("page-id="+this.currentPage.getId());return A};EditorUi.prototype.createLink=function(d,g,n,t,u,v,A,H,L,F){L=this.createUrlParameters(d,g,n,t,u,v,L);d=this.getCurrentFile();g=!0;null!=A?n="#U"+encodeURIComponent(A):(d=this.getCurrentFile(),H||null==d||d.constructor!=window.DriveFile?n="#R"+encodeURIComponent(n?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(n="#"+d.getHash(),g=!1));g&&null!=d&&null!=d.getTitle()&&d.getTitle()!=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
}finally{g.getModel().endUpdate()}v&&(g.setSelectionCell(n),g.scrollCellToVisible(n))}};f=mxUtils.button(mxResources.get("preview"),function(){d(z,M,!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,M){var I=document.createElement("div");
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
A.parentNode.removeChild(A)}catch(L){}}else this.createEchoRequest(d,g,n,t,u).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,n,t,u,v){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=n?"&mime="+n:"")+(null!=u?"&format="+u:"")+(null!=v?"&base64="+v:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(t?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var n=d.length,t=Math.ceil(n/1024),u=Array(t),v=0;v<t;++v){for(var A= 1024*v,H=Math.min(A+1024,n),L=Array(H-A),F=0;A<H;++F,++A)L[F]=d[A].charCodeAt(0);u[v]=new Uint8Array(L)}return new Blob(u,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,n,t,u,v,A,H){v=null!=v?v:!1;A=null!=A?A:"vsdx"!=u&&(!mxClient.IS_IOS||!navigator.standalone);u=this.getServiceCount(v);isLocalStorage&&u++;var L=4>=u?2:6<u?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(F,S){try{if("_blank"==S)if(null!=n&&"image/"==n.substring(0,6))this.openInNewWindow(d,n,t);else if(null!=n&&"text/html"==
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"keys",Da,"values",Qa,"cells",ca.getSelectionCells()))}finally{ca.getModel().endUpdate()}}function U(oa,sa,va){var Ea=mxUtils.getOffset(m,!0),Da=mxUtils.getOffset(oa,!0);sa.style.position="absolute";sa.style.left=Da.x-Ea.x+"px";sa.style.top=Da.y-Ea.y+"px";sa.style.width=oa.offsetWidth+"px";sa.style.height=oa.offsetHeight-(va?4:0)+"px";sa.style.zIndex=5}function W(oa,sa,va){var Ea=document.createElement("div");Ea.style.width="32px";Ea.style.height="4px";Ea.style.margin="2px";Ea.style.border="1px solid black";
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.createFontElement=function(m,B){var K=Graph.fontMapping[B];null==K&&Graph.isCssFontUrl(B)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",B)):(null==K&&(K='@font-face {\nfont-family: "'+
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
m.prototype.lineTo=function(W,Q){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,W,Q),this.lastX=W,this.lastY=Q)};m.prototype.moveTo=function(W,Q){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,W,Q),this.lastX=W,this.lastY=Q,this.firstX=W,this.firstY=Q)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(W,Q,V,X){this.passThrough?
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var K=mxUtils.parseXml(B).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(m,B,K){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled= "1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(t){}window.location.hash=g}};EditorUi.prototype.loadDescriptor=function(d,g,n){var t=window.location.hash,u=mxUtils.bind(this,function(A){var H=null!=d.data?d.data:"";null!=A&&0<A.length&&(0<H.length&&(H+="\n"),H+=A);A=new LocalFile(this,"csv"!=d.format&&0<H.length?H:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return t};this.fileLoaded(A);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
R));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",R);U.setAttribute("as","font");U.setAttribute("crossorigin","");B.parentNode.insertBefore(U,B)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(m){m=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
0;T<G.length;T++){var m=g.view.getState(g.model.getTerminal(G[T],!1));null!=m&&(!P&&Math.min(m.x+m.width,O.x+O.width)>=Math.max(m.x,O.x)||P&&Math.min(m.y+m.height,O.y+O.height)>=Math.max(m.y,O.y))&&N.push(m)}N.sort(function(B,K){return P?B.x+B.width-K.x-K.width:B.y+B.height-K.y-K.height})}return N}function I(G,P){var O=y(G),N=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST;(O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST)==N&&O!=P?d.actions.get("selectParent").funct():O== P?(P=g.getOutgoingTreeEdges(G),null!=P&&0<P.length&&g.setSelectionCell(g.model.getTerminal(P[0],!1))):(O=g.getIncomingTreeEdges(G),null!=O&&0<O.length&&(N=M(g.model.getTerminal(O[0],!0),N,G),G=g.view.getState(G),null!=G&&(G=mxUtils.indexOf(N,G),0<=G&&(G+=P==mxConstants.DIRECTION_NORTH||P==mxConstants.DIRECTION_WEST?-1:1,0<=G&&G<=N.length-1&&g.setSelectionCell(N[G].cell)))))}var d=this,g=d.editor.graph,n=g.getModel(),t=d.menus.createPopupMenu;d.menus.createPopupMenu=function(G,P,O){t.apply(this,arguments);
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
return S}),F=!0);return F};var A=u.stop;u.stop=function(){A.call(this);this.active=!1;null!=u.status&&null!=u.status.parentNode&&u.status.parentNode.removeChild(u.status);u.status=null};u.pause=function(){return function(){}};return u};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),n=this.editor.extractGraphModel(g.documentElement,!0);return null!=n&&0==n.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var F=mxUtils.parseXml(L).getElementsByTagName("svg");if(0<F.length&&"error"!=F[0].getAttribute("aria-roledescription")){var S=parseFloat(F[0].getAttribute("width")),p=parseFloat(F[0].getAttribute("height"));if(isNaN(S)||isNaN(p))try{var q=F[0].getAttribute("viewBox").split(/\s+/);S=parseFloat(q[2]);p=parseFloat(q[3])}catch(C){S=S||100,p=p||100}n(this.convertDataUri(Editor.createSvgDataUri(L)),S,p)}else null!=u?u():t({message:mxResources.get("invalidInput")})}catch(C){t(C)}});
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(B,K){if(null==K){var R=mxEvent.getSource(B);"a"==R.nodeName.toLowerCase()&&(K=R.getAttribute("href"))}null!=K&&g.isCustomLink(K)&&(mxEvent.isTouchEvent(B)||!mxEvent.isPopupTrigger(B))&&g.customLinkClicked(K)&&mxEvent.consume(B);null!=m&&m(B,K)};H.call(this,O,N,T)};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(O,N,T){g.isSelectionEmpty()&& "simple"==Editor.currentTheme&&this.addMenuItems(O,["zoomIn","zoomOut","-"],null,T);L.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(O,["-","addToScratchpad"],null,T);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(O,["-","exitGroup","home"],null,T)};var F=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(O,N,T){if(d.editor.graph.isSelectionEmpty())F.apply(this,arguments),d.menus.addMenuItems(O,["copyAsImage"],
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
function(da){"true"!=V.getAttribute("contentEditable")&&mxEvent.consume(da)});W=function(da){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ma=new FilenameDialog(b,X.title||"",mxResources.get("ok"),function(ea){null!=ea&&(X.title=ea,T())},mxResources.get("enterValue"));b.showDialog(ma.container,300,80,!0,!0);ma.init();mxEvent.consume(da)}else if("true"!=V.getAttribute("contentEditable")){null!=v&&(v(),v=null);if(null==X.title||0==X.title.length)V.innerText= "";V.style.textOverflow="";V.style.whiteSpace="";V.style.cursor="text";V.style.color="";V.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(V.style,"user-select","text");V.focus();document.execCommand("selectAll",!1,null);v=function(){V.removeAttribute("contentEditable");V.style.cursor="pointer";X.title=V.innerHTML;T()};mxEvent.consume(da)}};mxEvent.addListener(V,"click",W);mxEvent.addListener(R,"dblclick",W);d.appendChild(R);mxEvent.addListener(R,"dragstart",function(da){null==S&&null!=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
EditorUi.prototype.getWindows=function(){var d=[this.sidebarWindow,this.formatWindow,this.freehandWindow];null!=this.actions&&(d=d.concat([this.actions.outlineWindow,this.actions.layersWindow]));null!=this.menus&&(d=d.concat([this.menus.tagsWindow,this.menus.findWindow,this.menus.findReplaceWindow,this.menus.commentsWindow]));return d};EditorUi.prototype.fitWindows=function(){for(var d=this.getWindows(),g=0;g<d.length;g++)null!=d[g]&&d[g].window.fit()};EditorUi.prototype.hideWindows=function(){for(var d=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(H){r="";for(i=0;i<H.length;i+=3)r=i+2==H.length?r+u(H.charCodeAt(i),H.charCodeAt(i+1),0):i+1==H.length?r+u(H.charCodeAt(i),0,0):r+u(H.charCodeAt(i),H.charCodeAt(i+1),H.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(H){if(200<=this.status&&300>this.status)if("txt"==g)n(this.response);else{var L=new FileReader;L.readAsDataURL(this.response);L.onloadend=function(F){var S= new Image;S.onload=function(){try{var p=S.width,q=S.height;if(0==p&&0==q){var C=L.result,J=C.indexOf(","),G=decodeURIComponent(escape(atob(C.substring(J+1)))),P=mxUtils.parseXml(G).getElementsByTagName("svg");0<P.length&&(p=parseFloat(P[0].getAttribute("width")),q=parseFloat(P[0].getAttribute("height")))}n(L.result,p,q)}catch(O){t(O)}};S.src=L.result};L.onerror=function(F){t(F)}}else t(H)};A.onerror=function(H){t(H)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,n){var t=this.editor.graph,
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
(L?null!=O.resp&&0<O.resp.length&&null!=O.resp[0]?(S=O.resp[0],L=!1,J()):q():null!=O.resp&&0<O.resp.length&&null!=O.resp[0]?G(O.resp[0]):C())}}catch(N){console.log(N)}});window.addEventListener("message",A)}})));d(v);v.onversionchange=function(){v.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});t.onerror=g;t.onblocked=function(){}}catch(u){null!=g?g(u):null!=window.console&&console.error(u)}else null!=g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
Graph.recentCustomFonts[R]=U,B=document.getElementsByTagName("head")[0],null!=K&&("link"==U.elt.nodeName.toLowerCase()?(U.elt.onload=K,U.elt.onerror=K):K()),null!=B&&B.appendChild(U.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();return m};Graph.getFontUrl=function(m,B){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(B=m.url);return B};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var B=0;B<m.length;B++){var K=m[B].getAttribute("data-font-src");if(null!=K){var R= "FONT"==m[B].nodeName?m[B].getAttribute("face"):m[B].style.fontFamily;null!=R&&Graph.addFont(R,K)}}};Graph.processFontStyle=function(m){if(null!=m){var B=mxUtils.getValue(m,"fontSource",null);if(null!=B){var K=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);null!=K&&Graph.addFont(K,decodeURIComponent(B))}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible=
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable