code
stringlengths 12
2.05k
| label
int64 0
1
| programming_language
stringclasses 9
values | cwe_id
stringlengths 6
14
| cwe_name
stringlengths 5
103
⌀ | description
stringlengths 36
1.23k
⌀ | url
stringlengths 36
48
⌀ | label_name
stringclasses 2
values |
---|---|---|---|---|---|---|---|
CKEDITOR.POSITION_FOLLOWING},getAscendant:function(a,e){var b=this.$,c;if(!e)b=b.parentNode;for(;b;){if(b.nodeName&&(c=b.nodeName.toLowerCase(),typeof a=="string"?c==a:c in a))return new CKEDITOR.dom.node(b);try{b=b.parentNode}catch(d){b=null}}return null},hasAscendant:function(a,e){var b=this.$;if(!e)b=b.parentNode;for(;b;){if(b.nodeName&&b.nodeName.toLowerCase()==a)return true;b=b.parentNode}return false},move:function(a,e){a.append(this.remove(),e)},remove:function(a){var e=this.$,b=e.parentNode;
if(b){if(a)for(;a=e.firstChild;)b.insertBefore(e.removeChild(a),e);b.removeChild(e)}return this},replace:function(a){this.insertBefore(a);a.remove()},trim:function(){this.ltrim();this.rtrim()},ltrim:function(){for(var a;this.getFirst&&(a=this.getFirst());){if(a.type==CKEDITOR.NODE_TEXT){var e=CKEDITOR.tools.ltrim(a.getText()),b=a.getLength();if(e){if(e.length<b){a.split(b-e.length);this.$.removeChild(this.$.firstChild)}}else{a.remove();continue}}break}},rtrim:function(){for(var a;this.getLast&&(a= | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
$(this).data('name') + '</a></li>',
id: id
});
}
});
elements.sort(function (a, b) {
if (!tabsInfo[a.id] && !tabsInfo[b.id]) return 0;
if (!tabsInfo[a.id]) return 1;
if (!tabsInfo[b.id]) return -1;
if (tabsInfo[a.id].order < tabsInfo[b.id].order) return -1;
if (tabsInfo[a.id].order > tabsInfo[b.id].order) return 1;
return 0;
});
for (let e = 0; e < elements.length; e++) {
lines += elements[e].line;
}
$adminSideMenu.find('.admin-sidemenu-menu').html(lines);
$('.admin-sidemenu-close').off('click').on('click', function () {
$adminSideMain.toggleClass('admin-sidemenu-closed');
$adminSideMenu.toggleClass('admin-sidemenu-closed');
$('.admin-sidemenu-close i').toggleClass('hide');
setTimeout(function () {
//resizeGrids();
$(window).trigger('resize');
}, 400);
});
$('.admin-sidemenu-items').off('click').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
window.location.hash = '#' + $(this).data('tab');
});
$('.admin-sidemenu-items a').off('click').on('click', function (e) {
e.preventDefault();
e.stopPropagation();
window.location.hash = '#' + $(this).parent().data('tab');
});
// Show if update available
tabs.hosts.updateCounter();
tabs.adapters.updateCounter();
} | 1 | JavaScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. | https://cwe.mitre.org/data/definitions/22.html | safe |
TagSearch.prototype.renderResult = function(html) {
this._contentBox.html(html);
}; | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
labels: templateInstance.topTasks.get().map((task) => task._id),
datasets: [{
values: templateInstance.topTasks.get().map((task) => task.count),
}],
},
tooltipOptions: {
},
})
}
})
})
} | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
return P.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var D="1"==mxUtils.getValue(u.style,"enumerate",0);D&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT, | 1 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
getItemHtml: function (value) {
var translatedValue = this.translatedOptions[value] || value;
var html = '' +
'<div class="list-group-item link-with-role form-inline" data-value="' + value + '">' +
'<div class="pull-left" style="width: 92%; display: inline-block;">' +
'<input data-name="translatedValue" data-value="' + value + '" class="role form-control input-sm" value="'+translatedValue+'">' +
'</div>' +
'<div style="width: 8%; display: inline-block; vertical-align: top;">' +
'<a href="javascript:" class="pull-right" data-value="' + value + '" data-action="removeValue"><span class="fas fa-times"></a>' +
'</div><br style="clear: both;" />' +
'</div>';
return html;
}, | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
b[c]:""!==c?Q(c)(b):b}function pb(a) {var b=a.oClasses,c=a.sTableId,d=a.oLanguage,e=a.oPreviousSearch,f=a.aanFeatures,g='<input type="search" class="'+b.sFilterInput+'"/>',j=d.sSearch,j=j.match(/_INPUT_/)?j.replace("_INPUT_",g):j+g,b=h("<div/>",{id:!f.f?c+"_filter":null,"class":b.sFilter}).append(h("<label/>").append(j)),f=function() {var b=!this.value?"":this.value;b!=e.sSearch&&(ha(a,{sSearch:b,bRegex:e.bRegex,bSmart:e.bSmart,bCaseInsensitive:e.bCaseInsensitive}),a._iDisplayStart=0,O(a))},g=null!== | 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fire.call(this,a,e,this)},CKEDITOR.editor.prototype.fireOnce=function(a,e){a in{instanceReady:1,loaded:1}&&(this[a]=true);return CKEDITOR.event.prototype.fireOnce.call(this,a,e,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype)); | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(e,k){return e.name<k.name?-1:e.name>k.name?1:0});for(g=0;g<d.length;g++)"link"==d[g].name&&this.isCustomLink(d[g].value)||(b+=("link"!=d[g].name?"<b>"+d[g].name+":</b> ":"")+mxUtils.htmlEntities(d[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b}; | 0 | JavaScript | CWE-94 | Improper Control of Generation of Code ('Code Injection') | The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. | https://cwe.mitre.org/data/definitions/94.html | vulnerable |
this.objectChange = function (id, obj) {
// Update Adapter Table
if (id.match(/^system\.adapter\.[a-zA-Z0-9-_]+$/)) {
if (obj) {
if (this.list.indexOf(id) === -1) this.list.push(id);
} else {
var j = this.list.indexOf(id);
if (j !== -1) {
this.list.splice(j, 1);
}
}
if (typeof this.$grid !== 'undefined' && this.$grid[0]._isInited) {
this.init(true);
}
}
}; | 0 | JavaScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. | https://cwe.mitre.org/data/definitions/22.html | vulnerable |
d};return function(c,d) {return b(c,d,a)}}return function(b,d) {b[a]=d}}function Ma(a) {return D(a.aoData,"_aData")}function na(a) {a.aoData.length=0;a.aiDisplayMaster.length=0;a.aiDisplay.length=0;a.aIds={}}function oa(a,b,c) {for(var d=-1,e=0,f=a.length;e<f;e++)a[e]==b?d=e:a[e]>b&&a[e]--; -1!=d&&c===k&&a.splice(d,1)}function ea(a,b,c,d) {var e=a.aoData[b],f,g=function(c,d) {for(;c.childNodes.length;)c.removeChild(c.firstChild);c.innerHTML=B(a,b,d,"display")};if ("dom"===c||(!c||"auto"===c)&&"dom"===e.src)e._aData=
Ka(a,e,d,d===k?k:e._aData).data;else{var j=e.anCells;if (j)if (d!==k)g(j[d],d);else{c=0;for(f=j.length;c<f;c++)g(j[c],c)}}e._aSortData=null;e._aFilterData=null;g=a.aoColumns;if (d!==k)g[d].sType=null;else{c=0;for(f=g.length;c<f;c++)g[c].sType=null;Na(a,e)}}function Ka(a,b,c,d) {var e=[],f=b.firstChild,g,j,i=0,o,l=a.aoColumns,q=a._rowReadObject,d=d!==k?d:q?{}:[],u=function(a,b) {if ("string"===typeof a) {var c=a.indexOf("@");-1!==c&&(c=a.substring(c+1),R(a)(d,b.getAttribute(c)))}},S=function(a) {if (c===k|| | 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+
"')");F.innerHTML="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q); | 0 | JavaScript | CWE-94 | Improper Control of Generation of Code ('Code Injection') | The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. | https://cwe.mitre.org/data/definitions/94.html | vulnerable |
function loadFilterList()
{
window.$("#stuf_loader").show();
ajax_call("StudentFilterList.php", loadFilterListCallback, loadFilterListErrors);
} | 1 | JavaScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. | https://cwe.mitre.org/data/definitions/22.html | safe |
fetch: function () {
var data = Dep.prototype.fetch.call(this);
data.translatedOptions = {};
(data[this.name] || []).forEach(function (value) {
var valueInternal = value.replace(/"/g, '\\"');
data.translatedOptions[value] = this.$el.find('input[data-name="translatedValue"][data-value="'+valueInternal+'"]').val() || value;
}, this);
return data;
} | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,0,0);var u=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(E){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})(); | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
init: function (editorInstance) {
initPasteEvent(editorInstance);
var pluginName = 'base64image-dialog';
editorInstance.ui.addToolbarGroup('base64image', 'insert');
editorInstance.ui.addButton('base64image', {
label: editorInstance.lang.common.image,
command: pluginName,
toolbar: 'insert'
});
CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/dialog.js');
editorInstance.addCommand(
pluginName,
new CKEDITOR.dialogCommand(pluginName, {
allowedContent:
'img[alt,!src]{border-style,border-width,float,height,margin,margin-bottom,margin-left,margin-right,margin-top,width}',
requiredContent: 'img[alt,src]',
contentTransformations: [
['img{width}: sizeToStyle', 'img[width]: sizeToAttribute'],
['img{float}: alignmentToStyle', 'img[align]: alignmentToAttribute']
]
})
);
editorInstance.on('doubleclick', function (evt) {
if (evt.data.element && !evt.data.element.isReadOnly() && evt.data.element.getName() === 'img') {
evt.data.dialog = pluginName;
editorInstance.getSelection().selectElement(evt.data.element);
}
});
if (editorInstance.addMenuItem) {
editorInstance.addMenuGroup('imageToBase64Group');
editorInstance.addMenuItem('imageToBase64Item', {
label: editorInstance.lang.common.image,
icon: this.path + 'icons/base64image.png',
command: pluginName,
group: 'imageToBase64Group'
});
}
if (editorInstance.contextMenu) {
editorInstance.contextMenu.addListener(function (element, selection) {
if (element && element.getName() === 'img') {
editorInstance.getSelection().selectElement(element);
return { imageToBase64Item: CKEDITOR.TRISTATE_ON };
}
return null;
});
}
} | 0 | JavaScript | CWE-434 | Unrestricted Upload of File with Dangerous Type | The software allows the attacker to upload or transfer files of dangerous types that can be automatically processed within the product's environment. | https://cwe.mitre.org/data/definitions/434.html | vulnerable |
mxActor);Za.prototype.arrowWidth=.3;Za.prototype.arrowSize=.2;Za.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.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,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(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)/ | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function drawPath(ctx, pts){
ctx.beginPath();
ctx.moveTo(pts[0][0], pts[0][1]);
for (var p=1; p < pts.length; p++)
ctx.lineTo(pts[p][0], pts[p][1]);
ctx.stroke();
} | 0 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | vulnerable |
"_length"){e=a.getAttribute(h)||"";if(h=="style")a:{d=c[h];typeof d=="string"&&(d=CKEDITOR.tools.parseCssText(d));typeof e=="string"&&(e=CKEDITOR.tools.parseCssText(e,true));g=void 0;for(g in d)if(!(g in e&&(e[g]==d[g]||d[g]=="inherit"||e[g]=="inherit"))){d=false;break a}d=true}else d=c[h]==e;if(d){if(!b)return true}else if(b)return false}if(b)return true}else return true}return false},checkElementRemovable:function(a,b){if(this.checkElementMatch(a,b))return true;var c=k(this)[a.getName()];if(c){var d; | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
"12px";var P=E.getRealtimeError();E=E.getRealtimeState();var J=mxResources.get("realtimeCollaboration");1==E?(G.src=Editor.syncImage,J+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,J=null!=P&&null!=P.message?J+(" ("+P.message+")"):J+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",J);C.style.paddingRight="4px";C.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var C=
this.shareButton;C.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";C.className="geToolbarButton";C.innerHTML="";C.style.backgroundImage="url("+Editor.shareImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="24px 24px";C.style.height="24px";C.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var C=document.createElement("div");C.style.display="inline-block";C.style.position="relative";C.style.marginTop="6px";C.style.marginRight="4px";var E=document.createElement("a");E.className="geMenuItem gePrimaryBtn";E.style.marginLeft="8px";E.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose? | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
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();
},
});
}); | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
html:function(){for(var e='<div class="cke_accessibility_legend" role="document" aria-labelledby="'+l+'_arialbl" tabIndex="-1">%1</div><span id="'+l+'_arialbl" class="cke_voice_label">'+a.contents+" </span>",g=[],c=a.legend,j=c.length,f=0;f<j;f++){for(var b=c[f],h=[],i=b.items,k=i.length,d=0;d<k;d++){var n=i[d],o=n.legend.replace(m,p);o.match(m)||h.push("<dt>%1</dt><dd>%2</dd>".replace("%1",n.name).replace("%2",o))}g.push("<h1>%1</h1><dl>%2</dl>".replace("%1",b.name).replace("%2",h.join("")))}return e.replace("%1",
g.join(""))}()+'<style type="text/css">.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,.cke_browser_ie6 .cke_accessibility_legend{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}</style>'}]}], | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
text: src.slice(2, lLength + match.index + rLength - 1)
};
}
}
}
}; | 1 | JavaScript | CWE-400 | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | safe |
hover = function(){
var win = $(window),
baseleft = $(node).offset().left,
basetop = $(node).offset().top,
basewidth = $(node).outerWidth(),
width = submenu.outerWidth(),
height = submenu.outerHeight(),
wwidth = win.scrollLeft() + win.width(),
wheight = win.scrollTop() + win.height(),
margin = 5, x, y, over;
over = (baseleft + basewidth + width + margin) - wwidth;
x = (over > 0)? basewidth - over : basewidth;
over = (basetop + 5 + height + margin) - wheight;
y = (over > 0)? 5 - over : 5;
var css = {
left : x,
top : y
};
submenu.css(css).toggle();
}; | 0 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | vulnerable |
null!=sa[ra]&&(ra=sa[ra]);ra={url:pa.getAttribute("url"),libs:pa.getAttribute("libs"),title:pa.getAttribute("title"),tooltip:pa.getAttribute("name")||pa.getAttribute("url"),preview:pa.getAttribute("preview"),clibs:ra,tags:pa.getAttribute("tags")};wa.push(ra);null!=ya&&(wa=Ba[va],null==wa&&(wa={},Ba[va]=wa),va=wa[ya],null==va&&(va=[],wa[ya]=va),va.push(ra))}pa=pa.nextSibling}S.stop();B()}})};G.appendChild(ea);G.appendChild(Aa);G.appendChild(Z);var ta=!1,ka=k;/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)&& | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function usercheck_callback_student_Mod(data) {
var response = data;
document.getElementById('ajax_output_st').innerHTML = '';
if (response != 1)
{
document.getElementById('students[USERNAME]').value = '';
document.getElementById('students[PASSWORD]').value = '';
}
var student_username = document.getElementById("students[USERNAME]").value;
var student_username_flag = document.getElementById("stu_username_flag").value;
if(student_username != '' && student_username_flag == '0')
{
var obj = document.getElementById('ajax_output_st');
obj.style.color = '#ff0000';
obj.innerHTML = 'Username can only contain letters, numbers, underscores, at the rate and dots';
window.$("#mod_student_btn").attr("disabled", true);
}
else
{
window.$("#mod_student_btn").attr("disabled", false);
}
}
| 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
[H],"{1} ago"));F.setAttribute("title",K.toLocaleDateString()+" "+K.toLocaleTimeString())}function k(K){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";K.appendChild(F);K.busyImg=F}function l(K){K.style.border="1px solid red";K.removeChild(K.busyImg)}function p(K){K.style.border="";K.removeChild(K.busyImg)}function q(K,F,H,S,V){function M(N,Q,R){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className=
"geCommentActionLnk";mxUtils.write(ba,N);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(ea){Q(ea,K);ea.preventDefault();mxEvent.consume(ea)});T.appendChild(Y);R&&(Y.style.display="none")}function W(){function N(Y){Q.push(R);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)R=R.nextSibling,N(Y.replies[ba])}var Q=[],R=X;N(K);return{pdiv:R,replies:Q}}function U(N,Q,R,Y,ba){function ea(){k(va);K.addReply(aa,function(ja){aa.id=ja;K.replies.push(aa);p(va);R&&R()},function(ja){Z();l(va); | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
l,q=W(a);g=a._iDisplayStart;i=!1!==d.bPaginate?a._iDisplayLength:-1;var k=function(a,b) {j.push({name:a,value:b})};k("sEcho",a.iDraw);k("iColumns",c);k("sColumns",D(b,"sName").join(","));k("iDisplayStart",g);k("iDisplayLength",i);var S={draw:a.iDraw,columns:[],order:[],start:g,length:i,search:{value:e.sSearch,regex:e.bRegex}};for(g=0;g<c;g++)o=b[g],l=f[g],i="function"==typeof o.mData?"function":o.mData,S.columns.push({data:i,name:o.sName,searchable:o.bSearchable,orderable:o.bSortable,search:{value:l.sSearch, | 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};Ea.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,na){xa||na?!xa&&na?c.lineTo(K,0):xa&&!na?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};Ea.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,na,$a,ib,db,Ga){if("fold"==
A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&$a&&Ga&&(c.moveTo(0,na),c.lineTo(na,na),c.lineTo(na,0)),("fold"==ha||"default"==ha&&"fold"==A)&&$a&&ib&&(c.moveTo(p-na,0),c.lineTo(p-na,na),c.lineTo(p,na)),("fold"==K||"default"==K&&"fold"==A)&&db&&ib&&(c.moveTo(p-na,v),c.lineTo(p-na,v-na),c.lineTo(p,v-na)),("fold"==xa||"default"==xa&&"fold"==A)&&db&&Ga&&(c.moveTo(0,v-na),c.lineTo(na,v-na),c.lineTo(na,v))};mxCellRenderer.registerShape(Ea.prototype.cst.RECT2,Ea); | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var P=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){P.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){K.apply(this, | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function makeDestination (next) {
return function () {
log.silly('move', 'make sure destination parent exists', path.resolve(to, '..'))
mkdirp(path.resolve(to, '..'), iferr(done, moveNodeModules(next)))
}
} | 1 | JavaScript | CWE-732 | Incorrect Permission Assignment for Critical Resource | The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. | https://cwe.mitre.org/data/definitions/732.html | safe |
n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var D=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(D,G)},z);P&&t.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
focus:function(){k.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,k,m,q,v){v=null!=v?v:[];k&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=e&&e!=mxConstants.NONE&&v.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),q&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&
this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,q,v,x,A,z){A=this.createUrlParameters(c,e,g,k,m,q,A);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),x||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&& | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(x){4==x.readyState&&(this.spinner.stop(),200<=x.status&&299>=x.status?q(x.responseText):this.handleError({message:mxResources.get(413==x.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this, | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function cleanup() {
clean('.');
clean('async-execute');
} | 0 | JavaScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
onIgnoreTagAttr(tag, name, value) {
const forTag = allowList.attrList[tag];
if (forTag) {
const forAttr = forTag[name];
if (
(forAttr &&
(forAttr.indexOf("*") !== -1 || forAttr.indexOf(value) !== -1)) ||
(name.indexOf("data-html-") === -1 &&
name.indexOf("data-") === 0 &&
forTag["data-*"]) ||
(tag === "a" &&
name === "href" &&
hrefAllowed(value, extraHrefMatchers)) ||
(tag === "img" &&
name === "src" &&
(/^data:image.*$/i.test(value) ||
hrefAllowed(value, extraHrefMatchers))) ||
(tag === "iframe" &&
name === "src" &&
allowedIframes.some((i) => {
return value.toLowerCase().indexOf((i || "").toLowerCase()) === 0;
}))
) {
return attr(name, value);
}
if (tag === "iframe" && name === "src") {
return "-STRIP-";
}
if (tag === "video" && name === "autoplay") {
// This might give us duplicate 'muted' attributes
// but they will be deduped by later processing
return "autoplay muted";
}
// Heading ids must begin with `heading--`
if (
["h1", "h2", "h3", "h4", "h5", "h6"].indexOf(tag) !== -1 &&
value.match(/^heading\-\-[a-zA-Z0-9\-\_]+$/)
) {
return attr(name, value);
}
const custom = allowLister.getCustom();
for (let i = 0; i < custom.length; i++) {
const fn = custom[i];
if (fn(tag, name, value)) {
return attr(name, value);
}
}
}
}, | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';function n(e) {throw e;}var q=void 0,aa=this;function r(e,c) {var d=e.split("."),b=aa;!(d[0]in b)&&b.execScript&&b.execScript("var "+d[0]);for(var a;d.length&&(a=d.shift());)!d.length&&c!==q?b[a]=c:b=b[a]?b[a]:b[a]={}};var u="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;new (u?Uint8Array:Array)(256);var v;for(v=0;256>v;++v)for(var w=v,ba=7,w=w>>>1;w;w>>>=1)--ba;function x(e,c,d) {var b,a="number"===typeof c?c:c=0,f="number"===typeof d?d:e.length;b=-1;for(a=f&7;a--;++c)b=b>>>8^z[(b^e[c])&255];for(a=f>>3;a--;c+=8)b=b>>>8^z[(b^e[c])&255],b=b>>>8^z[(b^e[c+1])&255],b=b>>>8^z[(b^e[c+2])&255],b=b>>>8^z[(b^e[c+3])&255],b=b>>>8^z[(b^e[c+4])&255],b=b>>>8^z[(b^e[c+5])&255],b=b>>>8^z[(b^e[c+6])&255],b=b>>>8^z[(b^e[c+7])&255];return(b^4294967295)>>>0} | 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
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"!= | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
util.parseUrl = function(str) {
// FIXME: this regex looks a bit broken
var regex = /^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;
regex.lastIndex = 0;
var m = regex.exec(str);
var url = (m === null) ? null : {
full: str,
scheme: m[1],
host: m[2],
port: m[3],
path: m[4]
};
if(url) {
url.fullHost = url.host;
if(url.port) {
if(url.port !== 80 && url.scheme === 'http') {
url.fullHost += ':' + url.port;
} else if(url.port !== 443 && url.scheme === 'https') {
url.fullHost += ':' + url.port;
}
} else if(url.scheme === 'http') {
url.port = 80;
} else if(url.scheme === 'https') {
url.port = 443;
}
url.full = url.scheme + '://' + url.fullHost;
}
return url;
}; | 0 | JavaScript | CWE-601 | URL Redirection to Untrusted Site ('Open Redirect') | A web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a Redirect. This simplifies phishing attacks. | https://cwe.mitre.org/data/definitions/601.html | vulnerable |
0,Wa,bb,$a);Na.pageSelector=!1;Na.mathEnabled=!1;ua.checked&&(Na.isCellVisible=function(Xa){return Ha.isCellSelected(Xa)});Wa=p.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var ib=Na.writeHead;Na.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"), | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
z.y,t.width/L,t.height/L,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var t=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";t=new TextareaDialog(c,"Paste Data:",t,function(z){if(0<z.length)try{var L=function(K){function F(J){if(null==E[J]){if(E[J]=!0,null!=V[J]){for(;0<V[J].length;){var T=V[J].pop();F(T)}delete V[J]}}else mxLog.debug(H+": Visited: "+J)}var H=K.parentNode.id,S=K.childNodes;K={}; | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
Graph.sanitizeHtml=function(b,e){return DOMPurify.sanitize(b,{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(b){return DOMPurify.sanitize(b,{IN_PLACE:!0})}; | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
port: fastify.server.address().port,
path: '/',
headers: form.getHeaders(),
method: 'POST'
}
const req = http.request(opts, (res) => {
t.equal(res.statusCode, 500)
res.resume()
res.on('end', () => {
t.pass('res ended successfully')
})
})
form.append('myField', 'hello')
form.append('constructor', 'world')
pump(form, req, function (err) {
t.error(err, 'client pump: no err')
})
})
}) | 1 | JavaScript | CWE-1321 | Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') | The software receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. | https://cwe.mitre.org/data/definitions/1321.html | safe |
return false}return this.getDialog().fakeObj?true:CKEDITOR.dialog.validate.notEmpty(b.noUrl).apply(this)},setup:function(a){this.allowOnChange=false;a.url&&this.setValue(a.url.url);this.allowOnChange=true},commit:function(a){this.onChange();if(!a.url)a.url={};a.url.url=this.getValue();this.allowOnChange=false}}],setup:function(){this.getDialog().getContentElement("info","linkType")||this.getElement().show()}},{type:"button",id:"browse",hidden:"true",filebrowser:"info:url",label:i.browseServer}]}, | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
mxConstants.DIRECTION_NORTH);da.intraCellSpacing=W;da.parallelEdgeSpacing=M;da.interRankCellSpacing=U;da.disableEdgeStyle=!1;this.executeLayout(function(){da.execute(A.getDefaultParent(),ta);A.moveCells(ta,K,T)},!0,u);u=null}else if("organic"==Q||"auto"==Q&&ta.length>q.length){A.view.validate();var ca=new mxFastOrganicLayout(A);ca.forceConstant=3*W;ca.disableEdgeStyle=!1;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(ia){return la.apply(this,arguments)||0>mxUtils.indexOf(q,
ia)};this.executeLayout(function(){ca.execute(A.getDefaultParent());ya()},!0,u);u=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=u&&u()}}catch(ia){this.handleError(ia)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d= | 1 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
k.scrollHeight-k.offsetHeight&&E()},mxEvent.addListener(k,"scroll",B))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var t=mxUtils.bind(this,function(z){var L=this.ui.spinner,C=0;this.ui.spinner.stop();var E=function(){L.spin(k,mxResources.get("loading"));C+=1},G=function(){--C;0===C&&L.stop()};null==z&&(k.innerHTML="",z=1);null!=B&&(mxEvent.removeListener(k,"scroll",B),B=null);null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A);A=document.createElement("a"); | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
setup: function () {
var data = this.model.get('data') || {};
this.userId = data.userId;
this.messageData['entityType'] = Espo.Utils.upperCaseFirst((this.translate(data.entityType, 'scopeNames') || '').toLowerCase());
this.messageData['entity'] = '<a href="#' + this.getHelper().escapeString(data.entityType) + '/view/' + this.getHelper().escapeString(data.entityId) + '">' + this.getHelper().escapeString(data.entityName) + '</a>';
this.createMessage();
}, | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
warning: (msg) => msgs.push(msg),
};
// eslint-disable-next-line @typescript-eslint/no-floating-promises
t.throwsAsync(async () => util.getGitHubAuth(mockLogger, "abc", true));
process.env.GITHUB_TOKEN = "123";
t.is("123", await util.getGitHubAuth(mockLogger, undefined, undefined));
t.is(msgs.length, 0);
t.is("abc", await util.getGitHubAuth(mockLogger, "abc", undefined));
t.is(msgs.length, 1); // warning expected
msgs.length = 0;
await mockStdInForAuth(t, mockLogger, "def", "def");
await mockStdInForAuth(t, mockLogger, "def", "", "def");
await mockStdInForAuth(t, mockLogger, "def", "def\n some extra garbage", "ghi");
await mockStdInForAuth(t, mockLogger, "defghi", "def", "ghi\n123");
await mockStdInForAuthExpectError(t, mockLogger, "");
await mockStdInForAuthExpectError(t, mockLogger, "", " ", "abc");
await mockStdInForAuthExpectError(t, mockLogger, " def\n some extra garbage", "ghi");
t.is(msgs.length, 0);
}); | 1 | JavaScript | CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. | https://cwe.mitre.org/data/definitions/200.html | safe |
"dblclick",function(La){n();mxEvent.consume(La)})}else if(!ja&&null!=pa&&0<pa.length){var Na=function(La){U.setAttribute("disabled","disabled");na.style.backgroundColor="transparent";na.style.border="1px solid transparent";S.spin(Z);ma(pa,function(Ta,Ua){S.stop();null!=Ta&&(y(na,Ta,sa,null,null,ia,Ua),La&&n())})};ra=ba||TEMPLATE_PATH+"/"+pa.substring(0,pa.length-4)+".png";na.style.backgroundImage="url("+ra+")";na.style.backgroundPosition="center center";na.style.backgroundRepeat="no-repeat";if(null!= | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
this.exec = function(cmd, files, opts, dstHash) {
if (cmd === 'open') {
if (this.searchStatus.state || this.searchStatus.ininc) {
this.trigger('searchend', { noupdate: true });
}
this.autoSync('stop');
}
return this._commands[cmd] && this.isCommandEnabled(cmd, dstHash)
? this._commands[cmd].exec(files, opts)
: $.Deferred().reject('No such command');
}; | 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
this.root = function(hash) {
var dir = files[hash || cwd], i;
while (dir && dir.phash) {
dir = files[dir.phash]
}
if (dir) {
return dir.hash;
}
$.each(self.roots, function(id, rhash) {
if (rhash.indexOf(id) === 0) {
dir = rhash;
return false;
}
});
if (dir) {
return dir;
}
while (i in files && files.hasOwnProperty(i)) {
dir = files[i]
if (!dir.phash && !dir.mime == 'directory' && dir.read) {
return dir.hash;
}
}
return '';
} | 0 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | vulnerable |
w.toHTML = function (name, field) {
var f = field || {};
var choices = unifyChoices(f.choices, 1);
var optionsHTML = renderChoices(choices, function render(choice) {
if (choice.isNested) {
return tag('optgroup', { label: choice.label }, renderChoices(choice.choices, render), true);
} else {
return tag('option', { value: choice.value, selected: !!isSelected(f.value, choice.value) }, choice.label);
}
});
var attrs = {
name: name,
id: f.id === false ? false : (f.id || true),
classes: w.classes
};
if (isMultiple) {
attrs.multiple = true;
}
return tag('select', [attrs, userAttrs, w.attrs || {}], optionsHTML, true);
};
return w;
};
}; | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
date : function(file1, file2) {
var date1 = file1.ts || file1.date,
date2 = file2.ts || file2.date;
return date1 == date2 ? 0 : date1 > date2 ? 1 : -1
} | 0 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | vulnerable |
for(var J=0;J<X.length;J++)if("label"!=X[J].nodeName){var T=mxUtils.trim(X[J].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(E&&0<=T.indexOf(u)||!E&&T.substring(0,u.length)===u)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&L.value?(S.removeAttribute("disabled"),V.removeAttribute("disabled")):(S.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"));L.value&&z.value?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")}function g(U, | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
j,p;a.framesetHtml=function(b){return'<iframe src="'+a.templatePath+'" id='+a.iframeNumber+"_"+b+' frameborder="0" allowtransparency="1" style="width:100%;border: 1px solid #AEB3B9;overflow: auto;background:#fff; border-radius: 3px;"></iframe>'};a.setIframe=function(b,c){var d=a.framesetHtml(c);return b.getElement().setHtml(d)};a.setCurrentIframe=function(b){a.setIframe(a.dialog._.contents[b].Content,b)};a.setHeightBannerFrame=function(){var b=a.dialog.getContentElement("SpellTab","banner").getElement(), | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
function pa(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Fa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function za(){mxActor.call(this)}function wa(){mxActor.call(this)}function Ea(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize= | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
function onError(err) {
if (this === client) {
assert(!cliError, makeMsg('Unexpected multiple client errors'));
cliError = err;
} else {
assert(!srvError, makeMsg('Unexpected multiple server errors'));
srvError = err;
}
assert.strictEqual(err.level, 'handshake');
assert(/handshake failed/i.test(err.message),
makeMsg('Wrong error message'));
} | 0 | JavaScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
function(t){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var A=function(t,z,L,C,D){t=Math.round(t);z=Math.round(z);L=Math.round(L);C=Math.round(C);x.beginPath();x.moveTo(t+.5,z+.5);x.lineTo(L+.5,C+.5);x.stroke();D&&(f?(x.save(),x.translate(t,z),
x.rotate(-Math.PI/2),x.fillText(D,0,0),x.restore()):x.fillText(D,t,z))},B=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var t=y.view.scale,z=y.view.getBackgroundPageBounds(),L=y.view.translate,C=y.pageVisible;L=C?g+(f?z.y-y.container.scrollTop:z.x-y.container.scrollLeft):g+(f?L.y*t-y.container.scrollTop:L.x*t-y.container.scrollLeft);var D=0;C&&(D=y.getPageLayout(),D=f?D.y*y.pageFormat.height: | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
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), | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
main.navigateGetParams = function () {
const parts = decodeURI(window.location.hash).split('/');
return parts[2] ? decodeURIComponent(parts[2]) : null;
}; | 1 | JavaScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. | https://cwe.mitre.org/data/definitions/22.html | safe |
function checkeditusername() {
var username=$('#edituser input[name=user]').val();
var rusername=$('#edituser input[name=ruser]').val();
var password=$('#edituser input[name=password]').val();
if(username=="" || password=="") {
toastr.error('You must enter a username and a password');
if(password=="") {
edituser.password.focus();
}
if(username=="") {
edituser.user.focus();
}
} else if(alphanumeric(username)==false || alphanumeric(password)==false) {
if(alphanumeric(username)==false) {
toastr.error('Username contains invalid characters');
newuser.user.focus();
} else if(alphanumeric(password)==false) {
toastr.error('Password contains invalid characters');
newuser.password.focus();
}
} else {
if(username!=rusername) {
jQuery.ajax({
type: 'post',
url: 'functions/ajaxhelper.php',
data: 'function=1&username='+username,
cache: false,
success: function(response) {
if(response==1) {
toastr.error('Username already exists');
edituser.user.focus();
} else {
$('#edituser').trigger('submit', true);
}
}
});
} else {
$('#edituser').trigger('submit', true);
}
}
} | 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
'labels': currentLabels.join(',')
})
}; | 1 | JavaScript | CWE-200 | Exposure of Sensitive Information to an Unauthorized Actor | The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. | https://cwe.mitre.org/data/definitions/200.html | safe |
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)");
null==ca.setAttributeNS||L.ownerDocument!=document&&null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);
M.appendChild(T);ca.appendChild(z);M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var ca=z[T].getAttribute("href");null==ca&&(ca=z[T].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[T].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z); | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,g,k,l){var p=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":p,"text/html":new Blob(['<img src="'+d+'" width="'+g+'" height="'+k+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,g){var k=this.editor.graph;if(k.isSelectionEmpty())d.innerHTML="";else{var l= | 0 | JavaScript | CWE-94 | Improper Control of Generation of Code ('Code Injection') | The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. | https://cwe.mitre.org/data/definitions/94.html | vulnerable |
b&&b(a)===false?null:e&&e!=a.type?a.getNextSourceNode(false,e,b):a},getPreviousSourceNode:function(a,e,b){if(b&&!b.call)var c=b,b=function(a){return!a.equals(c)};var a=!a&&this.getLast&&this.getLast(),d;if(!a){if(this.type==CKEDITOR.NODE_ELEMENT&&b&&b(this,true)===false)return null;a=this.getPrevious()}for(;!a&&(d=(d||this).getParent());){if(b&&b(d,true)===false)return null;a=d.getPrevious()}return!a||b&&b(a)===false?null:e&&a.type!=e?a.getPreviousSourceNode(false,e,b):a},getPrevious:function(a){var e= | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
K.substring(0,17)&&(N[R].setAttribute("href",this.updateCustomLink(u,K)),Q=!0);Q&&this.labelChanged(D,T.innerHTML)}};Graph.prototype.updateCustomLink=function(u,D){if("data:action/json,"==D.substring(0,17))try{var K=JSON.parse(D.substring(17));null!=K.actions&&(this.updateCustomLinkActions(u,K.actions),D="data:action/json,"+JSON.stringify(K))}catch(T){}return D};Graph.prototype.updateCustomLinkActions=function(u,D){for(var K=0;K<D.length;K++){var T=D[K],N;for(N in T)this.updateCustomLinkAction(u, | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
setup: function () {
var data = this.model.get('data') || {};
this.userId = data.userId;
this.messageData['entityType'] = this.getHelper().escapeString((this.translate(data.entityType, 'scopeNames') || '').toLowerCase());
this.messageData['user'] = '<a href="#User/view/' + this.getHelper().escapeString(data.userId) + '">' + this.getHelper().escapeString(data.userName) + '</a>';
this.messageData['entity'] = '<a href="#'+this.getHelper().escapeString(data.entityType)+'/view/' + this.getHelper().escapeString(data.entityId) + '">' + this.getHelper().escapeString(data.entityName) + '</a>';
this.createMessage();
} | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
"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,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n, | 1 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
renderer:"foundation"});a.ext.renderer.pageButton.foundation=function(b,j,q,r,g,k) {var l=new a.Api(b),s=b.oClasses,h=b.oLanguage.oPaginate,t=b.oLanguage.oAria.paginate||{},e,f,p=function(a,m) {var i,n,o,c,j=function(a) {a.preventDefault();!d(a.currentTarget).hasClass("unavailable")&&l.page()!=a.data.action&&l.page(a.data.action).draw("page")};i=0;for(n=m.length;i<n;i++)if (c=m[i],d.isArray(c))p(a,c);else{f=e="";switch(c) {case "ellipsis":e="…";f="unavailable";break;case "first":e=h.sFirst;f=c+
(0<g?"":" unavailable");break;case "previous":e=h.sPrevious;f=c+(0<g?"":" unavailable");break;case "next":e=h.sNext;f=c+(g<k-1?"":" unavailable");break;case "last":e=h.sLast;f=c+(g<k-1?"":" unavailable");break;default:e=c+1,f=g===c?"current":""}e&&(o=d("<li>",{"class":s.sPageButton+" "+f,"aria-controls":b.sTableId,"aria-label":t[c],tabindex:b.iTabIndex,id:0===q&&"string"===typeof c?b.sTableId+"_"+c:null}).append(d("<a>",{href:"#"}).html(e)).appendTo(a),b.oApi._fnBindAction(o,{action:c},j))}};p(d(j).empty().html('<ul class="pagination"/>').children("ul"), | 1 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(E){null!=E&&null!=E.originalSrc&&(E=d.createImageForPageLink(E.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched", | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
function(O){O=da.apply(this,arguments);var X=this.editorUi,ea=X.editor.graph;if(ea.isEnabled()&&"1"==urlParams.sketch){var ka=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ja,U){X.setSketchMode(!Editor.sketchMode);null!=U&&mxEvent.isShiftDown(U)||ea.updateCellStyles({sketch:ja?"1":null},ea.getVerticesAndEdges())},{install:function(ja){this.listener=function(){ja(Editor.sketchMode)};X.addListener("sketchModeChanged",this.listener)},destroy:function(){X.removeListener(this.listener)}});
O.appendChild(ka)}return O};var ba=Menus.prototype.init;Menus.prototype.init=function(){ba.apply(this,arguments);var O=this.editorUi,X=O.editor.graph;O.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";O.actions.get("createShape").label=mxResources.get("shape")+"...";O.actions.get("outline").label=mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("layers")+"...";O.actions.get("tags").label=mxResources.get("tags")+"...";O.actions.get("forkme").visible= | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
Ra=document.createElement("div");Ra.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Ma,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Ra,Ia?Ia.replace(".drawio.xml","").replace(".drawio","").replace(".xml",""):"");Qa.src=Ia;Ra.appendChild(Qa);Pa.appendChild(Ra); | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
(ua.appendChild(Z),ua.appendChild(ea),da.appendChild(ua));return{div:da,refresh:aa}};Graph.prototype.getCustomFonts=function(){var p=this.extFonts;p=null!=p?p.slice():[];for(var C in Graph.customFontElements){var I=Graph.customFontElements[C];p.push({name:I.name,url:I.url})}return p};Graph.prototype.setFont=function(p,C){Graph.addFont(p,C);document.execCommand("fontname",!1,p);if(null!=C){var I=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(p,C);for(var T=0;T<I.length;T++)I[T].getAttribute("face")== | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
sock: new Socket()
},
{ hostKeys: [HOST_KEY_RSA] }
);
server.on('connection', mustCall((conn) => {
conn.on('authentication', mustCall((ctx) => {
ctx.accept();
})).on('ready', mustCall(() => {}));
}));
client.on('ready', mustCall(() => {
client.end();
}));
}), | 1 | JavaScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function drainBuffer() {
this._chunkcb = undefined;
const buffer = this._buffer;
let i = 0;
while (i < buffer.length) {
const payload = buffer[i];
const ret = tryWritePayload(this, payload);
if (ret !== undefined) {
if (ret !== payload)
buffer[i] = ret;
if (i > 0)
this._buffer = buffer.slice(i);
return;
}
++i;
}
if (i > 0)
this._buffer = [];
} | 1 | JavaScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,E,J){function T(){for(var ja=R.getSelectionCells(),Ba=[],Ha=0;Ha<ja.length;Ha++)R.isCellVisible(ja[Ha])&&Ba.push(ja[Ha]);R.setSelectionCells(Ba)}function N(ja){R.hiddenTags=ja?[]:Y.slice();T();R.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Ha=document.createElement("table"); | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
g="fixed"==e.getComputedStyle("position");CKEDITOR.env.ie&&e.setStyle("zoom","100%");if(!g||!this._.position||!(this._.position.x==a&&this._.position.y==b))this._.position={x:a,y:b},g||(g=CKEDITOR.document.getWindow().getScrollPosition(),a+=g.x,b+=g.y),d&&(g=this.getSize(),a=CKEDITOR.document.getWindow().getViewPaneSize().width-g.width-a),b={top:(0<b?b:0)+"px"},b[d?"right":"left"]=(0<a?a:0)+"px",e.setStyles(b),c&&(this._.moved=1)},getPosition:function(){return CKEDITOR.tools.extend({},this._.position)}, | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
u.nodeName&&(T=u.getElementsByTagName("diagram"),0<T.length&&(N=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=N&&(u=Editor.parseDiagramNode(N,J)));null==u||"mxGraphModel"==u.nodeName||E&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,E){var J=mxUtils.trim(mxUtils.getTextContent(u)),T=null;0<J.length?(u=Graph.decompress(J,null,E),null!=u&&0<u.length&&(T=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(T=mxUtils.createXmlDocument(),
T.appendChild(T.importNode(u[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(u){var E=mxUtils.getTextContent(u),J=null;0<E.length?J=Graph.decompress(E):null!=u.firstChild&&(J=mxUtils.getXml(u.firstChild));return J};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var E=u.indexOf("EmbeddedFile");if(-1<E){var J=u.indexOf("stream",E)+9;if(0<u.substring(E,J).indexOf("application#2Fvnd.jgraph.mxfile"))return E= | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
Editor.createRoughCanvas=function(u){var E=rough.canvas({getContext:function(){return u}});E.draw=function(J){var T=J.sets||[];J=J.options||this.getDefaultOptions();for(var N=0;N<T.length;N++){var Q=T[N];switch(Q.type){case "path":null!=J.stroke&&this._drawToContext(u,Q,J);break;case "fillPath":this._drawToContext(u,Q,J);break;case "fillSketch":this.fillSketch(u,Q,J)}}};E.fillSketch=function(J,T,N){var Q=u.state.strokeColor,R=u.state.strokeWidth,Y=u.state.strokeAlpha,ba=u.state.dashed,ea=N.fillWeight;
0>ea&&(ea=N.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(N.fill||"");u.setStrokeWidth(ea);u.setDashed(!1);this._drawToContext(J,T,N);u.setDashed(ba);u.setStrokeWidth(R);u.setStrokeColor(Q);u.setStrokeAlpha(Y)};E._drawToContext=function(J,T,N){J.begin();for(var Q=0;Q<T.ops.length;Q++){var R=T.ops[Q],Y=R.data;switch(R.op){case "move":J.moveTo(Y[0],Y[1]);break;case "bcurveTo":J.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":J.lineTo(Y[0],Y[1])}}J.end();"fillPath"=== | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function(){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)))),E=mxUtils.parseXml(C).getElementsByTagName("svg");0<E.length&&(O=parseFloat(E[0].getAttribute("width")),t=parseFloat(E[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(); | 1 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
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/' + this.getHelper().escapeString(data.emailId) + '">' + this.getHelper().escapeString(data.emailName) + '</a>';
this.messageName = 'emailSent';
this.messageData['by'] = '<a href="#'+this.getHelper().escapeString(data.personEntityType)+'/view/' + this.getHelper().escapeString(data.personEntityId) + '">' + this.getHelper().escapeString(data.personEntityName) + '</a>';
if (this.isThis) {
this.messageName += 'This';
}
this.createMessage();
}, | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
Ka=U.actions.get("zoomOut"),bb=U.actions.get("resetView");u=U.actions.get("fullscreen");var Pa=U.actions.get("undo"),Za=U.actions.get("redo"),z=X("",Pa.funct,null,mxResources.get("undo")+" ("+Pa.shortcut+")",Pa,Editor.undoImage),L=X("",Za.funct,null,mxResources.get("redo")+" ("+Za.shortcut+")",Za,Editor.redoImage),M=X("",u.funct,null,mxResources.get("fullscreen"),u,Editor.fullscreenImage);if(null!=W){J=function(){ma.style.display=null!=U.pages&&("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?
"inline-block":"none"};bb=function(){ma.innerHTML="";if(null!=U.currentPage){mxUtils.write(ma,U.currentPage.getName());var za=null!=U.pages?U.pages.length:1,wa=U.getPageIndex(U.currentPage);wa=null!=wa?wa+1:1;var Ea=U.currentPage.getId();ma.setAttribute("title",U.currentPage.getName()+" ("+wa+"/"+za+")"+(null!=Ea?" ["+Ea+"]":""))}};M.parentNode.removeChild(M);var T=U.actions.get("delete"),ca=X("",T.funct,null,mxResources.get("delete"),T,Editor.trashImage);ca.style.opacity="0.1";P.appendChild(ca); | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)} | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,q-3)+"px";m.style.height=Math.max(0,k-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),k=new mxGraphModel;g.decode(e,k);e=k.getChildAt(k.getRoot(),0);for(g=0;g<k.getChildCount(e);g++)c.push(k.getChildAt(e,
g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,k,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var q=mxUtils.bind(this,function(x){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==x.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename, | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
!0,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))}; | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
this.restoreSize = function() {
this.resize(width, height);
} | 0 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | vulnerable |
function makeMsg(what, msg) {
if (msg === undefined)
msg = what;
if (tests[t])
what = tests[t].what;
else
what = '<Unknown>';
return '[' + group + what + ']: ' + msg;
} | 0 | JavaScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var t=b.diagramContainer;p.style.top=t.offsetTop-g+"px";p.style.left=t.offsetLeft-g+"px";p.style.width=(f?0:t.offsetWidth)+g+"px";p.style.height=(f?t.offsetHeight:0)+g+"px"}function n(t,z,L){if(null!=v)return t;var C;return function(){var E=this,G=arguments,P=L&&!C;clearTimeout(C);C=setTimeout(function(){C=null;L||t.apply(E,G)},z);P&&t.apply(E,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame, | 1 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
keyEvent: function( event ) {
// The escape key closes the preview
if ( event.keyCode === 27 ) {
this.undelegateEvents();
this.close();
}
// The right arrow key, next theme
if ( event.keyCode === 39 ) {
_.once( this.nextTheme() );
}
// The left arrow key, previous theme
if ( event.keyCode === 37 ) {
this.previousTheme();
}
}, | 1 | JavaScript | CWE-352 | Cross-Site Request Forgery (CSRF) | The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request. | https://cwe.mitre.org/data/definitions/352.html | safe |
return na}function B(){function pa(oa,na){var Ja=mxResources.get(oa);null==Ja&&(Ja=oa.substring(0,1).toUpperCase()+oa.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"…");return Ja+" ("+na.length+")"}function sa(oa,na,Ja){mxEvent.addListener(na,"click",function(){Ea!=na&&(Ea.style.backgroundColor="",Ea=na,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ja?Ba[oa][Ja]:Da[oa],W=null,M(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(oa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&& | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
const isDisallowedIP = (ipAddress) => ipaddr.parse(ipAddress).range() !== 'unicast'
module.exports.FORBIDDEN_IP_ADDRESS = FORBIDDEN_IP_ADDRESS | 1 | JavaScript | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | safe |
CKEDITOR.NODE_ELEMENT&&(b=b.getParent());b=b&&b.hasAttribute("data-cke-temp");return!!(a^b)}};var g=/^[\t\r\n ]*(?: |\xa0)$/,h=CKEDITOR.dom.walker.whitespaces(),m=CKEDITOR.dom.walker.bookmark(),j=CKEDITOR.dom.walker.temp();CKEDITOR.dom.walker.ignored=function(a){return function(b){b=h(b)||m(b)||j(b);return!!(a^b)}};var i=CKEDITOR.dom.walker.ignored(),n=function(a){var b={},c;for(c in a)CKEDITOR.dtd[c]["#"]&&(b[c]=1);return b}(CKEDITOR.dtd.$block);CKEDITOR.dom.walker.editable=function(a){return function(c){return!!(a^ | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
SessionStore.prototype.set = function(sid, sess, fn) {
messageLogger.debug('SET ' + sid);
// don't store passwords in DB
if (sess.user && sess.user.password) {
sess.user.password = "PASSWORD_HIDDEN";
}
db.set("sessionstorage:" + sid, sess);
if (fn) {
process.nextTick(fn);
}
}; | 1 | JavaScript | CWE-312 | Cleartext Storage of Sensitive Information | The application stores sensitive information in cleartext within a resource that might be accessible to another control sphere. | https://cwe.mitre.org/data/definitions/312.html | safe |
labels: templateInstance.topTasks.get().map((task) => task._id),
datasets: [{
values: templateInstance.topTasks.get().map((task) => task.count),
}],
},
tooltipOptions: {
},
})
}
})
})
}
}
}) | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
mxUtils.bind(this,function(E,G){E=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=E){var P=E.indexOf(",");if(0<P)for(E=E.substring(P+1),G=G.getProperty("patches"),P=0;P<G.length;P++)if(null!=G[P][EditorUi.DIFF_UPDATE]&&null!=G[P][EditorUi.DIFF_UPDATE][E]||null!=G[P][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[P][EditorUi.DIFF_REMOVE],E)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(E,G){var P=q.apply(this,arguments);
if(null!=P&&null!=P.originalSrc)if(!G)P={src:P.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var J=this.stylesheet,F=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";P=d.createImageForPageLink(P.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=F;this.stylesheet=J}return P};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.apply(this, | 1 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
function(O){O=da.apply(this,arguments);var X=this.editorUi,ea=X.editor.graph;if(ea.isEnabled()&&"1"==urlParams.sketch){var ka=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ja,U){X.setSketchMode(!Editor.sketchMode);null!=U&&mxEvent.isShiftDown(U)||ea.updateCellStyles({sketch:ja?"1":null},ea.getVerticesAndEdges())},{install:function(ja){this.listener=function(){ja(Editor.sketchMode)};X.addListener("sketchModeChanged",this.listener)},destroy:function(){X.removeListener(this.listener)}});
O.appendChild(ka)}return O};var ba=Menus.prototype.init;Menus.prototype.init=function(){ba.apply(this,arguments);var O=this.editorUi,X=O.editor.graph;O.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";O.actions.get("createShape").label=mxResources.get("shape")+"...";O.actions.get("outline").label=mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("layers")+"...";O.actions.get("tags").label=mxResources.get("tags")+"...";O.actions.get("forkme").visible= | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
NyanCat.prototype.generateColors = function(){
var colors = [];
for (var i = 0; i < (6 * 7); i++) {
var pi3 = Math.floor(Math.PI / 3);
var n = (i * (1.0 / 6));
var r = Math.floor(3 * Math.sin(n) + 3);
var g = Math.floor(3 * Math.sin(n + 2 * pi3) + 3);
var b = Math.floor(3 * Math.sin(n + 4 * pi3) + 3);
colors.push(36 * r + 6 * g + b + 16);
}
return colors;
}; | 0 | JavaScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | vulnerable |
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)} | 0 | JavaScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
text: antSword.noxss(conf[_]['type'].toUpperCase()),
im0: this.manager.list.imgs[0],
im1: this.manager.list.imgs[0],
im2: this.manager.list.imgs[0]
});
} | 1 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
E=J}return E};Graph.prototype.getCellsById=function(u){var E=[];if(null!=u)for(var J=0;J<u.length;J++)if("*"==u[J]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[J]);null!=N&&E.push(N)}return E};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length|| | 0 | JavaScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.