code
stringlengths 12
2.05k
| label_name
stringlengths 6
8
| label
int64 0
95
|
---|---|---|
width:600,height:300,buttons:[{text:txt_login,icons:{primary:"ui-icon-check"},open:function(){$(this).keypress(function(a){a.keyCode==$.ui.keyCode.ENTER&&$(this).find(".ui-dialog-buttonset button").eq(0).trigger("click")})},click:function(){var e=$(this);""==$("#username_"+a).val()||""==$("#password_"+b).val()?(""==$("#username_"+a).val()&&$("#username_"+a).css("border","1px solid #c00"),""==$("#password_"+b).val()&&$("#password_"+b).css("border","1px solid #c00"),$("#login_error_field").text(txt_details).show()): | 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= | CWE-79 | 1 |
null!=na){ca=ha.getAttribute("section");aa=ha.getAttribute("subsection");if(null==ca&&(la=na.indexOf("/"),ca=na.substring(0,la),null==aa)){var oa=na.indexOf("/",la+1);-1<oa&&(aa=na.substring(la+1,oa))}la=za[ca];null==la&&(xa++,la=[],za[ca]=la);na=ha.getAttribute("clibs");null!=qa[na]&&(na=qa[na]);na={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:na,tags:ha.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))}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 |
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 |
title: "<img src=\"img/icons/silk/information.png\" align=\"absmiddle\"> " + $("#navigrid-extension-information").attr("title")
}).dialogExtend(
{
maximizable: true
});
});
});
| CWE-434 | 5 |
this.handleError(J)}return x};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell= | CWE-79 | 1 |
Mocha.prototype.useColors = function(colors){
this.options.useColors = arguments.length && colors != undefined
? colors
: true;
return this;
}; | CWE-89 | 0 |
"top center";ea.style.backgroundRepeat="no-repeat";ea.setAttribute("title","Minimize");var ha=!1,ma=mxUtils.bind(this,function(){T.innerHTML="";if(!ha){var aa=function(la,qa,ta){la=C("",la.funct,null,qa,la,ta);la.style.width="40px";la.style.opacity="0.7";return ca(la,null,"pointer")},ca=function(la,qa,ta){null!=qa&&la.setAttribute("title",qa);la.style.cursor=null!=ta?ta:"default";la.style.margin="2px 0px";T.appendChild(la);mxUtils.br(T);return la};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;", | CWE-94 | 14 |
eb);this.updateSvgLinks(Da,ua,!0);this.addForeignObjectWarning(eb,Da);return Da}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)"); | CWE-79 | 1 |
q))},function(m){m=document.getElementById("geStatus");null!=m&&(m.innerHTML="Error loading page. <a>Please try refreshing.</a>",m.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var k=
parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype.autosaveDelay=k,EditorUi.debug("Setting autosaveDelay",k)):EditorUi.debug("Invalid autosaveDelay",k)}null!=mxSettings.settings.defaultEdgeLength&&(k=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(k)&&0<k?(Graph.prototype.defaultEdgeLength=k,EditorUi.debug("Using defaultEdgeLength",k)):EditorUi.debug("Invalid defaultEdgeLength",k))}}catch(q){null!=window.console&&console.error(q)}if(null!=Menus.prototype.defaultFonts)for(k=
0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(k,m,q,v,x){EditorUi.logError("Global: "+(null!=k?k:""),m,q,v,x,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)|| | CWE-79 | 1 |
this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,J=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return J.shadowVisible},function(N){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=N;J.model.execute(Q)},{install:function(N){this.listener=function(){N(J.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption|| | CWE-79 | 1 |
function Id(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function Jd(a,b,c){var d={mm:b?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===c?b?"минута":"минуту":a+" "+Id(d[c],+a)}function Kd(a){return a>1&&5>a}function Ld(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"pár sekúnd":"pár sekundami";case"m":return b?"minúta":d?"minútu":"minútou";case"mm":return b||d?e+(Kd(a)?"minúty":"minút"):e+"minútami";break;case"h":return b?"hodina":d?"hodinu":"hodinou";case"hh":return b||d?e+(Kd(a)?"hodiny":"hodín"):e+"hodinami";break;case"d":return b||d?"deň":"dňom";case"dd":return b||d?e+(Kd(a)?"dni":"dní"):e+"dňami";break;case"M":return b||d?"mesiac":"mesiacom";case"MM":return b||d?e+(Kd(a)?"mesiace":"mesiacov"):e+"mesiacmi";break;case"y":return b||d?"rok":"rokom";case"yy":return b||d?e+(Kd(a)?"roky":"rokov"):e+"rokmi"}} | CWE-89 | 0 |
function coverage(filename, data) {
var ret = {
filename: filename,
coverage: 0,
hits: 0,
misses: 0,
sloc: 0,
source: {}
};
data.source.forEach(function(line, num){
num++;
if (data[num] === 0) {
ret.misses++;
ret.sloc++;
} else if (data[num] !== undefined) {
ret.hits++;
ret.sloc++;
}
ret.source[num] = {
source: line
, coverage: data[num] === undefined
? ''
: data[num]
};
});
ret.coverage = ret.hits / ret.sloc * 100;
return ret;
} | CWE-89 | 0 |
"pagecount"==D?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var t=g.labelLinkClicked;g.labelLinkClicked=function(D,G,P){var K=G.getAttribute("href");if(null==K||!g.isCustomLink(K)||!mxEvent.isTouchEvent(P)&&mxEvent.isPopupTrigger(P))t.apply(this,arguments);else{if(!g.isEnabled()||null!=D&&g.isCellLocked(D.cell))g.customLinkClicked(K),g.getRubberband().reset();mxEvent.consume(P)}};this.editor.getOrCreateFilename=function(){var D=d.defaultFilename,G=d.getCurrentFile();null!=G&&(D=null!=G.getTitle()?
G.getTitle():D);return D};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75, | CWE-79 | 1 |
z=this.graph.getLinkForCell(this.state.cell);B=this.graph.getLinksForState(this.state);this.updateLinkHint(z,B);if(null!=z||null!=B&&0<B.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var B=document.createElement("img");B.setAttribute("src",Editor.editImage);B.setAttribute("title",
mxResources.get("editLink"));B.setAttribute("width","11");B.setAttribute("height","11");B.style.marginLeft="10px";B.style.marginBottom="-1px";B.style.cursor="pointer";Editor.isDarkMode()&&(B.style.filter="invert(100%)");this.linkHint.appendChild(B);mxEvent.addListener(B,"click",mxUtils.bind(this,function(M){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(M)}));var E=B.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt",
[mxResources.get("link")]));E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(M){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(M)}))}if(null!=z)for(B=0;B<z.length;B++){var G=document.createElement("div");G.style.marginTop=null!=t||0<B?"6px":"0px";G.appendChild(this.graph.createLinkForHint(z[B].getAttribute("href"),mxUtils.getTextContent(z[B])));this.linkHint.appendChild(G)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(M){}}; | CWE-79 | 1 |
elFinder.prototype.commands.view = function() {
this.value = this.fm.viewType;
this.alwaysEnabled = true;
this.updateOnSelect = false;
this.options = { ui : 'viewbutton'};
this.getstate = function() {
return 0;
}
this.exec = function() {
var value = this.fm.storage('view', this.value == 'list' ? 'icons' : 'list');
this.fm.viewchange();
this.update(void(0), value);
}
} | CWE-89 | 0 |
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 |
function doConnect() {
startTimeout();
self._sock.connect({
host: host,
port: self.config.port,
localAddress: self.config.localAddress,
localPort: self.config.localPort
});
self._sock.setNoDelay(true);
self._sock.setMaxListeners(0);
self._sock.setTimeout(typeof cfg.timeout === 'number' ? cfg.timeout : 0);
} | CWE-78 | 6 |
l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Za);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style, | CWE-79 | 1 |
PKAuthContext.prototype.accept = function() {
if (!this.signature) {
this._initialResponse = true;
this._stream.authPKOK(this.key.algo, this.key.data);
} else {
AuthContext.prototype.accept.call(this);
}
}; | CWE-78 | 6 |
success: function() {
$('#chatroom').append('<p style="color: purple;">[' + getDateString() + '] <b>[whisper to ' + display + ']</b> ' + result);
$('#chatroom').get(0).scrollTop = $('#chatroom').get(0).scrollHeight;
} | CWE-79 | 1 |
function dialog_ajax(a,b,c,e,d,f,g,h){b="undefined"==typeof b||!1===b?alert("You send an invalid url"):b;e="undefined"==typeof e||!1===e?"POST":e;d="undefined"==typeof d||!1===d?"JSON":d;h="undefined"==typeof h||!1===h?$("document.body"):h;a="undefined"==typeof a||!1===a?set_popup_title():a;c._cat_ajax=1;$.ajax({type:e,url:b,dataType:d,context:h,data:c,beforeSend:function(b){$(".fc_popup").remove();b.process=set_activity(a);"undefined"!=typeof f&&!1!==f&&f.call(this)},success:function(a,b,c){return_success(c.process,
a.message);!0===a.success?"undefined"!=typeof g&&!1!==g&&g.call(this,a):return_error(c.process,a.message)}})} | CWE-79 | 1 |
R=0;R<N.length;R++)if(null==E||null!=E[N[R]])Q[N[R]]=!0,J.push(N[R]);E=Q}else return[]}return J};Graph.prototype.getTagsForCells=function(u){for(var E=[],J={},T=0;T<u.length;T++){var N=this.getTagsForCell(u[T]);if(0<N.length){N=N.split(" ");for(var Q=0;Q<N.length;Q++)null==J[N[Q]]&&(J[N[Q]]=!0,E.push(N[Q]))}}return E};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,E){if(0<u.length&&0<E.length){this.model.beginUpdate(); | CWE-79 | 1 |
ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Da,La,Ya){Da=X("",Da.funct,null,La,Da,Ya);Da.style.width="40px";Da.style.opacity="0.7";return wa(Da,null,"pointer")},wa=function(Da,La,Ya){null!=La&&Da.setAttribute("title",
La);Da.style.cursor=null!=Ya?Ya:"default";Da.style.margin="2px 0px";S.appendChild(Da);mxUtils.br(S);return Da};wa(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");wa(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;", | CWE-79 | 1 |
rest = function(){
if (!overlay.is(':hidden')) {
overlay.addClass('ui-front')
.elfinderoverlay('hide')
.off('click', cancel);
}
node.removeClass('ui-front').css('position', '');
if (tarea) {
nnode.css('max-height', '');
} else {
pnode.css('width', '')
.parent('td').css('overflow', '');
}
}, colwidth, | CWE-89 | 0 |
oauth2: new XOAuth2({
user: 'testuser',
accessToken: testtoken
})
},
function(err) {
expect(err).to.not.exist;
expect(client.authenticated).to.be.true;
done();
}
);
}); | CWE-88 | 3 |
accept = function() {
if (replied)
return;
replied = true;
stream.channelOpenConfirm(info.sender,
localChan,
Channel.MAX_WINDOW,
Channel.PACKET_SIZE);
return new Session(self, info, localChan);
}; | CWE-78 | 6 |
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 |
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= | CWE-79 | 1 |
helper : function(e, ui) {
var element = this.id ? $(this) : $(this).parents('[id]:first'),
helper = $('<div class="elfinder-drag-helper"><span class="elfinder-drag-helper-icon-status"/></div>'),
icon = function(f) {
var mime = f.mime, i;
i = '<div class="elfinder-cwd-icon '+self.mime2class(mime)+' ui-corner-all"/>';
if (f.tmb && f.tmb !== 1) {
i = $(i).css('background', "url('"+self.option('tmbUrl')+f.tmb+"') center center no-repeat").get(0).outerHTML;
}
return i;
},
hashes, l, ctr;
self.draggingUiHelper && self.draggingUiHelper.stop(true, true);
self.trigger('dragstart', {target : element[0], originalEvent : e});
hashes = element.hasClass(self.res('class', 'cwdfile'))
? self.selected()
: [self.navId2Hash(element.attr('id'))];
helper.append(icon(files[hashes[0]])).data('files', hashes).data('locked', false).data('droped', false).data('namespace', self.namespace).data('dropover', 0);
if ((l = hashes.length) > 1) {
helper.append(icon(files[hashes[l-1]]) + '<span class="elfinder-drag-num">'+l+'</span>');
}
$(document).on(keydown + ' keyup.' + namespace, function(e){
var chk = (e.shiftKey||e.ctrlKey||e.metaKey);
if (ctr !== chk) {
ctr = chk;
if (helper.is(':visible') && helper.data('dropover') && ! helper.data('droped')) {
helper.toggleClass('elfinder-drag-helper-plus', helper.data('locked')? true : ctr);
self.trigger(ctr? 'unlockfiles' : 'lockfiles', {files : hashes, helper: helper});
}
}
});
return helper;
} | CWE-89 | 0 |
H.x+" "+H.y;S="";c=[];for(U=2;U<v.length;U+=2)H=N(U),S+=" L"+H.x+" "+H.y,c.push(H);d.setAttribute("d",t+S)}m&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(J.x-H.x,J.y-H.y)).grow(20)));E.consume()}}),mouseUp:mxUtils.bind(this,function(J,E){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(y(E.getEvent()),E.consume())})});var F=function(J){return mxUtils.convertPoint(b.container,mxEvent.getClientX(J),mxEvent.getClientY(J))},G=function(J){for(v.push(J);v.length>l;)v.shift()},N= | CWE-79 | 1 |
text: Ext.util.Format.htmlEncode(record.get('name')),
qtip: Tine.Tinebase.common.doubleEncode(record.get('host')),
leaf: false,
cls: 'felamimail-node-account',
delimiter: record.get('delimiter'),
ns_personal: record.get('ns_personal'),
account_id: record.data.id
}); | CWE-79 | 1 |
function imageDimensions(src) {
var o = getImageDimensions();
var u = 'px';
if (src == 'width') {
if (o.uw == '%') u = '%';
o.h = Math.round(o.w / imgScal);
} else {
if (o.uh == '%') u = '%';
o.w = Math.round(o.h * imgScal);
}
if (u == '%') {
o.w += '%';
o.h += '%';
}
t.getContentElement('tab-properties', 'width').setValue(o.w),
t.getContentElement('tab-properties', 'height').setValue(o.h);
} | CWE-434 | 5 |
setTimeout(function(){Ia.style.display="none"},4E3)}function z(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",p=X,X=null)}function L(fa,ca,ba,ja,ia,ma,qa){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";Q.querySelector(".geTempDlgRadioBtn[data-id="+ja+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");Q.querySelector("."+ca).src="/images/"+ba+"-sel.svg";Q.querySelector("."+ia).src= | CWE-79 | 1 |
addLinkHtml: function (id, name) {
if (this.mode == 'search') {
return Dep.prototype.addLinkHtml.call(this, id, name);
}
var $container = this.$el.find('.link-container');
var $el = $('<div class="form-inline list-group-item link-with-role clearfix link-group-item-with-primary">').addClass('link-' + id).attr('data-id', id);
var nameHtml = '<div>' + name + ' ' + '</div>';
var removeHtml = '<a href="javascript:" class="pull-right" data-id="' + id + '" data-action="clearLink"><span class="fas fa-times"></a>';
$left = $('<div>');
$left.append(nameHtml);
$el.append($left);
$right = $('<div>');
$right.append(removeHtml);
$el.append($right);
var isPrimary = (id == this.primaryId);
var iconHtml = '<span class="fas fa-star fa-sm ' + (!isPrimary ? 'text-muted' : '') + '"></span>';
var title = this.translate('Primary');
var $primary = $('<button type="button" class="btn btn-link btn-sm pull-right hidden" title="'+title+'" data-action="switchPrimary" data-id="'+id+'">'+iconHtml+'</button>');
$primary.insertBefore($el.children().first().children().first());
$container.append($el);
this.managePrimaryButton();
return $el;
}, | CWE-79 | 1 |
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 |
function(N,J){0<F.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+F.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var y=!1;EditorUi.prototype.initFormatWindow=function(){if(!y&&null!=this.formatWindow){y=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=
parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,ba,ja){var ia=E.menus.get(ca),ma=Q.addMenu(mxResources.get(ca), | CWE-79 | 1 |
cache = function(data) {
var l = data.length, f, i;
for (i = 0; i < l; i++) {
f = data[i];
if (f.name && f.hash && f.mime) {
if (!f.phash) {
var name = 'volume_'+f.name,
i18 = self.i18n(name);
if (name != i18) {
f.i18 = i18;
}
// set disabledCmds, tmbUrls for each volume
if (f.volumeid) {
f.disabled && (self.disabledCmds[f.volumeid] = f.disabled);
if (f.tmbUrl) {
self.tmbUrls[f.volumeid] = f.tmbUrl;
}
self.roots[f.volumeid] = f.hash;
}
}
files[f.hash] = f;
}
}
}, | CWE-89 | 0 |
U+";"))}),mxUtils.bind(this,function(p){e.setSelectionCells(this.insertTextAt(U,H,S,!0))})):0<=mxUtils.indexOf(F.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(F.dataTransfer.getData("text/plain"),H,S,!0))}}F.stopPropagation();F.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var q=g.items;for(index in q){var v=q[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(A,z,L,M,n,y){c.insertImage(A,n,y)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var z=0;z<A.length;z++)A[z]()});else{var x=
this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],x.x,x.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML=" ";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck", | CWE-79 | 1 |
module.exports = function(options) {
return new OAuthServer(options);
}; | CWE-88 | 3 |
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 |
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 |
addFile:function(name,size,lastModified,loading){
var img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file.png');
var html='<tr data-type="file" data-size="'+size+'">';
if(name.indexOf('.')!=-1){
var basename=name.substr(0,name.lastIndexOf('.'));
var extension=name.substr(name.lastIndexOf('.'));
}else{
var basename=name;
var extension=false;
}
html+='<td class="filename" style="background-image:url('+img+')"><input type="checkbox" />';
html+='<a class="name" href="download.php?file='+$('#dir').val()+'/'+name+'"><span class="nametext">'+basename
if(extension){
html+='<span class="extension">'+extension+'</span>';
}
html+='</span></a></td>';
if(size!='Pending'){
simpleSize=simpleFileSize(size);
}else{
simpleSize='Pending';
}
sizeColor = Math.round(200-size/(1024*1024)*2);
lastModifiedTime=Math.round(lastModified.getTime() / 1000);
modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*14);
html+='<td class="filesize" title="'+humanFileSize(size)+'" style="color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')">'+simpleSize+'</td>';
html+='<td class="date"><span class="modified" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</span></td>';
html+='</tr>';
FileList.insertElement(name,'file',$(html).attr('data-file',name));
if(loading){
$('tr').filterAttr('data-file',name).data('loading',true);
}else{
$('tr').filterAttr('data-file',name).find('td.filename').draggable(dragOptions);
}
}, | 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 |
null,null,function(P){console.log(P)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function L(P){function Q(S){E.style.background="transparent";E.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,S);E.appendChild(Y);N.stop()}if(null!=E)if(E.style.background="transparent",E.innerHTML="",null==P||P.folder||/\.drawiolib$/.test(P.name))Q(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),U=P,N.spin(E),z(P,function(S){N.stop();
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= | CWE-94 | 14 |
!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-94 | 14 |
(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,!1);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); | CWE-89 | 0 |
Graph.compressNode(x))));c(v)}return m};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],k=0;k<c.length;k++){var m=c.charAt(k);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(m)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch= | CWE-79 | 1 |
"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-94 | 14 |
Graph.fileSupport&&(D.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),D.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var x=new FileReader;x.onload=function(A){D.value=A.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=u();if(0==D.value.length||D.value==q)q=v,D.value=q});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"), | CWE-79 | 1 |
0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ka.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};bb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Za.prototype.getConstraints= | CWE-79 | 1 |
Client.prototype.openssh_unforwardInStreamLocal = 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 unbind on ' + socketPath));
}
delete self._forwardingUnix[socketPath];
cb();
});
}
return this._sshstream.openssh_cancelStreamLocalForward(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 |
u.appendChild(E));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
E){var J=Graph.fontMapping[E];null==J&&Graph.isCssFontUrl(E)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",E)):(null==J&&(J='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+E+'");\n}'),u=document.createElement("style"),mxUtils.write(u,J));return u};Graph.addFont=function(u,E,J){if(null!=u&&0<u.length&&null!=E&&0<E.length){var T=u.toLowerCase();if("helvetica"!=T&&"arial"!=u&&"sans-serif"!= | CWE-79 | 1 |
getFormData(form) {
let serialized = [];
// Loop through each field in the form
for (let i = 0; i < form.elements.length; i++) {
let field = form.elements[i];
// Don't serialize a couple of field types (button and submit are important to exclude, eg. invoice preview would fail otherwise)
if (!field.name || field.disabled || field.type === 'file' || field.type === 'reset' || field.type === 'submit' || field.type === 'button') {
continue;
}
// If a multi-select, get all selections
if (field.type === 'select-multiple') {
for (var n = 0; n < field.options.length; n++) {
if (!field.options[n].selected) continue;
serialized.push({
name: field.name,
value: field.options[n].value
});
}
} else if ((field.type !== 'checkbox' && field.type !== 'radio') || field.checked) {
serialized.push({
name: field.name,
value: field.value
});
}
}
return serialized;
} | CWE-1236 | 12 |
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&& | CWE-94 | 14 |
function turn_textarea_switch(checkbox) {
var target, session;
var id = checkbox.id.replace(/hidden_value$/, "value");
var source = document.getElementById(id);
var $editorContainer = $('.editor-container');
if (checkbox.checked) {
target = '<input class="form-control" type="password" id="' + id + '" name="' + source.name + '" value ="' + source.value + '"></input>'
$editorContainer.find('.navbar').hide();
$editorContainer.find('.ace_editor').remove();
$(source).replaceWith(target);
} else if ($('.editor-container').length > 0) {
target = '<textarea class="form-control editor_source hide" id="' + id + '" name="' + source.name + '" placeholder="Value" rows="1">' + source.value + '</textarea>'
$editorContainer.find('.navbar').show();
$(source).replaceWith(target);
onEditorLoad();
session = Editor.getSession();
session.setValue($(source).val());
} else {
var target = '<textarea class="form-control" id="' + id + '" name="' + source.name + '" placeholder="Value" rows="1">' + source.value + '</textarea>'
$(source).replaceWith(target);
}
} | CWE-79 | 1 |
Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,E){return"1"==mxUtils.getValue(u.style,"enumerate","0")}}, | CWE-79 | 1 |
exports.set = function(obj, path, value) {
var cachekey = 'S+' + path;
if (F.temporary.other[cachekey])
return F.temporary.other[cachekey](obj, value);
var arr = parsepath(path);
var builder = [];
for (var i = 0; i < arr.length - 1; i++) {
var type = arr[i + 1] ? (REGISARR.test(arr[i + 1]) ? '[]' : '{}') : '{}';
var p = 'w' + (arr[i][0] === '[' ? '' : '.') + arr[i];
builder.push('if(typeof(' + p + ')!==\'object\'||' + p + '==null)' + p + '=' + type + ';');
}
var v = arr[arr.length - 1];
var ispush = v.lastIndexOf('[]') !== -1;
var a = builder.join(';') + ';var v=typeof(a)===\'function\'?a(U.get(b)):a;w' + (v[0] === '[' ? '' : '.') + (ispush ? v.replace(REGREPLACEARR, '.push(v)') : (v + '=v')) + ';return v';
if ((/__proto__|constructor|prototype|eval/).test(a))
throw new Error('Potential vulnerability');
var fn = new Function('w', 'a', 'b', a);
F.temporary.other[cachekey] = fn;
fn(obj, value, path);
}; | CWE-94 | 14 |
k&&k(x)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,"readwrite");m.oncomplete=e;m.onerror=g;for(var q=0;q<k.length;q++)m.objectStore(k[q]).delete(c[q])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var q=m.transaction([k],"readonly").objectStore(k).get(c);q.onsuccess=function(){e(q.result)}; | CWE-79 | 1 |
bottomMarker.css({top: (buffer._hpi * buffer.length + ph) + 'px'}).show();
}
}, | CWE-89 | 0 |
path: 'http://localhost:' + (port + 1000) + '/message.html'
}
}
};
shared.resolveContent(mail.data, 'html', function(err) {
expect(err).to.exist;
done();
});
}); | CWE-88 | 3 |
0;Q<P.length;Q++)P[Q].parentNode.removeChild(P[Q]);m(Y);Y.style.opacity="0.5"}else{P=V(H).replies;for(Q=0;Q<P.length;Q++)N.removeChild(P[Q]);for(Q=0;Q<F.length;Q++)if(F[Q]==H){F.splice(Q,1);break}K.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(Q){k(Y);b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));v||H.isLocked||0!=R||O(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Q){function P(){var T=
Q.target;T.innerHTML="";H.isResolved=!H.isResolved;mxUtils.write(T,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=H.isResolved?"none":"",ba=V(H).replies,ja=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=ja;for(var ka=ba[Z].querySelectorAll(".geCommentAction"),da=0;da<ka.length;da++)ka[da]!=T.parentNode&&(ka[da].style.display=X);A||(ba[Z].style.display="none")}E()}H.isResolved?U(mxResources.get("reOpened")+ | CWE-79 | 1 |
(W.removeAttribute("disabled"),W.checked=!u.pageVisible):(W.setAttribute("disabled","disabled"),W.checked=!1)};K=200;var F=1,G=null;if(d.pdfPageExport&&!n){var N=function(){U.value=Math.max(1,Math.min(F,Math.max(parseInt(U.value),parseInt(H.value))));H.value=Math.max(1,Math.min(F,Math.min(parseInt(U.value),parseInt(H.value))))},J=d.addRadiobox(y,"pages",mxResources.get("allPages"),!0),E=d.addRadiobox(y,"pages",mxResources.get("pages")+":",!1,null,!0),H=document.createElement("input");H.style.cssText= | CWE-79 | 1 |
!1)?!1:q}if(q||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));q?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(A){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,q){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=q?"&base64="+q:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),q=0;q<k;++q){for(var v=1024*q,x=Math.min(v+1024,g),A=Array(x-v),z=0;v<x;++z,++v)A[z]=c[v].charCodeAt(0);m[q]=new Uint8Array(A)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,q,v,x){q=null!=q?q:!1;v=null!=v?v:"vsdx"!= | 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 |
addLinkHtml: function (id, name) {
if (this.mode == 'search') {
return Dep.prototype.addLinkHtml.call(this, id, name);
}
var $container = this.$el.find('.link-container');
var $el = $('<div class="form-inline list-group-item link-with-role clearfix link-group-item-with-primary">').addClass('link-' + id).attr('data-id', id);
var nameHtml = '<div>' + name + ' ' + '</div>';
var removeHtml = '<a href="javascript:" class="pull-right" data-id="' + id + '" data-action="clearLink"><span class="fas fa-times"></a>';
$left = $('<div>');
$left.append(nameHtml);
$el.append($left);
$right = $('<div>');
$right.append(removeHtml);
$el.append($right);
var isPrimary = (id == this.primaryId);
var iconHtml = '<span class="fas fa-star fa-sm ' + (!isPrimary ? 'text-muted' : '') + '"></span>';
var title = this.translate('Primary');
var $primary = $('<button type="button" class="btn btn-link btn-sm pull-right hidden" title="'+title+'" data-action="switchPrimary" data-id="'+id+'">'+iconHtml+'</button>');
$primary.insertBefore($el.children().first().children().first());
$container.append($el);
this.managePrimaryButton();
return $el;
}, | CWE-79 | 1 |
k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(K){var F=new mxCellOverlay(K.image||p.warningImage,K.tooltip,K.align,K.valign,K.offset);F.addListener(mxEvent.CLICK,function(H,S){l.alert(K.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id")); | CWE-79 | 1 |
this.path = function(hash, i18) {
return files[hash] && files[hash].path
? files[hash].path
: this.path2array(hash, i18).join(cwdOptions.separator);
} | CWE-89 | 0 |
onRcptTo: function(address, session, callback) {
if (!/@valid.recipient/.test(address.address)) {
return callback(new Error('Only [email protected] is allowed to receive mail'));
}
if (/[\x80-\uFFFF]/.test(address.address) && !session.smtpUtf8) {
return callback(new Error('Trying to use Unicode address without declaring SMTPUTF8 first'));
}
return callback(); // Accept the address
}, | CWE-88 | 3 |
u.appendChild(E));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u, | CWE-79 | 1 |
":");var q="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(x){this.pickColor(q||"none",function(A){q=A;g()});mxEvent.consume(x)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";v.className="geColorBtn";c.appendChild(v);mxUtils.br(c);return{getColor:function(){return q},getTarget:function(){return k.value}, | CWE-79 | 1 |
1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(C){C=O.apply(this,arguments); | CWE-79 | 1 |
module.exports.createTransport = function(transporter, defaults) {
let urlConfig;
let options;
let mailer;
if (
// provided transporter is a configuration object, not transporter plugin
(typeof transporter === 'object' && typeof transporter.send !== 'function') ||
// provided transporter looks like a connection url
(typeof transporter === 'string' && /^(smtps?|direct):/i.test(transporter))
) {
if ((urlConfig = typeof transporter === 'string' ? transporter : transporter.url)) {
// parse a configuration URL into configuration options
options = shared.parseConnectionUrl(urlConfig);
} else {
options = transporter;
}
if (options.pool) {
transporter = new SMTPPool(options);
} else if (options.sendmail) {
transporter = new SendmailTransport(options);
} else if (options.streamTransport) {
transporter = new StreamTransport(options);
} else if (options.jsonTransport) {
transporter = new JSONTransport(options);
} else if (options.SES) {
transporter = new SESTransport(options);
} else {
transporter = new SMTPTransport(options);
}
}
mailer = new Mailer(transporter, options, defaults);
return mailer;
}; | CWE-88 | 3 |
function(){function O(ua,ya,Na){var Fa=U.menus.get(ua),Ra=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),P);Ra.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ra.style.display="inline-block";Ra.style.boxSizing="border-box";Ra.style.top="6px";Ra.style.marginRight="6px";Ra.style.height="30px";Ra.style.paddingTop="6px";Ra.style.paddingBottom="6px";Ra.style.cursor="pointer";Ra.setAttribute("title",mxResources.get(ua));U.menus.menuCreated(Fa,
Ra,"geMenuItem");null!=Na?(Ra.style.backgroundImage="url("+Na+")",Ra.style.backgroundPosition="center center",Ra.style.backgroundRepeat="no-repeat",Ra.style.backgroundSize="24px 24px",Ra.style.width="34px",Ra.innerHTML=""):ya||(Ra.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ra.style.backgroundPosition="right 6px center",Ra.style.backgroundRepeat="no-repeat",Ra.style.paddingRight="22px");return Ra}function X(ua,ya,Na,Fa,Ra,db){var Va=document.createElement("a");Va.className= | CWE-94 | 14 |
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var l=b.isEditable()&&!b.invalidChecksum;f.isEnabled()&&!l&&f.reset();f.setEnabled(l);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?
window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))}; | CWE-79 | 1 |
mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(E.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,E.target.result,mxUtils.bind(this,function(ea,Z,fa){M(U,mxUtils.bind(this,function(){if(null!=ea&&ea.length<B){var aa=L&&this.isResampleImageSize(X.size,I)?Math.min(1,Math.min(l/Z,l/fa)):1;return p(ea,X.type,g+U*F,k+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
return null}))}),L,l,I,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else J=E.target.result,p(J,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){M(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(E){M(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?u.readAsDataURL(X):u.readAsText(X)}})(W)});if(C){C= | CWE-79 | 1 |
node: $('<a/>')
.attr({href: link, target: '_blank', title: fm.i18n('link')})
.text(file.name)
.on('mousedown click touchstart touchmove touchend contextmenu', function(e){
var cm = fm.getUI('contextmenu');
e.stopPropagation();
// 'mouseEvInternal' for Firefox's bug (maybe)
cm.data('mouseEvInternal', true);
setTimeout(function(){
cm.data('mouseEvInternal', false);
}, 500);
})
.on('dragstart', function(e) {
var dt = e.dataTransfer || e.originalEvent.dataTransfer || null;
helper = null;
if (dt) {
var icon = function(f) {
var mime = f.mime, i;
i = '<div class="elfinder-cwd-icon '+fm.mime2class(mime)+' ui-corner-all"/>';
if (f.tmb && f.tmb !== 1) {
i = $(i).css('background', "url('"+fm.option('tmbUrl')+f.tmb+"') center center no-repeat").get(0).outerHTML;
}
return i;
};
dt.effectAllowed = 'copyLink';
if (dt.setDragImage) {
helper = $('<div class="elfinder-drag-helper html5-native">').append(icon(file)).appendTo($(document.body));
dt.setDragImage(helper.get(0), 50, 47);
}
if (!fm.UA.IE) {
dt.setData('elfinderfrom', window.location.href + file.phash);
dt.setData('elfinderfrom:' + dt.getData('elfinderfrom'), '');
}
}
})
.on('dragend', function(e) {
helper && helper.remove();
})
}; | CWE-89 | 0 |
window._load_metadata = function(ev, viewport) {
/* Image details */
var tmp = viewport.getMetadata();
$('#wblitz-image-name').html(tmp.imageName);
$('#wblitz-image-description-content').html(tmp.imageDescription.replace(/\n/g, '<br />'));
$('#wblitz-image-author').html(tmp.imageAuthor);
$('#wblitz-image-pub').html(tmp.projectName);
$('#wblitz-image-pubid').html(tmp.projectId);
$('#wblitz-image-timestamp').html(tmp.imageTimestamp);
$("#bulk-annotations").hide();
$("#bulk-annotations").next().hide();
if (tmp.wellId) {
var wellsUrl = PLATE_WELLS_URL_999.replace('999', tmp.wellId),
linksUrl = PLATE_LINKS_URL_999.replace('999', tmp.wellId);
loadBulkAnnotations(wellsUrl, 'Well-' + tmp.wellId);
loadBulkAnnotations(linksUrl, 'Well-' + tmp.wellId);
}
}; | CWE-79 | 1 |
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 |
.attr({href: '#', title: fm.i18n('getLink'), draggable: 'false'})
.text(file.name)
.on('click', function(e){
var parent = node.parent();
e.stopPropagation();
e.preventDefault();
parent.removeClass('ui-state-disabled').addClass('elfinder-button-icon-spinner');
fm.request({
data : {cmd : 'url', target : file.hash},
preventDefault : true
})
.always(function(data) {
parent.removeClass('elfinder-button-icon-spinner');
if (data.url) {
var rfile = fm.file(file.hash);
rfile.url = data.url;
node.replaceWith(getExtra(file).node);
} else {
parent.addClass('ui-state-disabled');
}
});
})
};
node = self.extra.node;
node.ready(function(){
setTimeout(function(){
node.parent().addClass('ui-state-disabled').css('pointer-events', 'auto');
}, 10);
});
}
} | CWE-89 | 0 |
scrollToView = function(o) {
var ftop = o.position().top,
fheight = o.outerHeight(true),
wtop = wrapper.scrollTop(),
wheight = wrapper.innerHeight();
if (ftop + fheight > wtop + wheight) {
wrapper.scrollTop(parseInt(ftop + fheight - wheight));
} else if (ftop < wtop) {
wrapper.scrollTop(ftop);
}
}, | CWE-89 | 0 |
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!= | CWE-79 | 1 |
0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(k,m,q,v,x){EditorUi.logError("Global: "+(null!=k?k:""),m,q,v,x,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)|| | CWE-79 | 1 |
var sanitize_stylesheets = function (html, tagPolicy) {
/**
* sanitize just the css in style tags in a block of html
* called by sanitize_html, if allow_css is true
*/
var h = $("<div/>").append(html);
var style_tags = h.find("style");
if (!style_tags.length) {
// no style tags to sanitize
return html;
}
style_tags.each(function(i, style) {
style.innerHTML = sanitize_css(style.innerHTML, tagPolicy);
});
return h.html();
}; | CWE-79 | 1 |
App.Actions.DB.update_dns_record_hint = function(elm, hint) {
// clean hint
if (hint.trim() == '') {
$(elm).parent().find('.hint').html('');
}
// set domain name without rec in case of @ entries
if (hint == '@') {
hint = '';
}
// dont show pregix if domain name = rec value
if (hint == GLOBAL.DNS_REC_PREFIX + '.') {
hint = '';
}
// add dot at the end if needed
if (hint != '' && hint.slice(-1) != '.') {
hint += '.';
}
$(elm).parent().find('.hint').text(hint + GLOBAL.DNS_REC_PREFIX);
} | CWE-79 | 1 |
exports.killByPort = function (port) {
var processId = null
try {
processId = exec(`lsof -t -i:${port}`)
} catch (e) {
}
if (processId !== null) { // if exists kill
exec(`kill ${processId}`)
}
} | CWE-78 | 6 |
if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,E=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=c.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=E;this.stylesheet=J}return N};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(F){F=null!=F?F:"";"1"==urlParams.dev&&(F+=(0<F.length?"&":"?")+"dev=1");return x.apply(this,arguments)}; | CWE-79 | 1 |
this.getstate = function() {
var sel = this.fm.selected(),
cnt = sel.length,
cwdWrapper;
if (cnt !== 1) {
return -1;
}
cwdWrapper = this.fm.getUI('cwd').parent();
return cwdWrapper.hasClass('elfinder-search-result')? 0 : -1;
} | CWE-89 | 0 |
labels: templateInstance.topTasks.get().map((task) => task._id), | CWE-79 | 1 |
return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==
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 |
Graph.sanitizeHtml=function(a,c){return DOMPurify.sanitize(a,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(a){return DOMPurify.sanitize(a,{IN_PLACE:!0})}; | CWE-79 | 1 |
constructor(options) {
this.__globalCounter = 0;
this.options = options;
this.id = options.id;
this.container = options.container;
this.classes = options.classes;
this.table_title = options.title;
this.header = options.header;
this.onAddition = options.onAddition;
this.onRemove = options.onRemove;
this.header.push("Action");
this.row_num = this.header.length;
this.data = options.data === undefined ? [] : options.data;
this.tr_id_mapping = {};
this.control_items = options.control_items;
this.header_action_button = options.header_action_button === undefined ? {} : options.header_action_button;
if (options.header_action_button !== undefined) {
this.header_action_button_style = this.header_action_button.style === undefined ? {} : this.header_action_button.style;
this.additionEnabled = this.header_action_button.additionEnabled === undefined ? true : this.header_action_button.additionEnabled;
this.additionButtonDisabled = this.header_action_button.disabled === undefined ? false : this.header_action_button.disabled;
} else {
this.header_action_button_style = {};
this.additionEnabled = true;
this.additionButtonDisabled = false;
}
this.row_action_button = options.row_action_button === undefined ? {} : options.row_action_button;
if (options.row_action_button !== undefined) {
this.row_action_button_style = this.row_action_button.style === undefined ? {} : this.row_action_button.style;
this.removalEnabled = this.row_action_button.removalEnabled === undefined ? true : this.row_action_button.removalEnabled;
} else {
this.row_action_button_style = {};
this.removalEnabled = true;
}
this.selects = {};
this.__create_table();
} | 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 |
elFinder.prototype.commands.back = function() {
this.alwaysEnabled = true;
this.updateOnSelect = false;
this.shortcuts = [{
pattern : 'ctrl+left backspace'
}];
this.getstate = function() {
return this.fm.history.canBack() ? 0 : -1;
}
this.exec = function() {
return this.fm.history.back();
}
} | CWE-89 | 0 |
if(p||q){var J=[],V=null,U=null,X=null,t=function(fa){W.setAttribute("disabled","disabled");for(var sa=0;sa<J.length;sa++)J[sa].className=sa==fa?"geBtn gePrimaryBtn":"geBtn"};N=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Aa.style.display="";ja.style.display="";Z.style.left="160px";t(0);Z.scrollTop=0;Z.innerHTML="";H=0;V!=Ma&&(Ma=V,oa=U,Ka=X,Aa.innerHTML="",B(),V=null)}); | CWE-79 | 1 |
ta.style.width="40px";ta.style.height="12px";ta.style.marginBottom="-2px";ta.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ta.style.backgroundPosition="top center";ta.style.backgroundRepeat="no-repeat";ta.setAttribute("title","Minimize");var Na=!1,Ca=mxUtils.bind(this,function(){S.innerHTML="";if(!Na){var za=function(Ea,La,Ta){Ea=X("",Ea.funct,null,La,Ea,Ta);Ea.style.width="40px";Ea.style.opacity="0.7";return wa(Ea,null,"pointer")},wa=function(Ea,La,Ta){null!=La&&Ea.setAttribute("title", | CWE-918 | 16 |
this.exec = function(cmd, files, opts, dstHash) {
if (cmd === 'open') {
this.autoSync('stop');
}
return this._commands[cmd] && this.isCommandEnabled(cmd, dstHash)
? this._commands[cmd].exec(files, opts)
: $.Deferred().reject('No such command');
} | CWE-89 | 0 |
_setOption: function( key, value ) {
var isDraggable, isResizable,
uiDialog = this.uiDialog;
if ( key === "disabled" ) {
return;
}
this._super( key, value );
if ( key === "appendTo" ) {
this.uiDialog.appendTo( this._appendTo() );
}
if ( key === "buttons" ) {
this._createButtons();
}
if ( key === "closeText" ) {
this.uiDialogTitlebarClose.button( {
// Ensure that we always pass a string
label: "" + value
} );
}
if ( key === "draggable" ) {
isDraggable = uiDialog.is( ":data(ui-draggable)" );
if ( isDraggable && !value ) {
uiDialog.draggable( "destroy" );
}
if ( !isDraggable && value ) {
this._makeDraggable();
}
}
if ( key === "position" ) {
this._position();
}
if ( key === "resizable" ) {
// currently resizable, becoming non-resizable
isResizable = uiDialog.is( ":data(ui-resizable)" );
if ( isResizable && !value ) {
uiDialog.resizable( "destroy" );
}
// Currently resizable, changing handles
if ( isResizable && typeof value === "string" ) {
uiDialog.resizable( "option", "handles", value );
}
// Currently non-resizable, becoming resizable
if ( !isResizable && value !== false ) {
this._makeResizable();
}
}
if ( key === "title" ) {
this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
}
}, | CWE-79 | 1 |
relatedTypeString: this.translateEntityType(this.entityType),
iconHtml: this.getIconHtml(this.entityType, this.entityId)
}, Dep.prototype.data.call(this));
},
init: function () {
if (this.getUser().isAdmin()) {
this.isRemovable = true;
}
Dep.prototype.init.call(this);
},
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 |
this.error = function() {
var arg = arguments[0];
return arguments.length == 1 && typeof(arg) == 'function'
? self.bind('error', arg)
: self.trigger('error', {error : arg});
} | CWE-89 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.