code
stringlengths
12
2.05k
label_name
stringlengths
6
8
label
int64
0
95
"/images/"+ma+".svg";return!0}function O(ha,da,ca,la){function ia(na,Ka){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ia){200<=Ia.getStatus()&&299>=Ia.getStatus()&&(qa=Ia.getText());Ka(qa)}))):Ka(qa)}function ma(na,Ka,Ia){if(null!=na&&mxUtils.isAncestorNode(document.body,da)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"== na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(da,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Ka, Ia),!0,null,!0);var Ja=document.createElement("div");Ja.className="geTempDlgDialogMask";M.appendChild(Ja);var Oa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ja&&(M.removeChild(Ja),Ja=null,Oa.apply(this,arguments),b.sidebar.hideTooltip=Oa)};mxEvent.addListener(Ja,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Da||b.sidebar.currentElt==da)b.sidebar.hideTooltip();else{var pa=function(na){Da&&b.sidebar.currentElt==da&&ma(na,mxEvent.getClientX(la),mxEvent.getClientY(la));Da=!1;
CWE-79
1
function startTimeout() { if (self.config.readyTimeout > 0) { self._readyTimeout = setTimeout(function() { var err = new Error('Timed out while waiting for handshake'); err.level = 'client-timeout'; self.emit('error', err); sock.destroy(); }, self.config.readyTimeout); } }
CWE-78
6
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.0.6";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
CWE-918
16
new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ka);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Pa,mxActor);Pa.prototype.dx=20;Pa.prototype.dy=20;Pa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style, "dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Pa);mxUtils.extend(Za,
CWE-79
1
PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(B){var I=new Image;I.onload= function(){try{var O=I.width,t=I.height;if(0==O&&0==t){var z=A.result,L=z.indexOf(","),C=decodeURIComponent(escape(atob(z.substring(L+1)))),D=mxUtils.parseXml(C).getElementsByTagName("svg");0<D.length&&(O=parseFloat(D[0].getAttribute("width")),t=parseFloat(D[0].getAttribute("height")))}k(A.result,O,t)}catch(G){l(G)}};I.src=A.result};A.onerror=function(B){l(B)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();
CWE-79
1
return onSuccess(req, res, {Currency: message.coin.ticker, Balance: utils.roundDown(balance+awaiting+hold), Available: balance.toFixed(8)*1, Pending: awaiting.toFixed(8)*1}); } catch (e) { return onError(req, res, e.message); } }); } catch(e) { return onError(req, res, e.message); } }) });
CWE-89
0
P)this.editPlantUmlData(D,G,P);else if(P=this.graph.getAttributeForCell(D,"mermaidData"),null!=P)this.editMermaidData(D,G,P);else{var K=g.getCellStyle(D);"1"==mxUtils.getValue(K,"metaEdit","0")?d.showDataDialog(D):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(D){return d.getLinkTitle(D)};g.customLinkClicked=function(D){var G=!1;try{d.handleCustomLink(D),G=!0}catch(P){d.handleError(P)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(D){var G=l.apply(this, arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(D){null!=D&&null!=D.originalSrc&&(D=d.createImageForPageLink(D.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
CWE-79
1
mxCellEditor.prototype.installListeners=function(a){mxEvent.addListener(a,"dragstart",mxUtils.bind(this,function(d){this.graph.stopEditing(!1);mxEvent.consume(d)}));mxEvent.addListener(a,"blur",mxUtils.bind(this,function(d){this.blurEnabled&&this.focusLost(d)}));mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||(this.isStopEditingEvent(d)?(this.graph.stopEditing(!1),mxEvent.consume(d)):27==d.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(d)),mxEvent.consume(d)))})); var b=mxUtils.bind(this,function(d){null!=this.editingCell&&this.clearOnChange&&a.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=d.keyCode&&46!=d.keyCode)&&(this.clearOnChange=!1,a.innerHTML="")});mxEvent.addListener(a,"keypress",b);mxEvent.addListener(a,"paste",b);b=mxUtils.bind(this,function(d){null!=this.editingCell&&(0==this.textarea.innerHTML.length||"<br>"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length): this.clearOnChange=!1)});mxEvent.addListener(a,mxClient.IS_IE11||mxClient.IS_IE?"keyup":"input",b);mxEvent.addListener(a,"cut",b);mxEvent.addListener(a,"paste",b);b=mxClient.IS_IE11||mxClient.IS_IE?"keydown":"input";var c=mxUtils.bind(this,function(d){null!=this.editingCell&&this.autoSize&&!mxEvent.isConsumed(d)&&(null!=this.resizeThread&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null;this.resize()}),0))});mxEvent.addListener(a, b,c);mxEvent.addListener(window,"resize",c);9<=document.documentMode?(mxEvent.addListener(a,"DOMNodeRemoved",c),mxEvent.addListener(a,"DOMNodeInserted",c)):(mxEvent.addListener(a,"cut",c),mxEvent.addListener(a,"paste",c))};mxCellEditor.prototype.isStopEditingEvent=function(a){return 113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
CWE-79
1
mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor= a;this.node.style.borderColor=b;a=document.createElement("img");a.setAttribute("border","0");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");a.style.filter!=b&&(a.style.filter=b);"image"== a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}mxUtils.extend(mxLabel,mxRectangleShape);
CWE-94
14
SendStream.prototype.pipe = function(res){ var self = this , args = arguments , root = this._root; // references this.res = res; // decode the path var path = utils.decode(this.path) if (path === -1) return this.error(400) // null byte(s) if (~path.indexOf('\0')) return this.error(400); var parts if (root !== null) { // join / normalize from optional root dir path = normalize(join(root, path)) root = normalize(root) // malicious path if (path.substr(0, root.length) !== root) { debug('malicious path "%s"', path) return this.error(403) } // explode path parts parts = path.substr(root.length + 1).split(sep) } else { // ".." is malicious without "root" if (upPathRegexp.test(path)) { debug('malicious path "%s"', path) return this.error(403) } // explode path parts parts = normalize(path).split(sep) // resolve the path path = resolve(path) } // dotfile handling if (containsDotFile(parts)) { var access = this._dotfiles // legacy support if (access === undefined) { access = parts[parts.length - 1][0] === '.' ? (this._hidden ? 'allow' : 'ignore') : 'allow' } debug('%s dotfile "%s"', access, path) switch (access) { case 'allow': break case 'deny': return this.error(403) case 'ignore': default: return this.error(404) } } // index file support if (this._index.length && this.path[this.path.length - 1] === '/') { this.sendIndex(path); return res; } this.sendFile(path); return res; };
CWE-22
2
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
CWE-79
1
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer)); this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&& this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit, !0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
CWE-79
1
A=!1,C=null,F=function(D,O,Q){if(!A){var R="null"==d?null:d;A=!0;D=/(^#?[a-zA-Z0-9]*$)/.test(D)?D:R;R=null!=D&&D!=mxConstants.NONE?D:R;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==R?n:R;C.innerHTML="";C.appendChild(P);null!=D&&D!=mxConstants.NONE&&1<D.length&&"string"===typeof D&&(R="#"==D.charAt(0)?D.substring(1).toUpperCase():D,R=ColorDialog.prototype.colorNames[R],C.setAttribute("title", null!=R?R+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=D&&D!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=e&&e("null"==D?null:D);x=D;O||(Q||k||b()!=x)&&f("null"==x?null:x,x);A=!1}},K=document.createElement("input");K.setAttribute("type","color");K.style.visibility="hidden";K.style.width="0px";K.style.height="0px";K.style.border=
CWE-79
1
function sharingGroupPopulateOrganisations() { $('input[id=SharingGroupOrganisations]').val(JSON.stringify(organisations)); $('.orgRow').remove(); var id = 0; var html = ''; organisations.forEach(function(org) { html = '<tr id="orgRow' + id + '" class="orgRow">'; html += '<td class="short">' + org.type + '&nbsp;</td>'; html += '<td>' + org.name + '&nbsp;</td>'; html += '<td>' + org.uuid + '&nbsp;</td>'; html += '<td class="short" style="text-align:center;">'; if (org.removable == 1) { html += '<input id="orgExtend' + id + '" type="checkbox" onClick="sharingGroupExtendOrg(' + id + ')" '; if (org.extend) html+= 'checked'; html += '></input>'; } else { html += '<span class="icon-ok"></span>' } html +='</td>'; html += '<td class="actions short">'; if (org.removable == 1) html += '<span class="icon-trash" onClick="sharingGroupRemoveOrganisation(' + id + ')"></span>'; html += '&nbsp;</td></tr>'; $('#organisations_table tr:last').after(html); id++; }); }
CWE-79
1
Wa,Xa,K,Ga,Ja,Ia,Ha);c.stroke()};Ea.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Ea.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Ea.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Ea.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
CWE-79
1
var CommentsWindow=function(b,f,l,d,t,u){function E(){for(var H=N.getElementsByTagName("div"),F=0,J=0;J<H.length;J++)"none"!=H[J].style.display&&H[J].parentNode==N&&F++;K.style.display=0==F?"block":"none"}function c(H,F,J,R){function W(){F.removeChild(U);F.removeChild(Y);V.style.display="block";O.style.display="block"}z={div:F,comment:H,saveCallback:J,deleteOnCancel:R};var O=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className= "geCommentEditTxtArea";U.style.minHeight=O.offsetHeight+"px";U.value=H.content;F.insertBefore(U,O);var Y=document.createElement("div");Y.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),E()):W();z=null});n.className="geCommentEditBtn";Y.appendChild(n);var D=mxUtils.button(mxResources.get("save"),function(){O.innerHTML="";H.content=U.value;mxUtils.write(O,H.content);W();J(H);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this, function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(D.click(),mxEvent.consume(I)):27==I.keyCode&&(n.click(),mxEvent.consume(I)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";Y.appendChild(D);F.insertBefore(Y,O);V.style.display="none";O.style.display="none";U.focus()}function e(H,F){F.innerHTML="";H=new Date(H.modifiedDate);var J=b.timeSince(H);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
CWE-94
14
require.resolve = function (path){ var orig = path , reg = path + '.js' , index = path + '/index.js'; return require.modules[reg] && reg || require.modules[index] && index || orig; };
CWE-89
0
function reqPty(chan, opts, cb) { var rows = 24; var cols = 80; var width = 640; var height = 480; var term = 'vt100'; var modes = null; if (typeof opts === 'function') cb = opts; else if (typeof opts === 'object' && opts !== null) { if (typeof opts.rows === 'number') rows = opts.rows; if (typeof opts.cols === 'number') cols = opts.cols; if (typeof opts.width === 'number') width = opts.width; if (typeof opts.height === 'number') height = opts.height; if (typeof opts.term === 'string') term = opts.term; if (typeof opts.modes === 'object') modes = opts.modes; } var wantReply = (typeof cb === 'function'); if (chan.outgoing.state !== 'open') { wantReply && cb(new Error('Channel is not open')); return true; } if (wantReply) { chan._callbacks.push(function(had_err) { if (had_err) { return cb(had_err !== true ? had_err : new Error('Unable to request a pseudo-terminal')); } cb(); }); } return chan._client._sshstream.pty(chan.outgoing.id, rows, cols, height, width, term, modes, wantReply); }
CWE-78
6
DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,k,m,q,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,k,m,q,v,x)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};
CWE-79
1
"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style, "size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(ab,mxRectangleShape);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.isHtmlAllowed=function(){return!1};ab.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
CWE-79
1
var parse = function(element) { // Remove attributes if (element.attributes && element.attributes.length) { var image = null; var style = null; // Process style attribute var elementStyle = element.getAttribute('style'); if (elementStyle) { style = []; var t = elementStyle.split(';'); for (var j = 0; j < t.length; j++) { var v = t[j].trim().split(':'); if (validStyle.indexOf(v[0].trim()) >= 0) { var k = v.shift(); var v = v.join(':'); style.push(k + ':' + v); } } } // Process image if (element.tagName == 'IMG') { if (! obj.options.acceptImages) { element.remove(); } else { // Check if is data element.setAttribute('tabindex', '900'); // Check attributes for persistance obj.addImage(element.src); } } else { // Remove attributes var numAttributes = element.attributes.length - 1; for (var i = numAttributes; i >= 0 ; i--) { element.removeAttribute(element.attributes[i].name); } } element.style = ''; // Add valid style if (style && style.length) { element.setAttribute('style', style.join(';')); } } // Parse children if (element.children.length) { for (var i = 0; i < element.children.length; i++) { parse(element.children[i]); } } if (remove.indexOf(element.constructor) >= 0) { element.remove(); } }
CWE-79
1
aa&&(la=pa[ca],null==la&&(la={},pa[ca]=la),ca=la[aa],null==ca&&(ca=[],la[aa]=ca),ca.push(na))}ia=ia.nextSibling}G(ya,fa,wa)}})}function I(ia){v&&(Aa.scrollTop=0,ea.innerHTML="",Ha.spin(ea),U=!1,V=!0,ha.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ia?null:n))}function F(ia){if(""==ia)null!=t&&(t.click(),t=null);else{if(null==TemplatesDialog.tagsList[c]){var ra={};for(Ja in ya)for(var aa=ya[Ja],ca=0;ca<aa.length;ca++){var na= aa[ca];if(null!=na.tags)for(var la=na.tags.toLowerCase().split(";"),qa=0;qa<la.length;qa++)null==ra[la[qa]]&&(ra[la[qa]]=[]),ra[la[qa]].push(na)}TemplatesDialog.tagsList[c]=ra}var ta=ia.toLowerCase().split(" ");ra=TemplatesDialog.tagsList[c];if(0<wa&&null==ra.__tagsList__){for(Ja in fa)for(aa=fa[Ja],ca=0;ca<aa.length;ca++)for(na=aa[ca],la=na.title.split(" "),la.push(Ja),qa=0;qa<la.length;qa++){var ka=la[qa].toLowerCase();null==ra[ka]&&(ra[ka]=[]);ra[ka].push(na)}ra.__tagsList__=!0}var Ja=[];aa={}; for(ca=la=0;ca<ta.length;ca++)if(0<ta[ca].length){ka=ra[ta[ca]];var La={};Ja=[];if(null!=ka)for(qa=0;qa<ka.length;qa++)na=ka[qa],0==la==(null==aa[na.url])&&(La[na.url]=!0,Ja.push(na));aa=La;la++}0==Ja.length?ha.innerHTML=mxResources.get("noResultsFor",[ia]):B(Ja,!0)}}function H(ia){if(ba!=ia||P!=da)A(),Aa.scrollTop=0,ea.innerHTML="",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',va=null,Z?F(ia):d&&(ia?(Ha.spin(ea),U=!1,V=!0,d(ia,ua,function(){z(mxResources.get("searchFailed"));
CWE-94
14
function Hd(a,b,c){var d={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},e=" ";return(a%100>=20||a>=100&&a%100===0)&&(e=" de "),a+e+d[c]}
CWE-89
0
_nbsp(str) { return !str.length ? '&nbsp;' : str.replace(/^\s/, '&nbsp;').replace(/\s{2}/g, ' &nbsp;'); }
CWE-79
1
toMathMLclass: function (attr) { var CLASS = []; if (this["class"]) {CLASS.push(this["class"])} if (this.isa(MML.TeXAtom) && SETTINGS.texHints) { var TEXCLASS = ["ORD","OP","BIN","REL","OPEN","CLOSE","PUNCT","INNER","VCENTER"][this.texClass]; if (TEXCLASS) { CLASS.push("MJX-TeXAtom-"+TEXCLASS) if (TEXCLASS === "OP" && !this.movablelimits) CLASS.push("MJX-fixedlimits"); } } if (this.mathvariant && this.toMathMLvariants[this.mathvariant]) {CLASS.push("MJX"+this.mathvariant)} if (this.variantForm) {CLASS.push("MJX-variant")} if (CLASS.length) {attr.unshift('class="'+CLASS.join(" ")+'"')} },
CWE-79
1
client.send = function(options) { // add host header if not set if(options.request.getField('Host') === null) { options.request.setField('Host', client.url.fullHost); } // set default dummy handlers var opts = {}; opts.request = options.request; opts.connected = options.connected || function() {}; opts.closed = options.close || function() {}; opts.headerReady = function(e) { // read cookies _readCookies(client, e.response); if(options.headerReady) { options.headerReady(e); } }; opts.bodyReady = options.bodyReady || function() {}; opts.error = options.error || function() {}; // create response opts.response = http.createResponse(); opts.response.time = 0; opts.response.flashApi = client.socketPool.flashApi; opts.request.flashApi = client.socketPool.flashApi; // create abort function opts.request.abort = function() { // set aborted, clear handlers opts.request.aborted = true; opts.connected = function() {}; opts.closed = function() {}; opts.headerReady = function() {}; opts.bodyReady = function() {}; opts.error = function() {}; }; // add cookies to request _writeCookies(client, opts.request); // queue request options if there are no idle sockets if(client.idle.length === 0) { client.requests.push(opts); } else { // use an idle socket, prefer an idle *connected* socket first var socket = null; var len = client.idle.length; for(var i = 0; socket === null && i < len; ++i) { socket = client.idle[i]; if(socket.isConnected()) { client.idle.splice(i, 1); } else { socket = null; } } // no connected socket available, get unconnected socket if(socket === null) { socket = client.idle.pop(); } socket.options = opts; _doRequest(client, socket); } };
CWE-601
11
this.window.setLocation=function(q,v){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;q=Math.max(0,Math.min(q,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));v=Math.max(0,Math.min(v,x-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==q&&this.getY()==v||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var q=this.window.getX(),v=this.window.getY();
CWE-79
1
urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var za=parseInt(this.div.offsetLeft),wa=parseInt(this.div.offsetWidth),Ea=U.embedViewport.x+ U.embedViewport.width,Da=parseInt(this.div.offsetTop),La=parseInt(this.div.offsetHeight),Ya=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(za,Ea-wa))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Da,Ya-La))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
CWE-79
1
function getMethods(a){var b=[],c;for(c in a)try{"function"==typeof a[c]&&b.push(c+": "+a[c].toString())}catch(e){b.push(c+": inaccessible")}return b}function dump(a,b){var c="";b||(b=0);for(var e="",d=0;d<b+1;d++)e+=" ";if("object"==typeof a)for(var f in a)d=a[f],"object"==typeof d?(c+=e+"'"+f+"' ...\n",c+=dump(d,b+1)):c+=e+"'"+f+"' => \""+d+'"\n';else c="===>"+a+"<===("+typeof a+")";return c};(function(a){a.fn.fc_set_tab_list=function(b){var c={toggle_speed:300,fc_list_forms:a(".fc_list_forms"),fc_list_add:a("#fc_list_add")};b=a.extend(c,b);return this.each(function(){var c=a(this),d=c.closest("ul").children("li"),f="fc_list_"+c.children("input").val(),g=a("#"+f),h=a("#fc_install_new");b.fc_list_forms.not(":first").slideUp(0);0===b.fc_list_add.size()?d.filter(":first").addClass("fc_active"):b.fc_list_add.unbind().click(function(){d.removeClass("fc_active");b.fc_list_forms.not(h).slideUp(0); h.slideDown(0);h.find("ul.fc_groups_tabs a:first").click();h.find("input[type=text]:first").focus();jQuery("#addon_details").html("")});c.not(".fc_type_heading").click(function(){d.removeClass("fc_active");c.addClass("fc_active");b.fc_list_forms.not("#"+f).slideUp(0);g.slideDown(0);g.find("ul.fc_groups_tabs a:first").click();jQuery("#fc_add_new_module").hide()})})}})(jQuery);(function(a){a.fn.fc_toggle_element=function(b){b=a.extend({show_on_start:!1,toggle_speed:300},b);return this.each(function(){var c=a(this),e="show";if(c.is("select")){var d=c.children("option:selected"),f=match_class_prefix("show___",d),e="show";if("undefined"==typeof f||0===f.length)f=match_class_prefix("hide___",d),e="hide";"undefined"!=typeof f&&(g=a("#"+f));!1===b.show_on_start?g.slideUp(0).addClass("fc_inactive_element hidden").removeClass("fc_active_element"):g.slideDown(0).addClass("fc_active_element").removeClass("fc_inactive_element hidden");
CWE-79
1
Client.prototype.openssh_forwardInStreamLocal = function(socketPath, cb) { if (!this._sock || !this._sock.writable || !this._sshstream || !this._sshstream.writable) throw new Error('Not connected'); var wantReply = (typeof cb === 'function'); var self = this; if (!this.config.strictVendor || (this.config.strictVendor && RE_OPENSSH.test(this._remoteVer))) { if (wantReply) { this._callbacks.push(function(had_err) { if (had_err) { return cb(had_err !== true ? had_err : new Error('Unable to bind to ' + socketPath)); } self._forwardingUnix[socketPath] = true; cb(); }); } return this._sshstream.openssh_streamLocalForward(socketPath, wantReply); } else if (wantReply) { process.nextTick(function() { cb(new Error('strictVendor enabled and server is not OpenSSH or compatible version')); }); } return true; };
CWE-78
6
function showUploadProgress(group, adapter, percent) { var text = ''; var opened; if (adapter || typeof group === 'string') { if (adapter) { // text += '<div class="adapter-upload-progress" data-adapter-name="' + adapter + '"'; } else { text += '<div class="group-upload-progress"'; } //text += ' data-adapter-group="' + group + '" style="position: absolute; width: 100%; height: 100%; opacity: ' + (percent ? 0.7 : 0) + '; top: 0; left: 0">'; opened = true; } else { percent = group; group = null; } //percent = 80; if (percent) { text += '<table style="height: 3px; " title="' + _('Upload') + ' ' + percent + '%" class="no-space" style="width:100%; height: 100%; opacity: 0.7">' + '<tr style="height: 100%" class="no-space">' + '<td class="no-space" style="width:' + percent + '%;background: blue"></td>' + '<td style="width:' + (100 - percent) + '%;opacity: 0.1" class="no-space"></td>' + '</tr>' + '</table>' ; } //text += percent ? '<table title="' + _('Upload') + ' ' + percent + '%" class="no-space" style="width:100%; height: 100%; opacity: 0.7"><tr style="height: 100%" class="no-space"><td class="no-space" style="width:' + percent + '%;background: blue"></td><td style="width:' + (100 - percent) + '%;opacity: 0.1" class="no-space"></td></tr></table>' : ''; if (opened) { //text += '</div>'; } return text; }
CWE-22
2
function(A,z,L,M,n){q.apply(this,arguments);m()};t.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};t.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=u.parentNode&&(t.destroy(),u.parentNode.removeChild(u));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var x=mxUtils.button(mxResources.get("insert"),function(A){t.clearCellOverlays();
CWE-79
1
51+"px"})}).resize()})}})(jQuery);(function(a){a.fn.fc_show_popup=function(b){b=a.extend({functionOpen:!1},b);return this.each(function(){var b=a(this),e=match_class_prefix("form_",b),d=a("#"+e);b.unbind().click(function(){d.find(".fc_valid, .fc_invalid").removeClass("fc_invalid fc_valid");var b=d.find('input[name="form_title"]').val();buttonsOpts=[];0<d.find(".fc_confirm_bar").size()&&(d.find(".fc_confirm_bar input").each(function(){var b=a(this);if(b.hasClass("hidden"))var c=function(){},e="hidden";else"reset"==b.prop("type")?(c= function(){d.find('input[type="reset"]').click();d.dialog("close")},e="reset"):(c=function(){d.submit()},e="submit");buttonsOpts.push({text:b.val(),click:c,"class":e})}),d.find(".fc_confirm_bar").hide());d.dialog({create:function(b,c){a(".ui-widget-header").removeClass("ui-corner-all").addClass("ui-corner-top")},open:function(a,b){"undefined"!=typeof functionOpen&&!1!==functionOpen&&functionOpen.call(this)},modal:!0,closeOnEscape:!0,title:b,minWidth:600,minHeight:400,buttons:buttonsOpts})})})}})(jQuery);function toTimeString(a){return(new Date(1E3*a)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0]}function TimeStringToSecs(a){a=a.split(":");return 3600*+a[0]+60*+a[1]+ +a[2]}
CWE-79
1
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerHTML="";else{var m= mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
CWE-94
14
Mocha.prototype.run = function(fn){ if (this.files.length) this.loadFiles(); var suite = this.suite; var options = this.options; var runner = new exports.Runner(suite); var reporter = new this._reporter(runner); runner.ignoreLeaks = false !== options.ignoreLeaks; runner.asyncOnly = options.asyncOnly; if (options.grep) runner.grep(options.grep, options.invert); if (options.globals) runner.globals(options.globals); if (options.growl) this._growl(runner, reporter); exports.reporters.Base.useColors = options.useColors; exports.reporters.Base.inlineDiffs = options.useInlineDiffs; return runner.run(fn); };
CWE-89
0
H.x+" "+H.y;S="";d=[];for(V=2;V<x.length;V+=2)H=P(V),S+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+S)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(K.x-H.x,K.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(K,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(z(F.getEvent()),F.consume())})});var D=function(K){return mxUtils.convertPoint(b.container,mxEvent.getClientX(K),mxEvent.getClientY(K))},G=function(K){for(x.push(K);x.length>f;)x.shift()},P=
CWE-79
1
function setStageHeadline(title) { if (getUtility().isUndefinedOrNull(title)) { title = buildTitleByFormElement(); } $(getHelper().getDomElementDataIdentifierSelector('stageHeadline')).html(title); };
CWE-79
1
"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;H.appendChild(R);mxUtils.write(H," "+F.title);l.appendChild(H);var W=function(J){if(null==J||"INPUT"!=mxEvent.getSource(J).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var V=document.createElement("pre"); V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);p.appendChild(V)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!= J&&mxEvent.consume(J)}};mxEvent.addListener(H,"click",W);mxEvent.addListener(H,"dblclick",function(J){R.checked=!R.checked;mxEvent.consume(J)});x.push(function(){return R.checked?F.id:null});0==C&&0==I&&W()})(G.entries[I])})(B[C])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
CWE-79
1
setup: function () { var data = this.model.get('data') || {}; this.entityType = this.model.get('relatedType') || data.entityType || null; this.entityId = this.model.get('relatedId') || data.entityId || null; this.entityName = this.model.get('relatedName') || data.entityName || null; this.messageData['relatedEntityType'] = this.translateEntityType(this.entityType); this.messageData['relatedEntity'] = '<a href="#' + this.entityType + '/view/' + this.entityId + '">' + this.entityName +'</a>'; this.createMessage(); }
CWE-79
1
c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxUtils.importNode(b.document,c.value,!0);d.appendChild(e);b=e.getAttribute("id");d.setAttribute("id",b);e.removeAttribute("id")}return d};a.beforeDecode=function(b,c,d){var e=c.cloneNode(!0),f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!= c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){f=this.idrefs[c];var g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var k=b.objects[g]||b.lookup(g);null==k&&(g=b.getElementById(g),null!=g&&(k=(mxCodecRegistry.codecs[g.nodeName]||this).decode(b,g)));d[f]=k}}return e};return a}());
CWE-79
1
var iter = function(value, prefix) { if (!prefix) prefix = []; if (Array.isArray(value)) { value.forEach(function(arrValue, idx) { iter(arrValue, prefix.concat(idx)); }); } else if (isPlainObject(value)) { Object.keys(value).forEach(function(key) { iter(value[key], prefix.concat(key)); }); } else { entries.push({key: prefix, value: value}); } };
CWE-915
35
Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
CWE-94
14
new Menu(mxUtils.bind(this,function(M,W){for(var U=0;U<S.length;U++)"-"==S[U]?M.addSeparator(W):V(M,W,mxResources.get(S[U])+"...",S[U])})))};EditorUi.prototype.installFormatToolbar=function(C){var D=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";D.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this, function(P,K){0<D.getSelectionCount()?(C.appendChild(G),G.innerHTML="Selected: "+D.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var z=!1;EditorUi.prototype.initFormatWindow=function(){if(!z&&null!=this.formatWindow){z=!0;this.formatWindow.window.setClosable(!1);var C=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){C.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
CWE-79
1
function AuthContext(stream, username, service, method, cb) { EventEmitter.call(this); var self = this; this.username = this.user = username; this.service = service; this.method = method; this._initialResponse = false; this._finalResponse = false; this._multistep = false; this._cbfinal = function(allowed, methodsLeft, isPartial) { if (!self._finalResponse) { self._finalResponse = true; cb(self, allowed, methodsLeft, isPartial); } }; this._stream = stream; }
CWE-78
6
function PMA_createProfilingChartJqplot(target, data) { return $.jqplot(target, [data], { seriesDefaults: { renderer: $.jqplot.PieRenderer, rendererOptions: { showDataLabels: true } }, legend: { show: true, location: 'e' }, // from http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette seriesColors: [ '#fce94f', '#fcaf3e', '#e9b96e', '#8ae234', '#729fcf', '#ad7fa8', '#ef2929', '#eeeeec', '#888a85', '#c4a000', '#ce5c00', '#8f5902', '#4e9a06', '#204a87', '#5c3566', '#a40000', '#babdb6', '#2e3436' ] } ); }
CWE-79
1
oauth2: new XOAuth2({ user: 'testuser', clientId: '{Client ID}', clientSecret: '{Client Secret}', refreshToken: 'refrsesh-token', accessToken: 'uuuuu', accessUrl: 'http://localhost:' + XOAUTH_PORT }) }, function(err) { expect(err).to.exist; expect(client.authenticated).to.be.false; done(); } ); });
CWE-88
3
k.isRemoteFileFormat(z,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(z,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):A||g()}},function(q){g(q)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,q,v,x,A,z,L,M){z=null!= z?z:!0;var n=!1,y=null,K=mxUtils.bind(this,function(B){var F=null;null!=B&&"<mxlibrary"==B.substring(0,10)?this.loadLibrary(new LocalLibrary(this,B,v)):F=this.importXml(B,g,k,z,null,null!=M?mxEvent.isControlDown(M):null);null!=x&&x(F)});"image"==e.substring(0,5)?(A=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(y=this.importXml(e,g,k,z,null,null!=M?mxEvent.isControlDown(M):null),A=!0)),A||(e=this.editor.graph,A=c.indexOf(";"),0<A&&(c=c.substring(0, A)+c.substring(c.indexOf(",",A+1))),z&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),y=[e.insertVertex(null,null,"",g,k,m,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(n=!0,this.importGraphML(c,K)):null!=A&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(n=!0,this.importVisio(A,K)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?
CWE-79
1
if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){X=mxUtils.getTextContent(ba[Y]);T=b.stringToCells(Graph.decompress(X));var ea=b.editor.graph.getBoundingBoxFromGeometry(T);d(null,null,0,0,0,0,{xml:X,w:ea.width,h:ea.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}
CWE-79
1
title : $('input:checked', uitype).val(), text : 'confirmReq', accept : { label : 'btnApply', callback : function() { save(); } }, cancel : { label : 'btnCancel', callback : function(){} } }); return; } if (!((c >= 48 && c <= 57) || (c >= 96 && c <= 105))) { e.preventDefault(); } })
CWE-89
0
Hook.prototype.error = function(err){ if (0 == arguments.length) { var err = this._error; this._error = null; return err; } this._error = err; };
CWE-89
0
f.appendChild(m);f.appendChild(l);k.appendChild(f);var q=c,v,x,A=function(n,y,K,B){var F="data:"==n.substring(0,5);!b.isOffline()||F&&"undefined"===typeof chrome?0<n.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(n,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=y&&null!=K?Math.max(y/G.width,K/G.height):Math.min(1,Math.min(520/G.width,520/G.height));t&&(n=b.convertDataUri(n));d(n,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,v,x)}, function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(n,null,null,q,v,x)):(n=b.convertDataUri(n),y=null==y?120:y,K=null==K?100:K,b.hideDialog(),d(n,y,K,q,v,x))},z=function(n,y){if(null!=n){var K=u?null:g.getModel().getGeometry(g.getSelectionCell());null!=K?A(n,K.width,K.height,y):A(n,null,null,y)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
CWE-79
1
Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,D.clientY);null!=D&&D.parentNode!= x;)D=D.parentNode;var G=null;if(null!=D){var P=x.firstChild;for(G=0;null!=P&&P!=D;)P=P.nextSibling,G++}return G}function d(D,G,P,K,F,H,S,V,M){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==D&&null!=S||null==A[D]){var W=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));Q.style.color=null==R.title||0==R.title.length?"#d0d0d0":""};x.style.backgroundImage=
CWE-79
1
"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(ab,mxRectangleShape);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.isHtmlAllowed=function(){return!1};ab.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
CWE-79
1
mxCellEditor.prototype.installListeners=function(a){mxEvent.addListener(a,"dragstart",mxUtils.bind(this,function(d){this.graph.stopEditing(!1);mxEvent.consume(d)}));mxEvent.addListener(a,"blur",mxUtils.bind(this,function(d){this.blurEnabled&&this.focusLost(d)}));mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(d){mxEvent.isConsumed(d)||(this.isStopEditingEvent(d)?(this.graph.stopEditing(!1),mxEvent.consume(d)):27==d.keyCode&&(this.graph.stopEditing(this.isCancelEditingKeyEvent(d)),mxEvent.consume(d)))})); var b=mxUtils.bind(this,function(d){null!=this.editingCell&&this.clearOnChange&&a.innerHTML==this.getEmptyLabelText()&&(!mxClient.IS_FF||8!=d.keyCode&&46!=d.keyCode)&&(this.clearOnChange=!1,a.innerHTML="")});mxEvent.addListener(a,"keypress",b);mxEvent.addListener(a,"paste",b);b=mxUtils.bind(this,function(d){null!=this.editingCell&&(0==this.textarea.innerHTML.length||"<br>"==this.textarea.innerHTML?(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length): this.clearOnChange=!1)});mxEvent.addListener(a,mxClient.IS_IE11||mxClient.IS_IE?"keyup":"input",b);mxEvent.addListener(a,"cut",b);mxEvent.addListener(a,"paste",b);b=mxClient.IS_IE11||mxClient.IS_IE?"keydown":"input";var c=mxUtils.bind(this,function(d){null!=this.editingCell&&this.autoSize&&!mxEvent.isConsumed(d)&&(null!=this.resizeThread&&window.clearTimeout(this.resizeThread),this.resizeThread=window.setTimeout(mxUtils.bind(this,function(){this.resizeThread=null;this.resize()}),0))});mxEvent.addListener(a, b,c);mxEvent.addListener(window,"resize",c);9<=document.documentMode?(mxEvent.addListener(a,"DOMNodeRemoved",c),mxEvent.addListener(a,"DOMNodeInserted",c)):(mxEvent.addListener(a,"cut",c),mxEvent.addListener(a,"paste",c))};mxCellEditor.prototype.isStopEditingEvent=function(a){return 113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
CWE-79
1
IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function V(P){if(null!=P){P.sort(function(ia,la){return new Date(ia.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}J.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=J;for(J=0;J<X.length;J++)V(X[J].replies),
CWE-94
14
var extraOpts = { allowHalfOpen: (opts.allowHalfOpen !== false) }; return openChannel(this, 'session', extraOpts, function(err, chan) { if (err) return cb(err); var todo = []; function reqCb(err) { if (err) { chan.close(); return cb(err); } if (todo.length) todo.shift()(); } if (self.config.allowAgentFwd === true || (opts && opts.agentForward === true && self.config.agent !== undefined)) { todo.push(function() { reqAgentFwd(chan, reqCb); }); } if (typeof opts === 'object' && opts !== null) { if (typeof opts.env === 'object' && opts.env !== null) reqEnv(chan, opts.env); if ((typeof opts.pty === 'object' && opts.pty !== null) || opts.pty === true) { todo.push(function() { reqPty(chan, opts.pty, reqCb); }); } if ((typeof opts.x11 === 'object' && opts.x11 !== null) || opts.x11 === 'number' || opts.x11 === true) { todo.push(function() { reqX11(chan, opts.x11, reqCb); }); } } todo.push(function() { reqExec(chan, cmd, opts, cb); }); todo.shift()(); }); };
CWE-78
6
mxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||"hidden"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var k= this.graph.getTooltip(c,d,e,f);this.show(k,e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden",this.div.innerHTML="")};
CWE-79
1
Menus.prototype.createPopupMenu=function(C,D,G){var P=this.editorUi.editor.graph;C.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?P.isEnabled()&&(C.addSeparator(),1==P.getSelectionCount()&&this.addMenuItems(C,["-","lockUnlock"],null,G)):1==P.getSelectionCount()?(P.isCellFoldable(P.getSelectionCell())&&this.addMenuItems(C,P.isCellCollapsed(D)?["expand"]:["collapse"],null,G),this.addMenuItems(C,["collapsible","-","lockUnlock","enterGroup"],null,G),C.addSeparator(),this.addSubmenu("layout", C)):P.isSelectionEmpty()&&P.isEnabled()?(C.addSeparator(),this.addMenuItems(C,["editData"],null,G),C.addSeparator(),this.addSubmenu("layout",C),this.addSubmenu("insert",C),this.addMenuItems(C,["-","exitGroup"],null,G)):P.isEnabled()&&this.addMenuItems(C,["-","lockUnlock"],null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(C,D,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(C,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=
CWE-79
1
function(aa){T--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[u].substring(0,Q)),R)}N()}else E(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(u[E]=Graph.fontMapping[E]);return u};Editor.prototype.embedExtFonts=
CWE-79
1
"geCommentActionLnk";mxUtils.write(da,P);Y.appendChild(da);mxEvent.addListener(da,"click",function(ha){O(ha,J);ha.preventDefault();mxEvent.consume(ha)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function P(Y){O.push(R);if(null!=Y.replies)for(var da=0;da<Y.replies.length;da++)R=R.nextSibling,P(Y.replies[da])}var O=[],R=X;P(J);return{pdiv:R,replies:O}}function V(P,O,R,Y,da){function ha(){g(ua);J.addReply(aa,function(la){aa.id=la;J.replies.push(aa);m(ua);R&&R()},function(la){Z();k(ua); b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,da)}function Z(){c(aa,ua,function(la){ha()},!0)}var ea=W().pdiv,aa=b.newComment(P,b.getCurrentUser());aa.pCommentId=J.id;null==J.replies&&(J.replies=[]);var ua=q(aa,J.replies,ea,S+1);O?Z():ha()}if(U||!J.isResolved){n.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",J.id);X.style.marginLeft=20*S+5+"px";J.isResolved&&!Editor.isDarkMode()&&
CWE-79
1
file._copy = function(srcpath, destpath, options) { if (!options) { options = {}; } // If a process function was specified, and noProcess isn't true or doesn't // match the srcpath, process the file's source. var process = options.process && options.noProcess !== true && !(options.noProcess && file.isMatch(options.noProcess, srcpath)); // If the file will be processed, use the encoding as-specified. Otherwise, // use an encoding of null to force the file to be read/written as a Buffer. var readWriteOptions = process ? options : {encoding: null}; // Actually read the file. var contents = file.read(srcpath, readWriteOptions); if (process) { grunt.verbose.write('Processing source...'); try { contents = options.process(contents, srcpath, destpath); grunt.verbose.ok(); } catch (e) { grunt.verbose.error(); throw grunt.util.error('Error while processing "' + srcpath + '" file.', e); } } // Abort copy if the process function returns false. if (contents === false) { grunt.verbose.writeln('Write aborted.'); } else { file.write(destpath, contents, readWriteOptions); } };
CWE-367
29
function getNews(actualVersion, adapter) { var text = ''; if (adapter.news) { for (var v in adapter.news) { if (adapter.news.hasOwnProperty(v)) { if (systemLang === v) text += (text ? '\n' : '') + adapter.news[v]; if (v === 'en' || v === 'ru' || v === 'de') continue; if (v === actualVersion) break; text += (text ? '\n' : '') + (adapter.news[v][systemLang] || adapter.news[v].en); } } } return text; }
CWE-22
2
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
CWE-79
1
fetch: function () { var data = Dep.prototype.fetch.call(this); data.translatedOptions = {}; (data[this.name] || []).forEach(function (value) { data.translatedOptions[value] = this.$el.find('input[data-name="translatedValue"][data-value="'+value+'"]').val() || value; }, this); return data; }
CWE-79
1
function doIt() { if (idOrList.length === 0) { return callback && setTimeout(callback, 0, null, id); } id = idOrList.pop(); if (main.objects[id] && main.objects[id].common && (main.objects[id].common['object-non-deletable'] || main.objects[id].common.dontDelete)) { main.showMessage (_ ('Cannot delete "%s" because not allowed', id), '', 'notifications'); setTimeout(doIt, 0); } else { var obj = main.objects[id]; main.socket.emit('delObject', id, function (err) { if (err && err !== 'Not exists') { main.showError (err); return callback(err); } if (obj && obj.type === 'state') { main.socket.emit ('delState', id, function (err) { if (err && err !== 'Not exists') { main.showError (err); return callback(err); } setTimeout(doIt, 0); }); } else { setTimeout(doIt, 0); } }); } }
CWE-22
2
action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),A=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var B=Math.max(y/p,A/p);if(1<B){var I=Math.round(y/B),O=Math.round(A/B),t=document.createElement("canvas");t.width=I;t.height=O;t.getContext("2d").drawImage(d,0,0,I,O);var z= t.toDataURL();if(z.length<g.length){var L=document.createElement("canvas");L.width=I;L.height=O;var C=L.toDataURL();z!==C&&(g=z,y=I,A=O)}}}catch(D){}k(g,y,A)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
CWE-79
1
value: (add_as_favorite? 1 : 0) }, function(data) { $(el).find("img").removeClass("silk-heart_add"); $(el).find("img").removeClass("silk-heart_delete"); if(data=="true") { if(add_as_favorite) { $(el).parent().attr("favorite", 1); $(el).find("img").addClass("silk-heart_delete"); } else { $(el).parent().attr("favorite", 0); $(el).find("img").addClass("silk-heart_add"); } } else { // show error navigate_notification(navigate_lang_dictionary[56]); } navigate_extensions_refresh(); }); });
CWE-434
5
function(K){l=K};this.setAutoScroll=function(K){p=K};this.setOpenFill=function(K){q=K};this.setStopClickEnabled=function(K){A=K};this.setSelectInserted=function(K){B=K};this.setSmoothing=function(K){f=K};this.setPerfectFreehandMode=function(K){O=K};this.setBrushSize=function(K){I.size=K};this.getBrushSize=function(){return I.size};var t=function(K){y=K;b.getRubberband().setEnabled(!K);b.graphHandler.setSelectEnabled(!K);b.graphHandler.setMoveEnabled(!K);b.container.style.cursor=K?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
CWE-79
1
function usercheck_init_staff(i) { var obj = document.getElementById('ajax_output_st'); obj.innerHTML = ''; document.getElementById('usr_err_check').value = '0'; if (i.value.length < 1) return; var err = new Array(); if (i.value.match(/[^A-Za-z0-9_]/)) err[err.length] = 'Username can only contain letters, numbers and underscores'; if (i.value.length < 3) err[err.length] = 'Username Too Short'; if (err != '') { obj.style.color = '#ff0000'; obj.innerHTML = err.join('<br />'); return; } ajax_call('Validator.php?u=' + i.value + 'stud', usercheck_callback_staff); }
CWE-89
0
popState:function popState() { var n = this.conditionStack.length - 1; if (n > 0) { return this.conditionStack.pop(); } else { return this.conditionStack[0]; } },
CWE-94
14
EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),c&&(c=parseInt(x.getAttribute("width")),m=parseInt(x.getAttribute("height")),x.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),n+="max-width:100%;max-height:"+m+"px;",x.removeAttribute("height")),""!=n&&x.setAttribute("style",n),this.editor.addFontCss(x),this.editor.graph.mathEnabled&&this.editor.addMathCss(x),v(mxUtils.getXml(x))};EditorUi.prototype.timeSince=function(c){c= Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
CWE-79
1
render(markup, theme, options) { const html = htmlUtils.processImageTags(markup, data => { if (!data.src) return null; const r = utils.imageReplacement(this.ResourceModel_, data.src, options.resources, this.resourceBaseUrl_); if (!r) return null; if (typeof r === 'string') { return { type: 'replaceElement', html: r, }; } else { return { type: 'setAttributes', attrs: r, }; } }); const cssStrings = noteStyle(theme, options); const styleHtml = `<style>${cssStrings.join('\n')}</style>`; return { html: styleHtml + html, pluginAssets: [], }; }
CWE-79
1
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
CWE-79
1
function rawText() { TopNav.hideAllButtons(); Alert.showLoading('Showing raw text…', 'time'); let paste = PasteViewer.getText(); // push a new state to allow back navigation with browser back button history.pushState( {type: 'raw'}, document.title, // recreate paste URL Helper.baseUri() + '?' + Model.getPasteId() + '#' + CryptTool.base58encode(Model.getPasteKey()) ); // we use text/html instead of text/plain to avoid a bug when // reloading the raw text view (it reverts to type text/html) const $head = $('head').children().not('noscript, script, link[type="text/css"]'), newDoc = document.open('text/html', 'replace'); newDoc.write('<!DOCTYPE html><html><head>'); for (let i = 0; i < $head.length; ++i) { newDoc.write($head[i].outerHTML); } newDoc.write('</head><body><pre>' + DOMPurify.sanitize(Helper.htmlEntities(paste)) + '</pre></body></html>'); newDoc.close(); }
CWE-79
1
self.redraw = function() { var items = options.items; var columns = options.columns; var builder = []; var m = {}; for (var i = 0, length = items.length; i < length; i++) { builder.push('<tr class="ui-grid-row" data-index="' + i + '">'); for (var j = 0, jl = columns.length; j < jl; j++) { var column = columns[j]; var val = items[i][column.name]; m.value = column.template ? column.template(items[i], column) : column.render ? column.render(val, column, items[i]) : val == null ? '' : (column.format ? val.format(column.format) : val); m.index = j; m.align = column.align; m.background = column.background; builder.push(self.template(m, column)); } builder.push('</tr>'); } tbody.find('.ui-grid-row').remove(); tbody.prepend(builder.join('')); container.rclass('noscroll'); scroll && container.prop('scrollTop', 0); scroll = false; eheight = 0; self.resize(0); };
CWE-79
1
sanitizeHtmlLight: function (value) { value = value || ''; value = value.replace(/<[\/]{0,1}(base)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(object)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(embed)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(applet)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(iframe)[^><]*>/gi, ''); value = value.replace(/<[\/]{0,1}(script)[^><]*>/gi, ''); value = value.replace(/<[^><]*([^a-z]{1}on[a-z]+)=[^><]*>/gi, function (match) { return match.replace(/[^a-z]{1}on[a-z]+=/gi, ' data-handler-stripped='); }); value = value.replace(/href=" *javascript\:(.*?)"/gi, function(m, $1) { return 'removed=""'; }); value = value.replace(/href=' *javascript\:(.*?)'/gi, function(m, $1) { return 'removed=""'; }); value = value.replace(/src=" *javascript\:(.*?)"/gi, function(m, $1) { return 'removed=""'; }); value = value.replace(/src=' *javascript\:(.*?)'/gi, function(m, $1) { return 'removed=""'; }); return value; },
CWE-79
1
!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var u=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(E){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
CWE-79
1
B)):N.isSelectionEmpty()&&N.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):N.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(B,F,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(B,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=
CWE-79
1
__data_already_exists(data) { return this.__find_array_index(data, this.data) >= 0; }
CWE-79
1
this.customFonts)))}finally{U.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),y,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
CWE-79
1
a.firstChild;null!=a;)a.nodeType==b&&c.push(a),a=a.nextSibling;return c},importNode:function(a,b,c){return mxClient.IS_IE&&(null==document.documentMode||10>document.documentMode)?mxUtils.importNodeImplementation(a,b,c):a.importNode(b,c)},importNodeImplementation:function(a,b,c){switch(b.nodeType){case 1:var d=a.createElement(b.nodeName);if(b.attributes&&0<b.attributes.length)for(var e=0;e<b.attributes.length;e++)d.setAttribute(b.attributes[e].nodeName,b.getAttribute(b.attributes[e].nodeName));if(c&& b.childNodes&&0<b.childNodes.length)for(e=0;e<b.childNodes.length;e++)d.appendChild(mxUtils.importNodeImplementation(a,b.childNodes[e],c));return d;case 3:case 4:case 8:return a.createTextNode(null!=b.nodeValue?b.nodeValue:b.value)}},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument&&(a=document.implementation.createDocument("","",null));return a},parseXml:function(a){return(new DOMParser).parseFromString(a,"text/xml")},clearSelection:function(){return document.selection?
CWE-79
1
function next(suite) { self.suite = suite; if (!suite) { self.suite = orig; return fn(); } self.hook(name, function(err){ if (err) { var errSuite = self.suite; self.suite = orig; return fn(err, errSuite); } next(suites.pop()); }); }
CWE-89
0
main.resubscribeStates = function () { for (var pattern in main.subscribesStates) { if (main.subscribesStates.hasOwnProperty(pattern) && main.subscribesStates[pattern]) { console.debug('Re-Subscribe: ' + pattern); main.socket.emit('subscribe', pattern); } } };
CWE-22
2
_deactivate: function( event ) { var draggable = $.ui.ddmanager.current; if ( this.options.activeClass ) { this.element.removeClass( this.options.activeClass ); } if ( draggable ){ this._trigger( "deactivate", event, this.ui( draggable ) ); } },
CWE-89
0
_mdBlockQuote(str) { return str.replace(/^&gt;\s(.*)/, (all, quote) => '<blockquote>' + quote + '</blockquote>'); }
CWE-79
1
(function(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery);
CWE-89
0
z.y,t.width/L,t.height/L,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";t=new TextareaDialog(c,"Paste Data:",t,function(z){if(0<z.length)try{var L=function(K){function F(J){if(null==E[J]){if(E[J]=!0,null!=V[J]){for(;0<V[J].length;){var T=V[J].pop();F(T)}delete V[J]}}else mxLog.debug(H+": Visited: "+J)}var H=K.parentNode.id,S=K.childNodes;K={};
CWE-79
1
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
CWE-79
1
departments: function (next) { Department.getUserDepartments(savedId, next) }
CWE-521
4
G&&null!=K&&null!=K[y]?K[y].getAttribute("name"):"pagenumber"==G?y+1:"pagecount"==G?null!=K?K.length:1:B.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title",
CWE-79
1
function HostbasedAuthContext(stream, username, service, method, pkInfo, cb) { AuthContext.call(this, stream, username, service, method, cb); this.key = { algo: pkInfo.keyAlgo, data: pkInfo.key }; this.signature = pkInfo.signature; var sigAlgo; if (this.signature) { // TODO: move key type checking logic to ssh2-streams switch (pkInfo.keyAlgo) { case 'ssh-rsa': case 'ssh-dss': sigAlgo = 'sha1'; break; case 'ssh-ed25519': sigAlgo = null; break; case 'ecdsa-sha2-nistp256': sigAlgo = 'sha256'; break; case 'ecdsa-sha2-nistp384': sigAlgo = 'sha384'; break; case 'ecdsa-sha2-nistp521': sigAlgo = 'sha512'; break; } } this.sigAlgo = sigAlgo; this.blob = pkInfo.blob; this.localHostname = pkInfo.localHostname; this.localUsername = pkInfo.localUsername; }
CWE-78
6
this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
CWE-79
1
init: function (editorInstance) { initPasteEvent(editorInstance); var pluginName = 'base64image-dialog'; editorInstance.ui.addToolbarGroup('base64image', 'insert'); editorInstance.ui.addButton('base64image', { label: editorInstance.lang.common.image, command: pluginName, toolbar: 'insert' }); CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/dialog.js'); editorInstance.addCommand( pluginName, new CKEDITOR.dialogCommand(pluginName, { allowedContent: 'img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}', requiredContent: 'img[alt,src]', contentTransformations: [ ['img{width}: sizeToStyle', 'img[width]: sizeToAttribute'], ['img{float}: alignmentToStyle', 'img[align]: alignmentToAttribute'] ] }) ); editorInstance.on('doubleclick', function (evt) { if (evt.data.element && !evt.data.element.isReadOnly() && evt.data.element.getName() === 'img') { evt.data.dialog = pluginName; editorInstance.getSelection().selectElement(evt.data.element); } }); if (editorInstance.addMenuItem) { editorInstance.addMenuGroup('imageToBase64Group'); editorInstance.addMenuItem('imageToBase64Item', { label: editorInstance.lang.common.image, icon: this.path + 'icons/base64image.png', command: pluginName, group: 'imageToBase64Group' }); } if (editorInstance.contextMenu) { editorInstance.contextMenu.addListener(function (element, selection) { if (element && element.getName() === 'img') { editorInstance.getSelection().selectElement(element); return { imageToBase64Item: CKEDITOR.TRISTATE_ON }; } return null; }); } }
CWE-434
5
return na}function B(){function pa(oa,na){var Ja=mxResources.get(oa);null==Ja&&(Ja=oa.substring(0,1).toUpperCase()+oa.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+na.length+")"}function sa(oa,na,Ja){mxEvent.addListener(na,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ja?Ba[oa][Ja]:Da[oa],W=null,M(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(oa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
CWE-79
1
mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));a=mxUtils.replaceTrailingNewlines(a,"<div><br></div>");a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a;var b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if("fill"==this.overflow|| "width"==this.overflow)null!=b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+mxUtils.htmlEntities(b)+";");null!=c&&(d+="border:1px solid "+mxUtils.htmlEntities(c)+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+(mxConstants.ABSOLUTE_LINE_HEIGHT?this.size*mxConstants.LINE_HEIGHT+"px":mxConstants.LINE_HEIGHT)+'">'+a+"</div>"}this.node.innerHTML= a;a=this.node.getElementsByTagName("div");0<a.length&&(b=this.textDirection,b==mxConstants.TEXT_DIRECTION_AUTO&&this.dialect!=mxConstants.DIALECT_STRICTHTML&&(b=this.getAutoDirection()),b==mxConstants.TEXT_DIRECTION_LTR||b==mxConstants.TEXT_DIRECTION_RTL?a[a.length-1].setAttribute("dir",b):a[a.length-1].removeAttribute("dir"))}};
CWE-94
14
function getData(callback) { adapter.log.info('requesting all states'); let tasks = 0; tasks++; adapter.getForeignStates('*', (err, res) => { adapter.log.info('received all states'); states = res; !--tasks && callback && callback(); }); adapter.log.info('requesting all objects'); tasks++; adapter.objects.getObjectList({include_docs: true}, (err, res) => { adapter.log.info('received all objects'); if (res) { res = res.rows; objects = {}; let tmpPath = ''; for (let i = 0; i < res.length; i++) { objects[res[i].doc._id] = res[i].doc; if (res[i].doc.type === 'instance' && res[i].doc.common && res[i].doc.common.tmpPath) { tmpPath && adapter.log.warn('tmpPath has multiple definitions!!'); tmpPath = res[i].doc.common.tmpPath; } } // Some adapters want access on specified tmp directory if (tmpPath) { adapter.config.tmpPath = tmpPath; adapter.config.tmpPathAllow = true; } createUpdateInfo(); writeUpdateInfo(); } !--tasks && callback && callback(); }); }
CWE-22
2
text: String.format(i18n._('User: {0}'), Tine.Tinebase.registry.get('currentAccount').accountDisplayName), menu: this.getUserActions(), menuAlign: 'tr-br', iconCls: Tine.Tinebase.registry.get('userAccountChanged') ? 'renderer_accountUserChangedIcon' : 'renderer_accountUserIcon' },
CWE-79
1
text : Ext.util.Format.htmlEncode(this.app.i18n._hidden(attr.name)), qtip : Tine.Tinebase.common.doubleEncode(attr.description ? this.app.i18n._hidden(attr.description) + ' ' + addText : addText), selected : attr.id === this.selectedFilterId, id : attr.id, sorting : attr.sorting, draggable : true, allowDrop : false, leaf : attr.leaf === false ? attr.leaf : true, cls : 'tinebase-westpanel-node-favorite' + addClass }); }
CWE-79
1
$scope.deleteNode = function(node) { bootbox.confirm('Are you sure you want to remove the node ' + node.nodeLabel + '?', function(ok) { if (ok) { RequisitionsService.startTiming(); RequisitionsService.deleteNode(node).then( function() { // success var index = -1; for(var i = 0; i < $scope.filteredNodes.length; i++) { if ($scope.filteredNodes[i].foreignId === node.foreignId) { index = i; } } if (index > -1) { $scope.filteredNodes.splice(index,1); } growl.success('The node ' + node.nodeLabel + ' has been deleted.'); }, $scope.errorHandler ); } }); };
CWE-79
1
r=g.isEventsEnabled();g.setEventsEnabled(!1);var q=this.graph.isEnabled();this.graph.setEnabled(!1);var t=g.getTranslate();g.translate=new mxPoint(a,b);var u=this.graph.cellRenderer.redraw,x=g.states;a=g.scale;if(this.clipping){var A=new mxRectangle((f.x+t.x)*a,(f.y+t.y)*a,f.width*a/p,f.height*a/p),E=this;this.graph.cellRenderer.redraw=function(D,B,v){if(null!=D){var y=x.get(D.cell);if(null!=y&&(y=g.getBoundingBox(y,!1),null!=y&&0<y.width&&0<y.height&&!mxUtils.intersects(A,y))||!E.isCellVisible(D.cell))return}u.apply(this, arguments)}}a=null;try{var C=[this.getRoot()];a=new mxTemporaryCellStates(g,c,C,null,mxUtils.bind(this,function(D){return this.getLinkForCellState(D)}))}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position="relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)C=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position=
CWE-94
14