code
stringlengths
12
2.05k
label_name
stringlengths
6
8
label
int64
0
95
$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
function updateLinkColor() { var div = document.createElement('div'); div.style.width = '100%'; div.style.height = '100%'; div.style.boxSizing = 'border-box'; if (linkColor != null && linkColor != mxConstants.NONE) { div.style.border = '1px solid black'; div.style.backgroundColor = linkColor; } else { div.style.backgroundPosition = 'center center'; div.style.backgroundRepeat = 'no-repeat'; div.style.backgroundImage = 'url(\'' + Dialog.prototype.closeImage + '\')'; } linkButton.innerHTML = ''; linkButton.appendChild(div); };
CWE-94
14
function extractProtocol(address) { address = trimLeft(address); var match = protocolre.exec(address) , protocol = match[1] ? match[1].toLowerCase() : '' , slashes = !!(match[2] && match[2].length >= 2) , rest = match[2] && match[2].length === 1 ? '/' + match[3] : match[3]; return { protocol: protocol, slashes: slashes, rest: rest }; }
CWE-601
11
aa&&(la=pa[ca],null==la&&(la={},pa[ca]=la),ca=la[aa],null==ca&&(ca=[],la[aa]=ca),ca.push(na))}ha=ha.nextSibling}G(za,ea,wa)}})}function H(ha){E&&(ya.scrollTop=0,da.innerHTML="",Ea.spin(da),U=!1,V=!0,fa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,E(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ha?null:u))}function F(ha){if(""==ha)null!=n&&(n.click(),n=null);else{if(null==TemplatesDialog.tagsList[d]){var qa={};for(Da in za)for(var aa=za[Da],ca=0;ca<aa.length;ca++){var na=
CWE-94
14
"none"};var Fa=function(){pa.innerHTML="";if(null!=F.currentPage){mxUtils.write(pa,F.currentPage.getName());var aa=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var na=F.currentPage.getId();pa.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+aa+")"+(null!=na?" ["+na+"]":""))}};Ea.parentNode.removeChild(Ea);var Pa=F.actions.get("delete"),Aa=B("",Pa.funct,null,mxResources.get("delete"),Pa,Editor.trashImage);Aa.style.opacity="0.1";Q.appendChild(Aa);Pa.addListener("stateChanged",
CWE-94
14
!0,d=JSON.parse(this.getPersistentToken(!0));null!=d?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(g){200<=g.getStatus()&&299>=g.getStatus()?this.updateAuthInfo(JSON.parse(g.getText()),d.remember,!1,f,c):(this.clearPersistentToken(),this.setUser(null),b=null,401!=g.getStatus()||m?c({message:mxResources.get("accessDenied"),retry:n}):n())}),c):this.ui.showAuthDialog(this,
CWE-79
1
Unicode: function(name) { var HD = this.GetBrackets(name), font; if (HD) { if (HD.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)) {HD = HD.replace(/ /g,"").split(/,/); font = this.GetBrackets(name)} else {font = HD; HD = null} } var n = this.trimSpaces(this.GetArgument(name)), N = parseInt(n.match(/^x/) ? "0"+n : n); if (!UNICODE[N]) {UNICODE[N] = [800,200,font,N]} else if (!font) {font = UNICODE[N][2]} if (HD) { UNICODE[N][0] = Math.floor(HD[0]*1000); UNICODE[N][1] = Math.floor(HD[1]*1000); } var variant = this.stack.env.font, def = {}; if (font) { UNICODE[N][2] = def.fontfamily = font.replace(/"/g,"'"); if (variant) { if (variant.match(/bold/)) {def.fontweight = "bold"} if (variant.match(/italic|-mathit/)) {def.fontstyle = "italic"} } } else if (variant) {def.mathvariant = variant} def.unicode = [].concat(UNICODE[N]); // make a copy this.Push(MML.mtext(MML.entity("#"+n)).With(def)); }
CWE-79
1
function reqShell(chan, cb) { if (chan.outgoing.state !== 'open') { cb(new Error('Channel is not open')); return true; } chan._callbacks.push(function(had_err) { if (had_err) { return cb(had_err !== true ? had_err : new Error('Unable to open shell')); } chan.subtype = 'shell'; cb(undefined, chan); }); return chan._client._sshstream.shell(chan.outgoing.id, true); }
CWE-78
6
Progress.prototype.draw = function(ctx){ try { var percent = Math.min(this.percent, 100) , size = this._size , half = size / 2 , x = half , y = half , rad = half - 1 , fontSize = this._fontSize; ctx.font = fontSize + 'px ' + this._font; var angle = Math.PI * 2 * (percent / 100); ctx.clearRect(0, 0, size, size); // outer circle ctx.strokeStyle = '#9f9f9f'; ctx.beginPath(); ctx.arc(x, y, rad, 0, angle, false); ctx.stroke(); // inner circle ctx.strokeStyle = '#eee'; ctx.beginPath(); ctx.arc(x, y, rad - 1, 0, angle, true); ctx.stroke(); // text var text = this._text || (percent | 0) + '%' , w = ctx.measureText(text).width; ctx.fillText( text , x - w / 2 + 1 , y + fontSize / 2 - 1); } catch (ex) {} //don't fail if we can't render progress return this; };
CWE-89
0
this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,q,v,x,A,z,L,M,n){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var y=this.editor.graph.isSelectionEmpty();g=null!=g?g:y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(K){this.spinner.stop();try{this.saveCanvas(K, m?this.getFileData(!0,null,null,null,g,x):null,A,null==this.pages||0==this.pages.length,L)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}),null,g,c||1,e,k,null,null,q,v,z,M,n)}catch(K){this.spinner.stop(),this.handleError(K)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,q,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var A=
CWE-79
1
qtip: Tine.Tinebase.common.doubleEncode(attr.name), leaf: !!attr.account_grants, allowDrop: !!attr.account_grants && attr.account_grants.addGrant }); // copy 'real' data to container space attr.container = Ext.copyTo({}, attr, Tine.Tinebase.Model.Container.getFieldNames()); },
CWE-79
1
pa=ma.scale;ma.scale=1;var ua=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=pa;ua="data:image/svg+xml;base64,"+ua;var ya=Ba.gridSize*ma.gridSteps*oa,Fa=Ba.getGraphBounds(),Ma=ma.translate.x*pa,Oa=ma.translate.y*pa,Qa=Ma+(Fa.x-Ma)/pa-ta,Ta=Oa+(Fa.y-Oa)/pa-ta,za=new Image;za.onload=function(){try{for(var wa=-Math.round(ya-mxUtils.mod((Ma-Qa)*oa,ya)),Ea=-Math.round(ya-mxUtils.mod((Oa-Ta)*oa,ya));wa<T;wa+=ya)for(var Da=Ea;Da<ca;Da+=ya)ia.drawImage(za,wa/oa,Da/oa);L()}catch(La){null!= S&&S(La)}};za.onerror=function(wa){null!=S&&S(wa)};za.src=ua}else L()}catch(wa){null!=S&&S(wa)}});Za.onerror=function(L){null!=S&&S(L)};Aa&&this.graph.addSvgShadow(Pa);this.graph.mathEnabled&&this.addMathCss(Pa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Pa,this.resolvedFontCss),Za.src=Editor.createSvgDataUri(mxUtils.getXml(Pa))}catch(L){null!=S&&S(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Pa,L),this.loadFonts(z)}catch(M){null!=
CWE-79
1
mxConstants.GUIDE_STROKEWIDTH);V.dialect=mxConstants.DIALECT_SVG;V.pointerEvents=!1;V.init(p.graph.getView().getOverlayPane());return V};D=function(V,M){if(V&&null!=p.guidesArrHor)for(V=0;V<p.guidesArrHor.length;V++)p.guidesArrHor[V].node.style.visibility="hidden";if(M&&null!=p.guidesArrVer)for(V=0;V<p.guidesArrVer.length;V++)p.guidesArrVer[V].node.style.visibility="hidden"};if(1<C&&C==B.length-1){C=[];P=p.guidesArrHor;k=[];g=0;I=B[0]==q?1:0;F=B[I].y+B[I].height;if(0<G)for(I=0;I<B.length-1;I++)x=
CWE-79
1
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
CWE-79
1
__find_array_index(value, array) { for (var i in array) { if (JSON.stringify(array[i]) === JSON.stringify(value)) { // compare array return i; } } return -1; }
CWE-79
1
return ia}function A(){function ea(ra,ia){var Da=mxResources.get(ra);null==Da&&(Da=ra.substring(0,1).toUpperCase()+ra.substring(1));18<Da.length&&(Da=Da.substring(0,18)+"&hellip;");return Da+" ("+ia.length+")"}function ta(ra,ia,Da){mxEvent.addListener(ia,"click",function(){Ea!=ia&&(Ea.style.backgroundColor="",Ea=ia,Ea.style.backgroundColor=E,Z.scrollTop=0,Z.innerHTML="",J=0,Pa=Da?Ga[ra][Da]:sa[ra],V=null,N(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(ra){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
CWE-79
1
mxEvent.consume(H))}}catch(Q){v.handleError(Q)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var F=x.connectVertex;x.connectVertex=function(H,S,U,Q,W,V,X){var p=x.getIncomingTreeEdges(H);if(d(H)){var C=c(H),I=C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST,T=S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST;return C==S||0==p.length?k(H,S):I==T?g(H):e(H,S!=mxConstants.DIRECTION_NORTH&&S!=mxConstants.DIRECTION_WEST)}return F.apply(this,arguments)};x.getSubtree=function(H){var S=
CWE-79
1
J.substring(0,17)&&(N[R].setAttribute("href",this.updateCustomLink(u,J)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,E){if("data:action/json,"==E.substring(0,17))try{var J=JSON.parse(E.substring(17));null!=J.actions&&(this.updateCustomLinkActions(u,J.actions),E="data:action/json,"+JSON.stringify(J))}catch(T){}return E};Graph.prototype.updateCustomLinkActions=function(u,E){for(var J=0;J<E.length;J++){var T=E[J],N;for(N in T)this.updateCustomLinkAction(u, T[N],"cells"),this.updateCustomLinkAction(u,T[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,E,J){if(null!=E&&null!=E[J]){for(var T=[],N=0;N<E[J].length;N++)if("*"==E[J][N])T.push(E[J][N]);else{var Q=u[E[J][N]];null!=Q?""!=Q&&T.push(Q):T.push(E[J][N])}E[J]=T}};Graph.prototype.getCellsForAction=function(u,E){E=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,E));if(null!=u.excludeCells){for(var J=[],T=0;T<E.length;T++)0>u.excludeCells.indexOf(E[T].id)&&J.push(E[T]);
CWE-79
1
Ta,Ua,Za)})})(fa[qa],Pa,Na);aa.appendChild(Pa)}}for(var Ya in ja)fa=ja[Ya],0<fa.length&&(ia=document.createElement("div"),ia.className="geTempDlgImportCat",ia.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(ia),B(fa,ca,ba,null,!0))}function F(fa,ca){Da.innerHTML="";n();var ba=Math.floor(Da.offsetWidth/150)-1;ca=!ca&&fa.length>ba?ba:fa.length;for(var ja=0;ja<ca;ja++){var ia=fa[ja];ia.isCategory=!0;var ma=document.createElement("div"),qa=mxResources.get(ia.title);null==qa&&(qa=ia.title.substring(0, 1).toUpperCase()+ia.title.substring(1));ma.className="geTempDlgNewDiagramCatItem";ma.setAttribute("title",qa);qa=mxUtils.htmlEntities(qa);15<qa.length&&(qa=qa.substring(0,15)+"&hellip;");null==C&&(K(!0),n(ma,"geTempDlgNewDiagramCatItemActive",ia));var oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";var na=document.createElement("img");na.src=NEW_DIAGRAM_CATS_PATH+"/"+ia.img;oa.appendChild(na);ma.appendChild(oa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl"; oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);(function(Ja,Ga){mxEvent.addListener(ma,"click",function(){C!=Ga&&(K(!0),n(Ga,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(ma,"dblclick",y)})(ia,ma)}ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItem";qa=mxResources.get("showAllTemps");ma.setAttribute("title",qa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";oa.innerHTML="...";oa.style.fontSize="32px";ma.appendChild(oa);oa= document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;ma.appendChild(oa);Da.appendChild(ma);mxEvent.addListener(ma,"click",function(){function Ja(){var Ra=Ga.querySelector(".geTemplateDrawioCatLink");null!=Ra?Ra.click():setTimeout(Ja,200)}Z=!0;var Ga=Q.querySelector(".geTemplatesList");Ga.style.display="block";Aa.style.width="";Oa.style.display="";Oa.value="";da=null;Ja()});ea.style.display=fa.length<=ba?"none":""}function G(fa,ca,ba){function ja(Qa,Ya){var La=
CWE-79
1
Runner.prototype.runTests = function(suite, fn){ var self = this , tests = suite.tests.slice() , test; function hookErr(err, errSuite, after) { // before/after Each hook for errSuite failed: var orig = self.suite; // for failed 'after each' hook start from errSuite parent, // otherwise start from errSuite itself self.suite = after ? errSuite.parent : errSuite; if (self.suite) { // call hookUp afterEach self.hookUp('afterEach', function(err2, errSuite2) { self.suite = orig; // some hooks may fail even now if (err2) return hookErr(err2, errSuite2, true); // report error suite fn(errSuite); }); } else { // there is no need calling other 'after each' hooks self.suite = orig; fn(errSuite); } } function next(err, errSuite) { // if we bail after first err if (self.failures && suite._bail) return fn(); if (self._abort) return fn(); if (err) return hookErr(err, errSuite, true); // next test test = tests.shift(); // all done if (!test) return fn(); // grep var match = self._grep.test(test.fullTitle()); if (self._invert) match = !match; if (!match) return next(); // pending if (test.pending) { self.emit('pending', test); self.emit('test end', test); return next(); } // execute test and hook(s) self.emit('test', self.test = test); self.hookDown('beforeEach', function(err, errSuite){ if (err) return hookErr(err, errSuite, false); self.currentRunnable = self.test; self.runTest(function(err){ test = self.test; if (err) { self.fail(test, err); self.emit('test end', test); return self.hookUp('afterEach', next); } test.state = 'passed'; self.emit('pass', test); self.emit('test end', test); self.hookUp('afterEach', next); }); }); } this.next = next; next(); };
CWE-89
0
var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,J=0;J<ja.length;J++)"none"!=ja[J].style.display&&ja[J].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,J,V){function P(){U.removeChild(la);U.removeChild(ta);ia.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:J,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),ia=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea"); la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ta=document.createElement("div");ta.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):P();H=null});u.className="geCommentEditBtn";ta.appendChild(u);var I=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);P();J(ja);H=null});mxEvent.addListener(la, "keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(I.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));I.focus();I.className="geCommentEditBtn gePrimaryBtn";ta.appendChild(I);U.insertBefore(ta,R);ia.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var J=b.timeSince(ja);null==J&&(J=mxResources.get("lessThanAMinute"));
CWE-94
14
p&&I[T].getAttribute("data-font-src")!=C&&I[T].setAttribute("data-font-src",C)}};var n=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return n.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var p=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=p)for(var C in p)this.globalVars[C]= p[C]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var C=y.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[p]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet=
CWE-79
1
function usercheck_init_noacess(i) { var obj = document.getElementById('ajax_output'); obj.innerHTML = ''; 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; } var pqr = i.value; if (i.value.length >= 3) ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_noacess, usercheck_error); }
CWE-89
0
"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(I.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));I.focus();I.className="geCommentEditBtn gePrimaryBtn";ta.appendChild(I);U.insertBefore(ta,R);ia.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var J=b.timeSince(ja);null==J&&(J=mxResources.get("lessThanAMinute")); mxUtils.write(U,mxResources.get("timeAgo",[J],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,J,V,P){function R(T,Q,Z){var na=document.createElement("li");na.className=
CWE-79
1
Uploader.prototype._init = function() { this.files = []; this.queue = []; this.id = ++Uploader.count; this.on('uploadcomplete', (function(_this) { return function(e, file) { _this.files.splice($.inArray(file, _this.files), 1); if (_this.queue.length > 0 && _this.files.length < _this.opts.connectionCount) { return _this.upload(_this.queue.shift()); } else { return _this.uploading = false; } }; })(this)); return $(window).on('beforeunload.uploader-' + this.id, (function(_this) { return function(e) { if (!_this.uploading) { return; } e.originalEvent.returnValue = _this._t('leaveConfirm'); return _this._t('leaveConfirm'); }; })(this)); };
CWE-79
1
c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Oa);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Qa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,
CWE-79
1
var doSynchronize = function(requisition, rescanExisting) { RequisitionsService.startTiming(); RequisitionsService.synchronizeRequisition(requisition.foreignSource, rescanExisting).then( function() { // success growl.success('The import operation has been started for ' + requisition.foreignSource + ' (rescanExisting? ' + rescanExisting + ')<br/>Use <b>refresh</b> to update the deployed statistics'); requisition.setDeployed(true); }, errorHandler ); };
CWE-79
1
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
Y+");\n");N()}))):J.push(this.cachedGoogleFonts[Y]+"\n"):J.push('@font-face {font-family: "'+R+'";src: url("'+Y+'")}\n')})(E[Q].name,E[Q].url);N()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var E=document.getElementsByTagName("style"),J=0;J<E.length;J++){var T=mxUtils.getTextContent(E[J]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&u[0].appendChild(E[J].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,E){E=null!=
CWE-79
1
function ed(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function fd(a){return a>1&&5>a&&1!==~~(a/10)}function gd(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"pár sekund":"pár sekundami";case"m":return b?"minuta":d?"minutu":"minutou";case"mm":return b||d?e+(fd(a)?"minuty":"minut"):e+"minutami";break;case"h":return b?"hodina":d?"hodinu":"hodinou";case"hh":return b||d?e+(fd(a)?"hodiny":"hodin"):e+"hodinami";break;case"d":return b||d?"den":"dnem";case"dd":return b||d?e+(fd(a)?"dny":"dní"):e+"dny";break;case"M":return b||d?"měsíc":"měsícem";case"MM":return b||d?e+(fd(a)?"měsíce":"měsíců"):e+"měsíci";break;case"y":return b||d?"rok":"rokem";case"yy":return b||d?e+(fd(a)?"roky":"let"):e+"lety"}}
CWE-89
0
function updateRegister() { adapter.log.info('Request actual repository...'); adapter.getForeignObject('system.config', (err, data) => { if (data && data.common) { adapter.sendToHost(adapter.host, 'getRepository', { repo: data.common.activeRepo, update: true }, _repository => { if (_repository === 'permissionError') { adapter.log.error('May not read "getRepository"'); } else { adapter.log.info('Repository received successfully.'); socket && socket.repoUpdated(); } }); } }); }
CWE-22
2
GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerHTML="",GraphViewer.createViewerForElement(e)}catch(k){e.innerHTML=k.message,null!=window.console&&console.error(k)}})};
CWE-94
14
"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),z.innerHTML=A,x.appendChild(z),m.status=z),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,A)}));this.stop();return L}),z=!0);return z};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
CWE-79
1
Channel.prototype.exit = function(name, coreDumped, msg) { if (!this.server) throw new Error('Server-only method called in client mode'); if (this.type === 'session' && this.writable && this.outgoing.state === 'open') { if (typeof name === 'number') return this._client._sshstream.exitStatus(this.outgoing.id, name); else { return this._client._sshstream.exitSignal(this.outgoing.id, name, coreDumped, msg); } } return true; };
CWE-78
6
var render = function(disabled){ var name; self.empty(); l = panels.length; while (l--) { if (panels[l]) { panel = $('<div class="ui-widget-content ui-corner-all elfinder-buttonset"/>'); i = panels[l].length; while (i--) { name = panels[l][i]; if ((!disabled || $.inArray(name, disabled) === -1) && (cmd = commands[name])) { button = 'elfinder'+cmd.options.ui; $.fn[button] && panel.prepend($('<div/>')[button](cmd)); } } panel.children().length && self.prepend(panel); panel.children(':gt(0)').before('<span class="ui-widget-content elfinder-toolbar-button-separator"/>'); } } self.children().length? self.show() : self.hide(); self.trigger('load'); };
CWE-89
0
Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=this.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var n=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var D=0;D<b.length;D++)0> mxUtils.indexOf(k,b[D].nodeName)&&0<b[D].nodeValue.length&&n.push({name:b[D].nodeName,value:b[D].nodeValue});n.sort(function(t,E){return t.name<E.name?-1:t.name>E.name?1:0});for(D=0;D<n.length;D++)"link"==n[D].name&&this.isCustomLink(n[D].value)||(e+=("link"!=n[D].name?"<b>"+n[D].name+":</b> ":"")+mxUtils.htmlEntities(n[D].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+e+"</div>"))}}return e};
CWE-94
14
Runnable.prototype.fullTitle = function(){ return this.parent.fullTitle() + ' ' + this.title; };
CWE-89
0
file.readYAML = function(filepath, options) { var src = file.read(filepath, options); var result; grunt.verbose.write('Parsing ' + filepath + '...'); try { result = YAML.load(src); grunt.verbose.ok(); return result; } catch (e) { grunt.verbose.error(); throw grunt.util.error('Unable to parse "' + filepath + '" file (' + e.message + ').', e); } };
CWE-1188
39
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isNumericAttribute=function(b,c,d){return"value"!==c.nodeName&&mxObjectCodec.prototype.isNumericAttribute.apply(this,arguments)};a.isExcluded=function(b,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(b,c,d){if(null!= 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!=
CWE-94
14
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-79
1
compare : function(file1, file2) { var self = this, type = self.sortType, asc = self.sortOrder == 'asc', stick = self.sortStickFolders, rules = self.sortRules, sort = rules[type], d1 = file1.mime == 'directory', d2 = file2.mime == 'directory', res; if (stick) { if (d1 && !d2) { return -1; } else if (!d1 && d2) { return 1; } } res = asc ? sort(file1, file2) : sort(file2, file1); return type != 'name' && res == 0 ? res = asc ? rules.name(file1, file2) : rules.name(file2, file1) : res; },
CWE-89
0
Tine.Addressbook.ContactGridPanel.countryRenderer = function(data) { data = Locale.getTranslationData('CountryList', data); return data; };
CWE-79
1
rtrim = function(str){ return str.replace(/\s+$/, ''); },
CWE-89
0
regExDate: function (str, p1, p2, offset, s) { var date = str.substring(1).replace('"', ''); if (date.substring(0, 7) == "\\\/Date(") { var d = date.match(/Date\((.*?)\)/)[1]; return "new Date(" + parseInt(d) + ")"; } else { // ISO Date 2007-12-31T23:59:59Z var matches = date.split(/[-,:,T,Z]/); if (matches.length == 7) { matches[1] = (parseInt(matches[1], 0) - 1).toString(); var isDate = true; var s = ""; for (var i = 0; i < matches.length; i++) { if (isNaN(parseInt(matches[i], 10))) { isDate = false; break; } if (i > 0) { s += ","; } s += parseInt(matches[i], 10); } if (isDate) { return "new Date(Date.UTC(" + s + "))"; } } } return str; },
CWE-502
15
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};
CWE-79
1
z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Qa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Qa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this, function(){return this.graph.connectionHandler.isEnabled()})};var Ta=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=
CWE-918
16
0;N<T;N++)u=Editor.crcTable[(u^E.charCodeAt(J+N))&255]^u>>>8;return u};Editor.crc32=function(u){for(var E=-1,J=0;J<u.length;J++)E=E>>>8^Editor.crcTable[(E^u.charCodeAt(J))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(u,E,J,T,N){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}u=u.substring(u.indexOf(",")+
CWE-79
1
1?0:Ua.y*ia);this.shape.bounds.height=ma.height-(Ta==Ma.length-1?0:(Ua.height+Ua.y)*ia)}this.shape.redraw()}};var Ya=!1;za.setPosition=function(Ua,eb,jb){La=Math.max(Graph.minTableColumnWidth-Ea.width,eb.x-Ua.x-Ea.width);Ya=mxEvent.isShiftDown(jb.getEvent());null==Da||Ya||(La=Math.min(La,Da.width-Graph.minTableColumnWidth))};za.execute=function(Ua){if(0!=La)T.setTableColumnWidth(this.state.cell,La,Ya);else if(!M.blockDelayedSelection){var eb=T.getCellAt(Ua.getGraphX(),Ua.getGraphY())||ma.cell;T.graphHandler.selectCellForEvent(eb,
CWE-79
1
delete_row(row_id) { var tr = document.getElementById(row_id); var array = this.__get_array_from_DOM_row(tr); var data_index = this.__find_array_index(array, this.data); tr.outerHTML = ""; this.data.splice(data_index, 1); }
CWE-79
1
lex:function lex() { var r = this.next(); if (r) { return r; } else { return this.lex(); } },
CWE-94
14
exports.GetCoinFromTicker = function(ticker, callback) { g_constants.dbTables['coins'].selectAll('ROWID AS id, *', 'ticker="'+escape(ticker)+'"', '', (err, rows) => { if (err || !rows || !rows.length) return callback({}); callback(rows[0]); }) }
CWE-89
0
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
teams: function (next) { if (!postData.teams) return next() Team.getTeamsByIds(postData.teams, function (err, teams) { if (err) return next(err) async.each( teams, function (team, callback) { team.addMember(savedId, function () { team.save(callback) }) }, function (err) { if (err) return next(err) return next(null, teams) } ) }) },
CWE-521
4
Number(L.value),[f[n]])}}finally{l.getModel().endUpdate()}});M.className="geBtn gePrimaryBtn";mxEvent.addListener(u,"keypress",function(n){13==n.keyCode&&M.click()});t=document.createElement("div");t.style.marginTop="20px";t.style.textAlign="right";b.editor.cancelFirst?(t.appendChild(d),t.appendChild(M)):(t.appendChild(M),t.appendChild(d));u.appendChild(t);this.container=u},LibraryDialog=function(b,f,l,d,u,t){function D(F){for(F=document.elementFromPoint(F.clientX,F.clientY);null!=F&&F.parentNode!=
CWE-79
1
resize = function(init) { var initHeight = function() { var h = 0; wrapper.siblings('div.elfinder-panel:visible').each(function() { h += $(this).outerHeight(true); }); wrapper.height(wz.height() - h - wrapper._padding); }; init && initHeight(); restm && clearTimeout(restm); restm = setTimeout(function(){ !init && initHeight(); var wph, cwdoh; // fix cwd height if it less then wrapper cwd.css('height', 'auto'); wph = wrapper[0].clientHeight - parseInt(wrapper.css('padding-top')) - parseInt(wrapper.css('padding-bottom')), cwdoh = cwd.outerHeight(true); if (cwdoh < wph) { cwd.height(wph); } }, 20); },
CWE-89
0
ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ja.isResolved?"none":"",va=ia(ja).replies,Ba=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Ba;for(var Da=va[sa].querySelectorAll(".geCommentAction"), Aa=0;Aa<Da.length;Aa++)Da[Aa]!=Z.parentNode&&(Da[Aa].style.display=na);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});ta.appendChild(u);null!=J?da.insertBefore(ta,J.nextSibling):da.appendChild(ta);for(J=0;null!=ja.replies&&J<ja.replies.length;J++)u=ja.replies[J],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,ta,H.saveCallback,
CWE-79
1
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.1.1";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
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 a=this.editor.chromeless?null:this.createFooter();null!=a&&(this.footerContainer.appendChild(a),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(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerHTML="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))};
CWE-79
1
$scope.refresh = function() { growl.success('Retrieving node ' + $scope.foreignId + ' from requisition ' + $scope.foreignSource + '...'); RequisitionsService.getNode($scope.foreignSource, $scope.foreignId).then( function(node) { // success $scope.node = node; }, $scope.errorHandler ); };
CWE-79
1
return ka}function B(){function fa(ta,ka){var Ja=mxResources.get(ta);null==Ja&&(Ja=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+ka.length+")"}function sa(ta,ka,Ja){mxEvent.addListener(ka,"click",function(){Ha!=ka&&(Ha.style.backgroundColor="",Ha=ka,Ha.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ja?Ba[ta][Ja]:oa[ta],V=null,O(!1))})}Fa&&(Fa=!1,mxEvent.addListener(Z,"scroll",function(ta){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
CWE-79
1
function loadSessionsTable(sessions) { $.each(sessions, function(index, session) { $("#interactive-sessions .sessions-table-body").append( "<tr>" + tdWrap(uiLink("session/" + session.id, session.id)) + tdWrap(appIdLink(session)) + tdWrap(session.name) + tdWrap(session.owner) + tdWrap(session.proxyUser) + tdWrap(session.kind) + tdWrap(session.state) + tdWrap(logLinks(session, "session")) + "</tr>" ); }); }
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
$scope.initialize = function(customHandler) { var value = $cookies.get('requisitions_page_size'); if (value) { $scope.pageSize = value; } growl.success('Retrieving requisition ' + $scope.foreignSource + '...'); RequisitionsService.getRequisition($scope.foreignSource).then( function(requisition) { // success $scope.requisition = requisition; $scope.filteredNodes = requisition.nodes; $scope.updateFilteredNodes(); if (customHandler) { customHandler(); } }, $scope.errorHandler ); };
CWE-79
1
i18n : function() { var self = this, messages = this.messages, input = [], ignore = [], message = function(m) { var file; if (m.indexOf('#') === 0) { if ((file = self.file(m.substr(1)))) { return file.name; } } return m; }, i, j, m; for (i = 0; i< arguments.length; i++) { m = arguments[i]; if (typeof m == 'string') { input.push(message(m)); } else if ($.isArray(m)) { for (j = 0; j < m.length; j++) { if (typeof m[j] == 'string') { input.push(message(m[j])); } else if (m[j] instanceof jQuery) { // jQuery object is HTML element input.push(m[j]); } } } else if (m instanceof jQuery) { // jQuery object is HTML element input.push(m[j]); } } for (i = 0; i < input.length; i++) { // dont translate placeholders if ($.inArray(i, ignore) !== -1) { continue; } m = input[i]; if (typeof m == 'string') { // translate message m = messages[m] || self.escape(m); // replace placeholders in message m = m.replace(/\$(\d+)/g, function(match, placeholder) { placeholder = i + parseInt(placeholder); if (placeholder > 0 && input[placeholder]) { ignore.push(placeholder) } return self.escape(input[placeholder]) || ''; }); } else { // get HTML from jQuery object m = m.get(0).outerHTML; } input[i] = m; } return $.map(input, function(m, i) { return $.inArray(i, ignore) === -1 ? m : null; }).join('<br>'); },
CWE-89
0
function pd(a){return a%100===11?!0:a%10===1?!1:!0}function qd(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return b?"mínúta":"mínútu";case"mm":return pd(a)?e+(b||d?"mínútur":"mínútum"):b?e+"mínúta":e+"mínútu";case"hh":return pd(a)?e+(b||d?"klukkustundir":"klukkustundum"):e+"klukkustund";case"d":return b?"dagur":d?"dag":"degi";case"dd":return pd(a)?b?e+"dagar":e+(d?"daga":"dögum"):b?e+"dagur":e+(d?"dag":"degi");case"M":return b?"mánuður":d?"mánuð":"mánuði";case"MM":return pd(a)?b?e+"mánuðir":e+(d?"mánuði":"mánuðum"):b?e+"mánuður":e+(d?"mánuð":"mánuði");case"y":return b||d?"ár":"ári";case"yy":return pd(a)?e+(b||d?"ár":"árum"):e+(b||d?"ár":"ári")}}
CWE-89
0
this.init=function(){function G(H){if(null!=H){var S=H.getAttribute("background");if(null==S||""==S||S==mxConstants.NONE)S=Editor.isDarkMode()?"transparent":"#ffffff";B.style.backgroundColor=S;(new mxCodec(H.ownerDocument)).decode(H,I.getModel());I.maxFitScale=1;I.fit(8);I.center()}return H}function P(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(D,"change",function(H){z=parseInt(D.value);P(L[z]);mxEvent.consume(H)});if("mxfile"==t.nodeName){var K=t.getElementsByTagName("diagram");
CWE-79
1
Tine.Addressbook.ContactGridPanel.countryRenderer = function(data) { data = Locale.getTranslationData('CountryList', data); return data; };
CWE-79
1
function reqExec(chan, cmd, opts, cb) { if (chan.outgoing.state !== 'open') { cb(new Error('Channel is not open')); return true; } chan._callbacks.push(function(had_err) { if (had_err) { return cb(had_err !== true ? had_err : new Error('Unable to exec')); } chan.subtype = 'exec'; chan.allowHalfOpen = (opts.allowHalfOpen !== false); cb(undefined, chan); }); return chan._client._sshstream.exec(chan.outgoing.id, cmd, true); }
CWE-78
6
function onGoodHandshake() { assert(false, makeMsg('Handshake should have failed')); }
CWE-78
6
Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),T(P.shape.customProperties));p=p.getAttribute("customProperties");if(null!=p)try{T(JSON.parse(p))}catch(O){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var p=this.editorUi.getSelectionState();"image"!=p.style.shape&&!p.containsLabel&&0<p.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var C= {},I=p.vertices,T=p.edges,P=0;P<I.length;P++)this.findCommonProperties(I[P],C,0==P);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],C,0==I.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,p))}};var x=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(p){this.addActions(p,["copyStyle","pasteStyle"]);return x.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
CWE-79
1
function ServerStderr(channel) { WritableStream.call(this, { highWaterMark: MAX_WINDOW }); this._channel = channel; }
CWE-78
6
if(U==P)if("mxlibrary"==S.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=S.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(E,0==Y.length?S.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(S){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var P=y(".odFilesBreadcrumb");if(null!=P){P.innerHTML="";for(var Q=0;Q<J.length-1;Q++){var S=document.createElement("span");S.className="odBCFolder";S.innerHTML= mxUtils.htmlEntities(J[Q].name||mxResources.get("home"));P.appendChild(S);(function(ba,da){S.addEventListener("click",function(){e(null);J=J.slice(0,da);u(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(J[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";P.appendChild(Y)}null!=J[J.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==J.length?mxResources.get("officeSelDiag"):J[J.length-1].name||mxResources.get("home")),P.appendChild(Q))}}function M(){if(null!=
CWE-94
14
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
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&& this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(H){this.handleError(H)}))}catch(H){this.handleError(H)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE, 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=
CWE-79
1
Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,E){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,E,J,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
CWE-79
1
this.verifyWithMessage = (signed, message, password = null) => { if(signed == null) { throw "tEnvoyNaClSigningKey Fatal Error: argument signed of method verifyWithMessage is required and does not have a default value."; } if(message == null) { throw "tEnvoyNaClSigningKey Fatal Error: argument message of method verifyWithMessage is required and does not have a default value."; } if(signed.split("::").length != 2) { throw "tEnvoyNaClSigningKey Fatal Error: Invalid signature."; } let hash = _tEnvoy.util.hexToBytes(signed.split("::")[0]); return this.verify(signed, password) && _tEnvoy.util.bytesToHex(_nacl.hash(_tEnvoy.util.pack(message))) == _tEnvoy.util.bytesToHex(hash); }
CWE-347
25
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&& this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var q=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(q,v,x,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE, null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(k){this.handleError(k)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,k){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](k)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerHTML="";else{var k=
CWE-79
1
mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(B&&b.hideDialog(),O=!y.model.contains(A),!B||O||I!=q){I=Graph.compress(I);y.getModel().beginUpdate();try{if(O){var t=b.editor.graph.getFreeInsertPoint();A.geometry.x=t.x;A.geometry.y=t.y;y.addCell(A)}y.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+I+")",[A])}catch(z){throw z;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(A),y.scrollCellToVisible(A))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,
CWE-79
1
function(){g({message:JSON.parse(n.result).Message})},n.readAsText(L.response))}catch(y){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(M){g(M)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)});
CWE-79
1
cssclass : function(dir) { var cname = (fm.UA.Touch ? 'elfinder-touch ' : '')+(dir.phash ? '' : root)+' '+navdir+' '+fm.perms2class(dir); dir.dirs && !dir.link && (cname += ' ' + collapsed); opts.getClass && (cname += ' ' + opts.getClass(dir)); dir.csscls && (cname += ' ' + fm.escape(dir.csscls)); return cname; },
CWE-89
0
function _showSelectDialog(title, label, options, button, callbackFcn, callbackArg, defaultValue) { var dialog = dialogs[title+label]; if (dialog) { $("bgDialogDiv").show(); } else { var fields = createElement("p", null, []); fields.appendChild(document.createTextNode(label)); var select = createElement("select"); //, null, null, { cname: name } ); fields.appendChild(select); var values = $H(options).keys(); for (var i = 0; i < values.length; i++) { var option = createElement("option", null, null, { value: values[i] }, null, select); option.appendChild(document.createTextNode(options[values[i]])); } fields.appendChild(createElement("br")); fields.appendChild(createButton(null, button, callbackFcn.bind(select, callbackArg))); fields.appendChild(createButton(null, _("Cancel"), disposeDialog)); dialog = createDialog(null, title, null, fields, "none"); document.body.appendChild(dialog); dialogs[title+label] = dialog; } if (defaultValue) defaultOption = dialog.down('option[value="'+defaultValue+'"]').selected = true; if (Prototype.Browser.IE) jQuery('#bgDialogDiv').css('opacity', 0.4); jQuery(dialog).fadeIn('fast'); }
CWE-79
1
(function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);
CWE-89
0
function(b,c){b=typeof c;"function"==b?c=mxStyleRegistry.getName(c):"object"==b&&(c=null);return c};a.decode=function(b,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(b.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(b,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={}); for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f);null!=l&&0<l.length&&mxStylesheetCodec.allowEval?l=mxUtils.eval(l):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[k]=l)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!0;
CWE-79
1
ia){la=ha.getAttribute("section");ca=ha.getAttribute("subsection");if(null==la&&(ma=ia.indexOf("/"),la=ia.substring(0,ma),null==ca)){var qa=ia.indexOf("/",ma+1);-1<qa&&(ca=ia.substring(ma+1,qa))}ma=ta[la];null==ma&&(ya++,ma=[],ta[la]=ma);ia=ha.getAttribute("clibs");null!=da[ia]&&(ia=da[ia]);ia={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:ia,tags:ha.getAttribute("tags")};ma.push(ia);null!=ca&& (ma=ka[la],null==ma&&(ma={},ka[la]=ma),la=ma[ca],null==la&&(la=[],ma[ca]=la),la.push(ia))}ha=ha.nextSibling}G(ta,oa,wa)}})}function K(ha){v&&(Ba.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,W=!0,va.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){A(mxResources.get("cannotLoad"));ua([])},ha?null:n))}function F(ha){if(""==ha)null!=u&&(u.click(),u=null);else{if(null==TemplatesDialog.tagsList[c]){var da={};for(Ka in ta)for(var ca=ta[Ka],la=0;la<ca.length;la++){var ia=
CWE-79
1
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
CWE-79
1
null!=na){ca=ia.getAttribute("section");aa=ia.getAttribute("subsection");if(null==ca&&(la=na.indexOf("/"),ca=na.substring(0,la),null==aa)){var qa=na.indexOf("/",la+1);-1<qa&&(aa=na.substring(la+1,qa))}la=ya[ca];null==la&&(xa++,la=[],ya[ca]=la);na=ia.getAttribute("clibs");null!=ra[na]&&(na=ra[na]);na={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:na,tags:ia.getAttribute("tags")};la.push(na);null!= 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=
CWE-79
1
function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&& (z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,Q=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=Q.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,za,wa){for(var Ea=[],Da=0;Da<Ta.length;Da++){var La=
CWE-79
1
1);break}E.className=ca.join(" ")}null!=ia?(E=ia,E.className+=" "+ra,K=aa,Ba.className="geTempDlgCreateBtn"):(K=E=null,Ba.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ia,ra){if(null!=K){var aa=function(ta){qa.isExternal?g(qa,function(ka){ca(ka,ta)},na):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(ka){200<=ka.getStatus()&&299>=ka.getStatus()?ca(ka.getText(),ta):na()})):ca(b.emptyDiagramXml,ta)},ca=function(ta,ka){y||b.hideDialog(!0);e(ta,ka,qa,ra)},na=function(){z(mxResources.get("cannotLoad")); la()},la=function(){K=qa;Ba.className="geTempDlgCreateBtn";ra&&(Ea.className="geTempDlgOpenBtn")},qa=K;K=null;"boolean"!==typeof ra&&(ra=qa.isExternal&&p);1==ia?k(qa.url,qa):ra?(Ea.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",aa()):(Ba.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio", mxResources.get("ok"),aa,ia,function(ta){var ka=null!=ta&&0<ta.length;return ka&&y?(aa(ta),!1):ka},null,null,null,la,x?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function D(ia){Ba.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ia?"create":"copy"));ia=ia?"none":"";p&&(Ea.style.display=ia);for(var ra=J.querySelectorAll(".geTempDlgLinkToDiagram"),aa=0;aa<ra.length;aa++)ra[aa].style.display=ia}function B(ia,ra,aa,ca,na){na||(ea.innerHTML="",M(),S=ia,Y=ca);var la=null;if(aa){la=document.createElement("table");
CWE-94
14
exports.expressCreateServer = function (hook_name, args, cb) { args.app.get('/tests/frontend/specs_list.js', function(req, res){ async.parallel({ coreSpecs: function(callback){ exports.getCoreTests(callback); }, pluginSpecs: function(callback){ exports.getPluginTests(callback); } }, function(err, results){ var files = results.coreSpecs; // push the core specs to a file object files = files.concat(results.pluginSpecs); // add the plugin Specs to the core specs console.debug("Sent browser the following test specs:", files.sort()); res.send("var specs_list = " + JSON.stringify(files.sort()) + ";\n"); }); }); var url2FilePath = function(url){ var subPath = url.substr("/tests/frontend".length); if (subPath == ""){ subPath = "index.html" } subPath = subPath.split("?")[0]; var filePath = path.normalize(npm.root + "/../tests/frontend/") filePath += subPath.replace("..", ""); return filePath; } args.app.get('/tests/frontend/specs/*', function (req, res) { var specFilePath = url2FilePath(req.url); var specFileName = path.basename(specFilePath); fs.readFile(specFilePath, function(err, content){ if(err){ return res.send(500); } content = "describe(" + JSON.stringify(specFileName) + ", function(){ " + content + " });"; res.send(content); }); }); args.app.get('/tests/frontend/*', function (req, res) { var filePath = url2FilePath(req.url); res.sendfile(filePath); }); args.app.get('/tests/frontend', function (req, res) { res.redirect('/tests/frontend/'); }); }
CWE-22
2
function usercheck_init_mod(i, opt) { var obj = document.getElementById('ajax_output_' + opt); obj.innerHTML = ''; 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; } var pqr = i.value; if (opt == '1') ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_p, usercheck_error); if (opt == '2') ajax_call('Validator.php?u=' + i.value + 'user', usercheck_callback_s, usercheck_error); }
CWE-89
0
exports.deepCopy = function(target, source) { for (var name in source) { var tval = target[name], sval = source[name]; if (tval !== sval) { if (shouldDeepCopy(sval)) { if (Object.prototype.toString.call(sval) === '[object Date]') { // use this date test to handle crossing frame boundaries target[name] = new Date(sval); } else if (lang.isArray(sval)) { target[name] = exports.deepCopyArray(sval); } else { if (tval && typeof tval === 'object') { exports.deepCopy(tval, sval); } else { target[name] = exports.deepCopy({}, sval); } } } else { target[name] = sval; } } } return target; };
CWE-94
14
$scope.provision = function() { $scope.isSaving = true; growl.info($sanitize('The node ' + $scope.node.nodeLabel + ' is being added to requisition ' + $scope.node.foreignSource + '. Please wait...')); var successMessage = $sanitize('The node ' + $scope.node.nodeLabel + ' has been added to requisition ' + $scope.node.foreignSource); RequisitionsService.quickAddNode($scope.node).then( function() { // success $scope.reset(); bootbox.dialog({ message: successMessage, title: 'Success', buttons: { main: { label: 'Ok', className: 'btn-secondary' } } }); }, $scope.errorHandler ); };
CWE-79
1
Graph.prototype.getTooltipForCell = function(cell) { var tip = ''; if (mxUtils.isNode(cell.value)) { var tmp = null; if (Graph.translateDiagram && Graph.diagramLanguage != null) { tmp = cell.value.getAttribute('tooltip_' + Graph.diagramLanguage); } if (tmp == null) { tmp = cell.value.getAttribute('tooltip'); } if (tmp != null) { if (tmp != null && this.isReplacePlaceholders(cell)) { tmp = this.replacePlaceholders(cell, tmp); } tip = this.sanitizeHtml(tmp); } else { var ignored = this.builtInProperties; var attrs = cell.value.attributes; var temp = []; // Hides links in edit mode if (this.isEnabled()) { ignored.push('linkTarget'); ignored.push('link'); } for (var i = 0; i < attrs.length; i++) { if (mxUtils.indexOf(ignored, attrs[i].nodeName) < 0 && attrs[i].nodeValue.length > 0) { temp.push({name: attrs[i].nodeName, value: attrs[i].nodeValue}); } } // Sorts by name temp.sort(function(a, b) { if (a.name < b.name) { return -1; } else if (a.name > b.name) { return 1; } else { return 0; } }); for (var i = 0; i < temp.length; i++) { if (temp[i].name != 'link' || !this.isCustomLink(temp[i].value)) { tip += ((temp[i].name != 'link') ? '<b>' + temp[i].name + ':</b> ' : '') + mxUtils.htmlEntities(temp[i].value) + '\n'; } } if (tip.length > 0) { tip = tip.substring(0, tip.length - 1); if (mxClient.IS_SVG) { tip = '<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">' + tip + '</div>'; } } } } return tip; };
CWE-79
1
function getVersionClass(version) { if (version) { var tmp = version.split ('.'); if (tmp[0] === '0' && tmp[1] === '0' && tmp[2] === '0') { version = 'planned'; } else if (tmp[0] === '0' && tmp[1] === '0') { version = 'alpha'; } else if (tmp[0] === '0') { version = 'beta' } else if (version === 'npm error') { version = 'error'; } else { version = 'stable'; } } return version; }
CWE-22
2
(g=j?b(g,a[d],d,a):a[d],j=!0,d+=f);return g}function Ga(a,b){var c=m.defaults.column,d=a.aoColumns.length,c=h.extend({},m.models.oColumn,c,{nTh:b?b:H.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mData:c.mData?c.mData:d,idx:d});a.aoColumns.push(c);c=a.aoPreSearchCols;c[d]=h.extend({},m.models.oSearch,c[d]);la(a,d,h(b).data())}function la(a,b,c){var b=a.aoColumns[b],d=a.oClasses,e=h(b.nTh);if(!b.sWidthOrig){b.sWidthOrig=e.attr("width")||null;var f=
CWE-89
0
function removeSighting(id, rawid, context) { if (context != 'attribute') { context = 'event'; } var formData = $('#PromptForm').serialize(); $.ajax({ beforeSend: function (XMLHttpRequest) { $(".loading").show(); }, data: formData, success:function (data, textStatus) { handleGenericAjaxResponse(data); }, complete:function() { $(".loading").hide(); $("#confirmation_box").fadeOut(); var org = "/" + $('#org_id').text(); updateIndex(id, 'event'); $.get( "/sightings/listSightings/" + rawid + "/" + context + org, function(data) { $("#sightingsData").html(data); }); }, type:"post", cache: false, url:"/sightings/quickDelete/" + id + "/" + rawid + "/" + context, }); }
CWE-79
1
function configure() { deskDomain = 'https://' + config.deskDomain + '.freshdesk.com'; deskApiKey = config.deskApiKey; deskTypes = config.deskTypes || deskTypes; deskStatus = config.deskStatus || deskStatus; deskStatusWidth = {}; // Precomputes text widths for custom ticket status var div = document.createElement('div'); div.style.fontFamily = 'Arial,Helvetica'; div.style.visibility = 'hidden'; div.style.position = 'absolute'; div.style.fontSize = '11px'; document.body.appendChild(div); for (var key in deskStatus) { div.innerHTML = ''; mxUtils.write(div, deskStatus[key]); deskStatusWidth[key] = div.clientWidth + 4; } document.body.removeChild(div); };
CWE-94
14
exports.indexOf = function(arr, obj, start){ for (var i = start || 0, l = arr.length; i < l; i++) { if (arr[i] === obj) return i; } return -1; };
CWE-89
0
function(J){k=J};this.setAutoScroll=function(J){m=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){z=J};this.setSmoothing=function(J){l=J};this.setPerfectFreehandMode=function(J){M=J};this.setBrushSize=function(J){L.size=J};this.getBrushSize=function(){return L.size};var n=function(J){x=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
CWE-79
1
emailIconClassName: this.getMetadata().get(['clientDefs', 'Email', 'iconClass']) || '' }, Dep.prototype.data.call(this)); }, setup: function () { var data = this.model.get('data') || {}; this.emailId = data.emailId; this.emailName = data.emailName; if ( this.parentModel && (this.model.get('parentType') == this.parentModel.name && this.model.get('parentId') == this.parentModel.id) ) { if (this.model.get('post')) { this.createField('post', null, null, 'views/stream/fields/post'); this.hasPost = true; } if ((this.model.get('attachmentsIds') || []).length) { this.createField('attachments', 'attachmentMultiple', {}, 'views/stream/fields/attachment-multiple'); this.hasAttachments = true; } } this.messageData['email'] = '<a href="#Email/view/' + data.emailId + '">' + data.emailName + '</a>'; this.messageName = 'emailReceived'; if (data.isInitial) { this.messageName += 'Initial'; } if (data.personEntityId) { this.messageName += 'From'; this.messageData['from'] = '<a href="#'+data.personEntityType+'/view/' + data.personEntityId + '">' + data.personEntityName + '</a>'; } if (this.model.get('parentType') === data.personEntityType && this.model.get('parentId') == data.personEntityId) { this.isThis = true; } if (this.isThis) { this.messageName += 'This'; } this.createMessage(); }, }); });
CWE-79
1