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 |
---|---|---|---|---|---|---|---|
function Base(runner) {
var self = this
, stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 }
, failures = this.failures = [];
if (!runner) return;
this.runner = runner;
runner.stats = stats;
runner.on('start', function(){
stats.start = new Date;
});
runner.on('suite', function(suite){
stats.suites = stats.suites || 0;
suite.root || stats.suites++;
});
runner.on('test end', function(test){
stats.tests = stats.tests || 0;
stats.tests++;
});
runner.on('pass', function(test){
stats.passes = stats.passes || 0;
var medium = test.slow() / 2;
test.speed = test.duration > test.slow()
? 'slow'
: test.duration > medium
? 'medium'
: 'fast';
stats.passes++;
});
runner.on('fail', function(test, err){
stats.failures = stats.failures || 0;
stats.failures++;
test.err = err;
failures.push(test);
});
runner.on('end', function(){
stats.end = new Date;
stats.duration = new Date - stats.start;
});
runner.on('pending', function(){
stats.pending++;
});
} | 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 |
showDetailedConfig: function (grid, rowIndex) {
var data = grid.getStore().getAt(rowIndex);
var type = data.data.type;
var definition = data.data.definition;
if (definition) {
definition = Ext.util.JSON.decode(definition);
definition.name = Ext.util.Format.htmlEncode(data.data.name);
} else {
definition = {
name: data.data.name
};
}
definition.fieldtype = type;
var keyDefinitionWindow = new pimcore.object.classificationstore.keyDefinitionWindow(
definition, data.id, this);
keyDefinitionWindow.show();
}, | 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)}}); | 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 |
data : {cmd : 'tmb', current : fm.cwd().hash},
preventFail : true
})
.done(function(data) {
if (attachThumbnails(data.images||[]) && data.tmb) {
loadThumbnails();
}
});
return;
}
tmbs = tmbs = files.splice(0, tmbNum);
if (tmbs.length) {
fm.request({
data : {cmd : 'tmb', targets : tmbs},
preventFail : true
})
.done(function(data) {
if (attachThumbnails(data.images||[])) {
loadThumbnails(files);
}
});
}
}, | 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 |
Graph.sanitizeHtml=function(a,c){return DOMPurify.sanitize(a,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(a){return DOMPurify.sanitize(a,{IN_PLACE:!0})}; | 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 restoreOldNodeModules () {
if (!movedDestAway) return
return readdir(path.join(delpath, 'node_modules')).catch(() => []).then((modules) => {
if (!modules.length) return
return mkdirp(path.join(pkg.realpath, 'node_modules')).then(() => Bluebird.map(modules, (file) => {
const from = path.join(delpath, 'node_modules', file)
const to = path.join(pkg.realpath, 'node_modules', file)
return move(from, to, moveOpts)
}))
})
} | 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 |
fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}Q=null!=Q?Q:"data:image/png;base64,";fa=Q+Editor.base64Encode(fa)}E(fa)}}else null!=J&&(0==Z.getStatus()?J({message:mxResources.get("accessDenied")},Z):J({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=J&&J({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){N&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:ea})},Y)});ea()}catch(Z){null!=J&&J(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 |
b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(aa,va,function(ja){ea()},!0)}var fa=W().pdiv,aa=b.newComment(N,b.getCurrentUser());aa.pCommentId=K.id;null==K.replies&&(K.replies=[]);var va=q(aa,K.replies,fa,S+1);Q?Z():ea()}if(V||!K.isResolved){t.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",K.id);X.style.marginLeft=20*S+5+"px";K.isResolved&&!Editor.isDarkMode()&& | 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 |
!mxClient.IS_IE11)&&this.addMenuItems(Q,["toggleDarkMode"],W);Q.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(Q,W){B.menus.addMenuItems(Q,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var Q=this.get("insert"),W=Q.funct;Q.funct=function(V,X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(V,["insertTemplate"],X),B.menus.addMenuItems(V,["insertImage",
"insertLink","-"],X),B.menus.addSubmenu("insertLayout",V,X,mxResources.get("layout")),B.menus.addSubmenu("insertAdvanced",V,X,mxResources.get("advanced"))):(W.apply(this,arguments),B.menus.addSubmenu("table",V,X))}})();var S="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),U=function(Q,W,V,X){Q.addItem(V,null,mxUtils.bind(this,function(){var p=new CreateGraphDialog(B,V,X);B.showDialog(p.container,620,420,!0,!1);p.init()}),W)};this.put("insertLayout", | 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 |
Renderer.prototype.listitem = function(text) {
return '<li>' + text + '</li>\n';
}; | 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 |
isDirectory() {
return ((this.mode & constants.S_IFMT) === constants.S_IFDIR);
} | 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(J){l=J};this.setAutoScroll=function(J){p=J};this.setOpenFill=function(J){q=J};this.setStopClickEnabled=function(J){A=J};this.setSelectInserted=function(J){B=J};this.setSmoothing=function(J){f=J};this.setPerfectFreehandMode=function(J){O=J};this.setBrushSize=function(J){I.size=J};this.getBrushSize=function(){return I.size};var t=function(J){y=J;b.getRubberband().setEnabled(!J);b.graphHandler.setSelectEnabled(!J);b.graphHandler.setMoveEnabled(!J);b.container.style.cursor=J?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))}; | 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 |
set: function (arg) {
this._escape_for_html = arg;
}, | 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 |
var put = (module.exports.put = function put(object, path, value) {
if (typeof path === "string") {
path = path.split(".");
}
if (!(path instanceof Array) || path.length === 0) {
return false;
}
path = path.slice();
var key = "" + path.shift();
if (typeof object !== "object" || object === null || key === "__proto__") {
return false;
}
if (path.length === 0) {
object[key] = value;
} else {
if (typeof object[key] === "undefined") {
object[key] = {};
}
if (typeof object[key] !== "object" || object[key] === null) {
return false;
}
return put(object[key], path, value);
}
return true;
}); | 1 | JavaScript | CWE-843 | Access of Resource Using Incompatible Type ('Type Confusion') | The program allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. | https://cwe.mitre.org/data/definitions/843.html | safe |
const reject = () => {
if (reason === undefined) {
if (localChan === -1)
reason = CHANNEL_OPEN_FAILURE.RESOURCE_SHORTAGE;
else
reason = CHANNEL_OPEN_FAILURE.CONNECT_FAILED;
}
self._protocol.channelOpenFail(info.sender, reason, '');
}; | 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 |
"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 |
$("#fc_addPage_parent_page_id").val($(".page_tree_open_options").children("input[name=page_id]").val());$(".fc_side_add").click()});$("select[id=fc_addPage_template]").change(function(){var a={_cat_ajax:1,template:$("#fc_addPage_template").val()};$.ajax({type:"POST",url:CAT_ADMIN_URL+"/settings/ajax_get_template_variants.php",dataType:"json",data:a,cache:!1,success:function(a,c,e){!0===a.success?($(this),$("#fc_default_template_variant").empty(),0<$(a.variants).size()?($.each(a.variants,function(a,
b){$("<option/>").val(b).text(b).appendTo("#fc_default_template_variant")}),$("#fc_div_template_variants").show()):$("#fc_div_template_variants").hide(),!0===a.auto_add_modules?($("#fc_template_autoadd").prop("checked","checked"),$("#fc_div_template_autoadd").show()):$("#fc_div_template_autoadd").hide()):return_error(e.process,a.message)}})});$("#fc_add_page_close").click(function(a){a.preventDefault();$("button#fc_addPageReset").click()})});var dlg_title=cattranslate("Your session has expired!"),dlg_text=cattranslate("Please enter your login details to log in again."),txt_username=cattranslate("Username"),txt_password=cattranslate("Password"),txt_login=cattranslate("Login"),txt_details=cattranslate("Please enter your login details!"),sessionTimeoutDialog=!1; | 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 remove_cluster(ids) {
var data = {};
$.each(ids, function(_, cluster) {
data[ "clusterid-" + cluster] = true;
});
ajax_wrapper({
type: 'POST',
url: '/manage/removecluster',
data: data,
timeout: pcs_timeout,
success: function () {
$("#dialog_verify_remove_clusters.ui-dialog-content").each(function(key, item) {$(item).dialog("destroy")});
Pcs.update();
},
error: function (xhr, status, error) {
alert("Unable to remove cluster: " + res + " ("+error+")");
$("#dialog_verify_remove_clusters.ui-dialog-content").each(function(key, item) {$(item).dialog("destroy")});
}
});
} | 1 | JavaScript | CWE-384 | Session Fixation | Authenticating a user, or otherwise establishing a new user session, without invalidating any existing session identifier gives an attacker the opportunity to steal authenticated sessions. | https://cwe.mitre.org/data/definitions/384.html | safe |
function SetOrGet(input, field, def) {
if (field == '__proto__' || field == 'constructor' || field == 'prototype')
throw new Error('Restricted setting magical attributes')
return input[field] = Deffy(input[field], def);
} | 1 | JavaScript | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | safe |
ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ja.isResolved?"none":"",va=ia(ja).replies,Ba=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Ba;for(var Da=va[sa].querySelectorAll(".geCommentAction"),
Aa=0;Aa<Da.length;Aa++)Da[Aa]!=Z.parentNode&&(Da[Aa].style.display=na);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});ta.appendChild(u);null!=J?da.insertBefore(ta,J.nextSibling):da.appendChild(ta);for(J=0;null!=ja.replies&&J<ja.replies.length;J++)u=ja.replies[J],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,ta,H.saveCallback, | 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.startDrawing=function(){t(!0)};this.isDrawing=function(){return y};var z=mxUtils.bind(this,function(J){if(c){var F=d.length,H=A&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(J)}}),L=new mxCell;L.edge=!0;var C=function(){var J=b.getCurrentCellStyle(L);J=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(J,mxConstants.STYLE_STROKECOLOR,"#000"));"default"== | 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 |
$scope.refresh = function(requisition) {
RequisitionsService.startTiming();
RequisitionsService.updateDeployedStatsForRequisition(requisition).then(
function() { // success
growl.success('The deployed statistics for ' + requisition.foreignSource + ' has been updated.');
},
$scope.errorHandler
);
}; | 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){i.collapse(1);o.setEnd(i.endContainer.$,i.endOffset)}else throw u;}h.addRange(o)}}this.reset();this.root.fire("selectionchange")}}},fake:function(a){var b=this.root.editor;this.reset();j(b);var c=this._.cache,d=new CKEDITOR.dom.range(this.root);d.setStartBefore(a);d.setEndAfter(a);c.ranges=new CKEDITOR.dom.rangeList(d);c.selectedElement=c.startElement=a;c.type=CKEDITOR.SELECTION_ELEMENT;c.selectedText=c.nativeSel=null;this.isFake=1;this.rev=s++;b._.fakeSelection=this;this.root.fire("selectionchange")}, | 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 |
n.toDataURL();if(y.length<e.length){var K=document.createElement("canvas");K.width=L;K.height=M;var B=K.toDataURL();y!==B&&(e=y,x=L,A=M)}}}catch(F){}g(e,x,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode= | 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.face = function() {
var stats = this.stats;
if (stats.failures) {
return '( x .x)';
} else if (stats.pending) {
return '( o .o)';
} else if(stats.passes) {
return '( ^ .^)';
} else {
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 |
var filter = function(data) {
if (data) {
data = data.replace(new RegExp('<!--(.*?)-->', 'gsi'), '');
}
var parser = new DOMParser();
var d = parser.parseFromString(data, "text/html");
parse(d);
var span = document.createElement('span');
span.innerHTML = d.firstChild.innerHTML;
return span;
}
| 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 isNumberNaN(num) {
// eslint-disable-next-line no-self-compare
return num !== num;
}; | 1 | JavaScript | CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/74.html | safe |
async function download () {
return downloadURL(req.body.url, !debug, req.id)
} | 0 | JavaScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
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 |
verify: function(digest, d) {
// remove padding
d = _decodePkcs1_v1_5(d, key, true);
// d is ASN.1 BER-encoded DigestInfo
var obj = asn1.fromDer(d);
// compare the given digest to the decrypted one
return digest === obj.value[1].value;
} | 0 | JavaScript | CWE-347 | Improper Verification of Cryptographic Signature | The software does not verify, or incorrectly verifies, the cryptographic signature for data. | https://cwe.mitre.org/data/definitions/347.html | vulnerable |
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Za.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Za.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};za.prototype.getConstraints= | 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 |
getDetailAddressHtml: function (address) {
if (!address) {
return '';
}
var name = this.nameHash[address] || null;
var entityType = this.typeHash[address] || null;
var id = this.idHash[address] || null;
var addressHtml = '<span>' + address + '</span>';
if (name) {
name = this.getHelper().escapeString(name);
}
var lineHtml;
if (id) {
lineHtml = '<div>' + '<a href="#' + entityType + '/view/' + id + '">' + name + '</a> <span class="text-muted">»</span> ' + addressHtml + '</div>';
} else {
if (name) {
lineHtml = '<span>' + name + ' <span class="text-muted">»</span> ' + addressHtml + '</span>';
} else {
lineHtml = addressHtml;
}
}
if (!id) {
if (this.getAcl().check('Contact', 'edit')) {
lineHtml += From.prototype.getCreateHtml.call(this, address);
}
}
lineHtml = '<div>' + lineHtml + '</div>';
return lineHtml;
}, | 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 |
y.init()}else{var K=function(B){return{id:B.id,isExt:!0,url:B.downloadUrl,title:B.title,imgUrl:B.thumbnailLink,changedBy:B.lastModifyingUserName,lastModifiedOn:B.modifiedDate}};n=new TemplatesDialog(d,function(B,F,G){var N=G.libs,J=G.clibs;d.pickFolder(d.mode,function(E){d.createFile(F,B,null!=N&&0<N.length?N:null,null,function(){d.hideDialog()},null,E,null,null!=J&&0<J.length?J:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(B,F,G){var N=new Date;N.setDate(N.getDate()- | 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 listIdForThisLocale() {
var language = determineUserLanguage();
switch(language) {
case 'bg': return 'easylist_plus_bulgarian';
case 'cs': return 'czech';
case 'cu': return 'easylist_plus_bulgarian';
case 'da': return 'danish';
case 'de': return 'easylist_plus_german';
case 'el': return 'easylist_plus_greek';
case 'fi': return 'easylist_plus_finnish';
case 'fr': return 'easylist_plus_french';
case 'he': return 'israeli';
case 'hu': return 'hungarian';
case 'it': return 'italian';
case 'id': return 'easylist_plus_indonesian';
case 'ja': return 'japanese';
case 'ko': return 'easylist_plun_korean';
case 'lv': return 'latvian';
case 'nl': return 'dutch';
case 'no': return 'norwegian';
case 'pl': return 'easylist_plus_polish';
case 'ro': return 'easylist_plus_romanian';
case 'ru': return 'russian';
case 'sk': return 'czech';
case 'sv': return 'swedish';
case 'tr': return 'turkish';
case 'uk': return 'russian';
case 'zh': return 'chinese';
default: return '';
}
} | 0 | JavaScript | CWE-284 | Improper Access Control | The software does not restrict or incorrectly restricts access to a resource from an unauthorized actor. | https://cwe.mitre.org/data/definitions/284.html | vulnerable |
na.style.justifyContent="center";na.style.alignItems="center";ra=document.createElement("img");ra.setAttribute("src",wa);ra.setAttribute("alt",va);ra.style.maxWidth=Fa+"px";ra.style.maxHeight=xa+"px";Sa=ra;var Ha=wa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");na.appendChild(ra);ra.onerror=function(){this.src!=Ha?this.src=Ha:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(na,mxUtils.bind(this,function(La){y(na,null,null,pa,fa,ia)}),null,null);mxEvent.addListener(na, | 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 escapeHtml (string) {
const str = '' + string;
const match = matchHtmlRegExp.exec(str);
if (!match) {
return str;
}
let escape;
let html = '';
let index = 0;
let lastIndex = 0;
for (index = match.index; index < str.length; index++) {
switch (str.charCodeAt(index)) {
case 34: // "
escape = '"';
break;
case 38: // &
escape = '&';
break;
case 39: // '
escape = ''';
break;
case 60: // <
escape = '<';
break;
case 62: // >
escape = '>';
break;
default:
continue;
}
if (lastIndex !== index) {
html += str.substring(lastIndex, index);
}
lastIndex = index + 1;
html += escape;
}
return lastIndex !== index
? html + str.substring(lastIndex, index)
: html;
}
| 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 |
__create_table() {
if (this.table_title !== undefined) {
var label = document.createElement('label');
label.innerHTML = this.table_title;
this.container.appendChild(label);
}
this.form = document.createElement('form');
this.table = document.createElement('table');
this.table.classList.add("table", "table-bordered", "action-table");
if (this.classes !== undefined) {
for (var i in this.classes) {
this.table.classList.add(this.classes[i]);
}
}
this.thead = document.createElement('thead');
this.tbody = document.createElement('tbody');
var trHead = document.createElement('tr');
for (var col of this.header) {
var th = document.createElement('th');
th.innerHTML = col;
trHead.appendChild(th);
}
this.thead.appendChild(trHead);
this.__add_control_row();
for (var row of this.data) {
this.__add_row(row);
}
this.table.appendChild(this.thead);
this.table.appendChild(this.tbody);
this.form.appendChild(this.table);
this.container.appendChild(this.form);
} | 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(a){function e(h){var k,j=this,l=h.data||{};if(l.elem)j=h.dragTarget=l.elem,h.dragProxy=d.proxy||j,h.cursorOffsetX=l.pageX-l.left,h.cursorOffsetY=l.pageY-l.top,h.offsetX=h.pageX-h.cursorOffsetX,h.offsetY=h.pageY-h.cursorOffsetY;else if(d.dragging||l.which>0&&h.which!=l.which||a(h.target).is(l.not))return;switch(h.type){case"mousedown":return a.extend(l,a(j).offset(),{elem:j,target:h.target,pageX:h.pageX,pageY:h.pageY}),b.add(document,"mousemove mouseup",e,l),i(j,!1),d.dragging=null,!1;case!d.dragging&&"mousemove":if(g(h.pageX-l.pageX)+g(h.pageY-l.pageY)<l.distance)break;h.target=l.target,k=f(h,"dragstart",j),k!==!1&&(d.dragging=j,d.proxy=h.dragProxy=a(k||j)[0]);case"mousemove":if(d.dragging){if(k=f(h,"drag",j),c.drop&&(c.drop.allowed=k!==!1,c.drop.handler(h)),k!==!1)break;h.type="mouseup"}case"mouseup":b.remove(document,"mousemove mouseup",e),d.dragging&&(c.drop&&c.drop.handler(h),f(h,"dragend",j)),i(j,!0),d.dragging=d.proxy=l.elem=!1}return!0}function f(b,c,d){b.type=c;var e=a.event.dispatch.call(d,b);return e===!1?!1:e||b.result}function g(a){return Math.pow(a,2)}function h(){return d.dragging===!1}function i(a,b){a&&(a.unselectable=b?"off":"on",a.onselectstart=function(){return b},a.style&&(a.style.MozUserSelect=b?"":"none"))}a.fn.drag=function(a,b,c){return b&&this.bind("dragstart",a),c&&this.bind("dragend",c),a?this.bind("drag",b?b:a):this.trigger("drag")};var b=a.event,c=b.special,d=c.drag={not:":input",distance:0,which:1,dragging:!1,setup:function(c){c=a.extend({distance:d.distance,which:d.which,not:d.not},c||{}),c.distance=g(c.distance),b.add(this,"mousedown",e,c),this.attachEvent&&this.attachEvent("ondragstart",h)},teardown:function(){b.remove(this,"mousedown",e),this===d.dragging&&(d.dragging=d.proxy=!1),i(this,!0),this.detachEvent&&this.detachEvent("ondragstart",h)}};c.dragstart=c.dragend={setup:function(){},teardown:function(){}}})(jQuery); | 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 |
self.createNode = function(info) {
var $node = $('<data class="ext-databasic"></data>');
if ($node) {
// save node to info structure
info.node = $node;
// insert node into editor dom
context.invoke('editor.insertNode', $node[0]);
}
return $node;
}; | 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._onError = (err) => { onError(err); }; | 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 |
init: function(options) {
options = $.extend(true, {}, default_options, options);
if ($.isFunction(this)) {
if (options==undefined) {
$.error('jquery.arcticmodal: Uncorrect parameters');
return;
}
if (options.type=='') {
$.error('jquery.arcticmodal: Don\'t set parameter "type"');
return;
}
switch (options.type) {
case 'html':
if (options.content=='') {
$.error('jquery.arcticmodal: Don\'t set parameter "content"');
return
}
var c = options.content;
options.content = '';
return modal.init_el($(c), options);
break;
case 'ajax':
if (options.url=='') {
$.error('jquery.arcticmodal: Don\'t set parameter "url"');
return;
}
return modal.init_el($('<div />'), options);
break;
}
} else {
return this.each(function() {
modal.init_el($(this), $.extend(true, {}, options));
});
}
} | 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 |
wp.updates.updatePluginSuccess = function( response ) {
var $pluginRow, $updateMessage, newText;
if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
$pluginRow = $( 'tr[data-plugin="' + response.plugin + '"]' )
.removeClass( 'update' )
.addClass( 'updated' );
$updateMessage = $pluginRow.find( '.update-message' )
.removeClass( 'updating-message notice-warning' )
.addClass( 'updated-message notice-success' ).find( 'p' );
// Update the version number in the row.
newText = $pluginRow.find( '.plugin-version-author-uri' ).html().replace( response.oldVersion, response.newVersion );
$pluginRow.find( '.plugin-version-author-uri' ).html( newText );
} else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
$updateMessage = $( '.plugin-card-' + response.slug ).find( '.update-now' )
.removeClass( 'updating-message' )
.addClass( 'button-disabled updated-message' );
}
$updateMessage
.attr( 'aria-label', wp.updates.l10n.updatedLabel.replace( '%s', response.pluginName ) )
.text( wp.updates.l10n.updated );
wp.a11y.speak( wp.updates.l10n.updatedMsg, 'polite' );
wp.updates.decrementCount( 'plugin' );
$document.trigger( 'wp-plugin-update-success', response );
}; | 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 |
Cache.prototype.clear = function() {
this._size = 0
this._values = Object.create(null)
} | 0 | JavaScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
CKEDITOR.resourceManager.prototype={add:function(a,e){if(this.registered[a])throw'[CKEDITOR.resourceManager.add] The resource name "'+a+'" is already registered.';var b=this.registered[a]=e||{};b.name=a;b.path=this.getPath(a);CKEDITOR.fire(a+CKEDITOR.tools.capitalize(this.fileName)+"Ready",b);return this.get(a)},get:function(a){return this.registered[a]||null},getPath:function(a){var e=this.externals[a];return CKEDITOR.getUrl(e&&e.dir||this.basePath+a+"/")},getFilePath:function(a){var e=this.externals[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 |
var StorageDialog=function(b,e,f){function c(p,q,x,y,A,B){function I(){mxEvent.addListener(O,"click",null!=B?B:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()}),
function(E){b.spinner.stop();b.handleError(E)}):(b.setMode(x,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}d++;++v>f&&(mxUtils.br(g),v=1);var O=document.createElement("a");O.style.overflow="hidden";O.style.display="inline-block";O.className="geBaseButton";O.style.boxSizing="border-box";O.style.fontSize="11px";O.style.position="relative";O.style.margin="4px";O.style.marginTop="8px";O.style.marginBottom="0px";O.style.padding="8px 10px 8px 10px";O.style.width="88px";O.style.height= | 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 |
(d.extend(r[a]),q&&!q.date&&console.warn("This method of applying plugins is deprecated. See documentation for details.")))};d.locale(m,{});"object"===typeof module&&"object"===typeof module.exports?module.exports=d:"function"===typeof define&&define.amd?define([],function(){return d}):q.date=d})(this); | 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 |
let onSocketData = function(chunk) {
let match;
let remainder;
headers += chunk.toString('binary');
if ((match = headers.match(/\r\n\r\n/))) {
socket.removeListener('data', onSocketData);
remainder = headers.substr(match.index + match[0].length);
headers = headers.substr(0, match.index);
if (remainder) {
socket.unshift(Buffer.from(remainder, 'binary'));
}
// proxy connection is now established
return callback(null, socket);
}
}; | 0 | JavaScript | CWE-88 | Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | The software constructs a string for a command to executed by a separate component
in another control sphere, but it does not properly delimit the
intended arguments, options, or switches within that command string. | https://cwe.mitre.org/data/definitions/88.html | vulnerable |
this.selected = function() {
return selected.slice(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 |
0;N<T;N++)u=Editor.crcTable[(u^D.charCodeAt(K+N))&255]^u>>>8;return u};Editor.crc32=function(u){for(var D=-1,K=0;K<u.length;K++)D=D>>>8^Editor.crcTable[(D^u.charCodeAt(K))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(u,D,K,T,N){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}u=u.substring(u.indexOf(",")+ | 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 |
options_dic_send:function(){var b={osp:e.cookie.get("osp"),udn:e.cookie.get("udn"),cust_dic_ids:a.cust_dic_ids,id:"options_dic_send",udnCmd:e.cookie.get("udnCmd")};e.postMessage.send({message:b,target:a.targetFromFrame[a.iframeNumber+"_"+a.dialog._.currentTabId]})},data:function(a){delete a.id},giveOptions:function(){},setOptionsConfirmF:function(){},setOptionsConfirmT:function(){j.setValue("")},clickBusy:function(){a.div_overlay.setEnable()},suggestAllCame:function(){a.div_overlay.setDisable();a.div_overlay_no_check.setDisable()}, | 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(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;void 0!==b.axis&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);void 0!==b.wheelDeltaY&&(g=b.wheelDeltaY/120);void 0!==b.wheelDeltaX&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]=d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,!1);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,!1);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); | 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 |
refreshPositions: function(fast) {
// Determine whether items are being displayed horizontally
this.floating = this.items.length ?
this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
false;
//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
if (this.offsetParent && this.helper) {
this.offset.parent = this._getParentOffset();
}
var i, item, t, p;
for (i = this.items.length - 1; i >= 0; i--) {
item = this.items[i];
//We ignore calculating positions of all connected containers when we're not over them
if (item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
continue;
}
t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
if (!fast) {
item.width = t.outerWidth();
item.height = t.outerHeight();
}
p = t.offset();
item.left = p.left;
item.top = p.top;
}
if (this.options.custom && this.options.custom.refreshContainers) {
this.options.custom.refreshContainers.call(this);
} else {
for (i = this.containers.length - 1; i >= 0; i--) {
p = this.containers[i].element.offset();
this.containers[i].containerCache.left = p.left;
this.containers[i].containerCache.top = p.top;
this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
}
}
return this;
}, | 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 |
"geTempDlgCreateBtn geTempDlgBtnDisabled")}function z(ha,da){if(null!=J){var ca=function(pa){qa.isExternal?g(qa,function(na){la(na,pa)},ia):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(na){200<=na.getStatus()&&299>=na.getStatus()?la(na.getText(),pa):ia()})):la(b.emptyDiagramXml,pa)},la=function(pa,na){y||b.hideDialog(!0);e(pa,na,qa,da)},ia=function(){A(mxResources.get("cannotLoad"));ma()},ma=function(){J=qa;za.className="geTempDlgCreateBtn";da&&(Ga.className="geTempDlgOpenBtn")},
qa=J;J=null;"boolean"!==typeof da&&(da=qa.isExternal&&p);1==ha?k(qa.url,qa):da?(Ga.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ca()):(za.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",mxResources.get("ok"),ca,ha,function(pa){var na=null!=pa&&0<pa.length;return na&&y?(ca(pa),!1):
na},null,null,null,ma,x?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function L(ha){za.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";p&&(Ga.style.display=ha);for(var da=M.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<da.length;ca++)da[ca].style.display=ha}function C(ha,da,ca,la,ia){ia||(aa.innerHTML="",t(),R=ha,Y=la);var ma=null;if(ca){ma=document.createElement("table");ma.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"), | 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 |
$scope.delete = function(foreignSource) {
bootbox.confirm('Are you sure you want to remove the requisition ' + foreignSource + '?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteRequisition(foreignSource).then(
function() { // success
growl.success('The requisition ' + foreignSource + ' has been deleted.');
},
$scope.errorHandler
);
}
});
}; | 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 identity($) {return $;} | 0 | JavaScript | CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/74.html | vulnerable |
function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,D,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/u,T/D))};Editor.prototype.exportToCanvas=function(u,D,K,T,N,Q,R,Y,ba,ea,Z,fa,aa,va,ja,Ba,Da,qa){try{Q=null!=Q?Q:!0;R=null!=R?R:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Ca=ba?null:fa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ba&&(Ca=Ba?this.graph.defaultPageBackgroundColor:"#ffffff"); | 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 |
OAuthServer.prototype.generateAccessToken = function (refreshToken) {
let username = this.tokens[refreshToken];
let accessToken = crypto.randomBytes(10).toString('base64');
if (!username) {
return {
error: 'Invalid refresh token'
};
}
this.users[username].accessToken = accessToken;
this.users[username].expiresIn = Date.now + this.options.expiresIn * 1000;
if (this.options.onUpdate) {
this.options.onUpdate(username, accessToken);
}
return {
access_token: accessToken,
expires_in: this.options.expiresIn,
token_type: 'Bearer'
};
}; | 1 | JavaScript | CWE-88 | Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | The software constructs a string for a command to executed by a separate component
in another control sphere, but it does not properly delimit the
intended arguments, options, or switches within that command string. | https://cwe.mitre.org/data/definitions/88.html | safe |
$scope.clone = function(foreignSource) {
var availableForeignSources = [];
angular.forEach($scope.requisitionsData.requisitions, function(r) {
if (r.foreignSource !== foreignSource) {
availableForeignSources.push(r.foreignSource);
}
});
var modalInstance = $uibModal.open({
backdrop: 'static',
keyboard: false,
controller: 'CloneForeignSourceController',
templateUrl: cloneForeignsourceView,
resolve: {
foreignSource: function() { return foreignSource; },
availableForeignSources: function() { return availableForeignSources; }
}
});
modalInstance.result.then(function(targetForeignSource) {
bootbox.confirm('This action will override the existing foreign source definition for the requisition named ' + _.escape(targetForeignSource) + ', using ' + _.escape(foreignSource) + ' as a template. Are you sure you want to continue ? This cannot be undone.', function(ok) {
if (!ok) {
return;
}
RequisitionsService.startTiming();
RequisitionsService.cloneForeignSourceDefinition(foreignSource, targetForeignSource).then(
function() { // success
growl.success('The foreign source definition for ' + _.escape(foreignSource) + ' has been cloned to ' + _.escape(targetForeignSource));
},
$scope.errorHandler
);
});
});
}; | 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 |
var fillTable = function(chart_data) {
var tableRows = [],
rowData, rowId;
for(i=0; i<chart_data.length; i++) {
rowData = chart_data[i];
rowId = typeof rowData.userId != 'undefined' ? rowData.userId : rowData.groupId;
tableRows.push('<tr><td class="link">' + rowData.label.escapeHTML() + '(id:'+ rowId +')</td>');
tableRows.push('<td class="link">' + rowData.data.filesizeformat() + '</td></tr>');
}
$('#drivespaceTable tbody').html(tableRows.join(""));
$('#drivespaceTable').show();
}; | 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 |
CKEDITOR.dom.event.prototype={getKey:function(){return this.$.keyCode||this.$.which},getKeystroke:function(){var a=this.getKey();if(this.$.ctrlKey||this.$.metaKey)a=a+CKEDITOR.CTRL;this.$.shiftKey&&(a=a+CKEDITOR.SHIFT);this.$.altKey&&(a=a+CKEDITOR.ALT);return a},preventDefault:function(a){var e=this.$;e.preventDefault?e.preventDefault():e.returnValue=false;a&&this.stopPropagation()},stopPropagation:function(){var a=this.$;a.stopPropagation?a.stopPropagation():a.cancelBubble=true},getTarget:function(){var 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 |
messageSchema.statics.getConversationWithObject = function (object, callback) {
if (!_.isObject(object)) {
return callback('Invalid Object (Must by of type Object) - MessageSchema.GetUserWithObject()', null)
}
var self = this
var deletedAt = null
var limit = object.limit === null ? 25 : object.limit
var page = object.page === null ? 0 : object.page
if (object.requestingUser) {
var userMetaIdx = _.findIndex(object.userMeta, function (item) {
return item.userId.toString() === object.requestingUser._id.toString()
})
if (userMetaIdx !== -1 && object.userMeta[userMetaIdx].deletedAt) {
deletedAt = new Date(object.userMeta[userMetaIdx].deletedAt)
}
}
var q = self
.model(COLLECTION)
.find({})
.sort('-createdAt')
.skip(page * limit)
.populate({
path: 'owner',
select: '_id username fullname email image lastOnline'
})
if (limit !== -1) {
q.limit(limit)
}
if (object.cid !== null) {
q.where({ conversation: object.cid })
}
if (deletedAt) {
q.where({ createdAt: { $gte: deletedAt } })
}
return q.exec(callback)
} | 0 | JavaScript | CWE-190 | Integer Overflow or Wraparound | The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control. | https://cwe.mitre.org/data/definitions/190.html | vulnerable |
"&from="+q;break}q=z.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:z.getExportVariables()};A&&(p.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+C+E+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+B+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(t&&isFinite(t)?"&h="+t:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title): | 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 get(root, path) {
var i,
c,
space,
nextSpace,
curSpace = root;
if (!root) {
return root;
}
space = parse(path);
if (space.length) {
for (i = 0, c = space.length; i < c; i++) {
nextSpace = space[i];
if (
nextSpace === '__proto__' ||
nextSpace === 'constructor' ||
nextSpace === 'prototype'
) {
return null;
}
if (isUndefined(curSpace[nextSpace])) {
return;
}
curSpace = curSpace[nextSpace];
}
}
return curSpace;
} | 0 | 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 | vulnerable |
function ASTCompiler(astBuilder, $filter) {
this.astBuilder = astBuilder;
this.$filter = $filter;
} | 1 | JavaScript | CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/74.html | safe |
function genericAjaxPopupDestroy($layer) {
var $popup = genericAjaxPopupFetch($layer);
if(null != $popup) {
genericAjaxPopupClose($layer);
try {
$popup.dialog('destroy');
$popup.unbind();
} catch(e) { }
$($('#devblocksPopups').data($layer)).remove(); // remove DOM
$('#devblocksPopups').removeData($layer); // remove from registry
return true;
}
return false;
} | 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 |
title: "<img src=\"img/icons/silk/information.png\" align=\"absmiddle\"> " + $("#navigrid-extension-information").attr("title")
}).dialogExtend(
{
maximizable: true
});
});
});
| 1 | 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 | safe |
function test(input) {
var count = 0;
var oldInput, newInput;
testContainer.innerHTML = "<img />";
testImage().setAttribute("alt", input);
print("------");
print("Test input: " + input);
do {
oldInput = testImage().getAttribute("alt");
var intermediate = testContainer.innerHTML;
print("Render: " + intermediate);
testContainer.innerHTML = intermediate;
if (testImage() == null) {
print("Image disappeared...");
break;
}
newInput = testImage().getAttribute("alt");
print("New value: " + newInput);
count++;
} while (count < 5 && newInput != oldInput);
if (count == 5) {
print("Failed to achieve fixpoint");
}
testContainer.innerHTML = "";
} | 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 |
fm.trigger('unlockfiles', {files : helper.data('files'), helper: helper});
} else {
$(this).removeClass(dropover);
}
}
}, | 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 |
onLogoutClick: function() {
// Sometimes the logout button is a bit close to the close-menu X button,
// so better ask, in case clicked by accident.
util.openDefaultStupidDialog({
dialogClassName: 'e_ByeD',
tiny: true,
body: t.LogOut + '?',
// + "[x] Log out from all devices" — if there're other sessions as well
primaryButtonTitle: t.YesBye,
secondaryButonTitle: t.Cancel,
onCloseOk: function(whichButton) {
if (whichButton === 1) {
debiki2.ReactActions.logout();
}
}
});
}, | 1 | JavaScript | CWE-613 | Insufficient Session Expiration | According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization." | https://cwe.mitre.org/data/definitions/613.html | safe |
T){var N=Graph.customFontElements[T];null!=N&&N.url!=E&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=E,"http:"==E.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(E)),N={name:u,url:E,elt:Graph.createFontElement(u,N)},Graph.customFontElements[T]=N,Graph.recentCustomFonts[T]=N,E=document.getElementsByTagName("head")[0],null!=J&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=J,N.elt.onerror=J):J()),null!=E&&E.appendChild(N.elt)):null!=J&&J()}else null!=J&&J()}else null!=J&&J();
return u};Graph.getFontUrl=function(u,E){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(E=u.url);return E};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var E=0;E<u.length;E++){var J=u[E].getAttribute("data-font-src");if(null!=J){var T="FONT"==u[E].nodeName?u[E].getAttribute("face"):u[E].style.fontFamily;null!=T&&Graph.addFont(T,J)}}};Graph.processFontStyle=function(u){if(null!=u){var E=mxUtils.getValue(u,"fontSource",null);if(null!=E){var J=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY, | 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 |
"4px";pa.style.margin="2px";pa.style.border="1px solid black";pa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){pa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(za,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(pa);return btn}function R(za,ta,ka,pa,sa,ya,va){null!=ta&&(ta=ta.split(","),
aa.push({name:za,values:ta,type:ka,defVal:pa,countProperty:sa,parentRow:ya,isDeletable:!0,flipBkg:va}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ra){for(var wa=ya,fa=0;null!=wa.nextSibling;)if(wa.nextSibling.getAttribute("data-pName")==za)wa=wa.nextSibling,fa++;else break;var ca={type:ka,parentRow:ya,index:fa,isDeletable:!0,defVal:pa,countProperty:sa};fa=ha(za,"",ca,0==fa%2,va);T(za,pa,ca);wa.parentNode.insertBefore(fa,wa.nextSibling);mxEvent.consume(ra)}));btn.style.height="16px";btn.style.width=
"25px";btn.className="geColorBtn";return btn}function Y(za,ta,ka,pa,sa,ya,va){if(0<sa){var ra=Array(sa);ta=null!=ta?ta.split(","):[];for(var wa=0;wa<sa;wa++)ra[wa]=null!=ta[wa]?ta[wa]:null!=pa?pa:"";aa.push({name:za,values:ra,type:ka,defVal:pa,parentRow:ya,flipBkg:va,size:sa})}return document.createElement("div")}function da(za,ta,ka){var pa=document.createElement("input");pa.type="checkbox";pa.checked="1"==ta;mxEvent.addListener(pa,"change",function(){T(za,pa.checked?"1":"0",ka)});return pa}function ha(za, | 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 |
Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerHTML="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}}; | 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 |
end() {
if (this._sock && this._sock.writable) {
this._protocol.disconnect(DISCONNECT_REASON.BY_APPLICATION);
this._sock.end();
}
return this;
} | 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 |
_convertAddresses(addresses, uniqueList) {
let values = [];
uniqueList = uniqueList || [];
[].concat(addresses || []).forEach(address => {
if (address.address) {
address.address = this._normalizeAddress(address.address);
if (!address.name) {
values.push(address.address.indexOf(' ') >= 0 ? `<${address.address}>` : `${address.address}`);
} else if (address.name) {
values.push(`${this._encodeAddressName(address.name)} <${address.address}>`);
}
if (address.address) {
if (!uniqueList.filter(a => a.address === address.address).length) {
uniqueList.push(address);
}
}
} else if (address.group) {
let groupListAddresses = (address.group.length ? this._convertAddresses(address.group, uniqueList) : '').trim();
values.push(`${this._encodeAddressName(address.name)}:${groupListAddresses};`);
}
});
return values.join(', ');
} | 1 | JavaScript | CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/74.html | safe |
this.$,b;do b=(e=e.previousSibling)&&e.nodeType!=10&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getNext:function(a){var e=this.$,b;do b=(e=e.nextSibling)&&new CKEDITOR.dom.node(e);while(b&&a&&!a(b));return b},getParent:function(a){var e=this.$.parentNode;return e&&(e.nodeType==CKEDITOR.NODE_ELEMENT||a&&e.nodeType==CKEDITOR.NODE_DOCUMENT_FRAGMENT)?new CKEDITOR.dom.node(e):null},getParents:function(a){var e=this,b=[];do b[a?"push":"unshift"](e);while(e=e.getParent());return b},getCommonAncestor:function(a){if(a.equals(this))return this;
if(a.contains&&a.contains(this))return a;var e=this.contains?this:this.getParent();do if(e.contains(a))return e;while(e=e.getParent());return null},getPosition:function(a){var e=this.$,b=a.$;if(e.compareDocumentPosition)return e.compareDocumentPosition(b);if(e==b)return CKEDITOR.POSITION_IDENTICAL;if(this.type==CKEDITOR.NODE_ELEMENT&&a.type==CKEDITOR.NODE_ELEMENT){if(e.contains){if(e.contains(b))return CKEDITOR.POSITION_CONTAINS+CKEDITOR.POSITION_PRECEDING;if(b.contains(e))return CKEDITOR.POSITION_IS_CONTAINED+ | 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(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?
this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(q,v){return this.createEchoRequest(g,q,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,q,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var x=this.getServiceCount(!1);isLocalStorage&&x++;var A=4>=x?2:6<x?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(z,L){if("_blank"==L||null!=z&&0<z.length){var M=g("_blank"==L?null:z,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1"); | 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 |
K&&D(Editor.svgBrokenImage.src)});else{var N=new Image;this.crossOriginImages&&(N.crossOrigin="anonymous");N.onload=function(){window.clearTimeout(T);if(K)try{var Q=document.createElement("canvas"),R=Q.getContext("2d");Q.height=N.height;Q.width=N.width;R.drawImage(N,0,0);D(Q.toDataURL())}catch(Y){D(Editor.svgBrokenImage.src)}};N.onerror=function(){window.clearTimeout(T);K&&D(Editor.svgBrokenImage.src)};N.src=u}}catch(Q){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,D,K, | 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 |
this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,J=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return J.shadowVisible},function(N){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=N;J.model.execute(Q)},{install:function(N){this.listener=function(){N(J.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption|| | 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 |
MyFilters.prototype._load_default_subscriptions = function() {
var result = {};
// Returns the ID of the list appropriate for the user's locale, or ''
function listIdForThisLocale() {
var language = determineUserLanguage();
switch(language) {
case 'bg': return 'easylist_plus_bulgarian';
case 'cs': return 'czech';
case 'cu': return 'easylist_plus_bulgarian';
case 'da': return 'danish';
case 'de': return 'easylist_plus_german';
case 'el': return 'easylist_plus_greek';
case 'fi': return 'easylist_plus_finnish';
case 'fr': return 'easylist_plus_french';
case 'he': return 'israeli';
case 'hu': return 'hungarian';
case 'it': return 'italian';
case 'id': return 'easylist_plus_indonesian';
case 'ja': return 'japanese';
case 'ko': return 'easylist_plun_korean';
case 'lv': return 'latvian';
case 'nl': return 'dutch';
case 'no': return 'norwegian';
case 'pl': return 'easylist_plus_polish';
case 'ro': return 'easylist_plus_romanian';
case 'ru': return 'russian';
case 'sk': return 'czech';
case 'sv': return 'swedish';
case 'tr': return 'turkish';
case 'uk': return 'russian';
case 'zh': return 'chinese';
default: return '';
}
}
//Update will be done immediately after this function returns
result["adblock_custom"] = { subscribed: true };
result["easylist"] = { subscribed: true };
var list_for_lang = listIdForThisLocale();
if (list_for_lang)
result[list_for_lang] = { subscribed: true };
return result;
} | 0 | JavaScript | CWE-284 | Improper Access Control | The software does not restrict or incorrectly restricts access to a resource from an unauthorized actor. | https://cwe.mitre.org/data/definitions/284.html | vulnerable |
dinit = function() {
var dw,
winH = $(window).height(),
winW = $(window).width(),
ctrW = dialog.find('div.elfinder-resize-control').width(),
prvW = preview.width(),
baseW = base.width();
base.width(Math.min(dialogWidth, winW - 30));
preview.attr('style', '');
if (owidth && oheight) {
pwidth = preview.width() - (rhandle.outerWidth() - rhandle.width());
pheight = preview.height() - (rhandle.outerHeight() - rhandle.height());
resize.updateView(owidth, oheight);
}
prvW = preview.width(),
dw = dialog.width() - 20;
if (prvW > dw) {
preview.width(dw);
} else if ((dw - prvW) < ctrW) {
if (winW > winH) {
preview.width(dw - ctrW - 20);
} else {
preview.css({ float: 'none', marginLeft: 'auto', marginRight: 'auto'});
}
}
pwidth = preview.width() - (rhandle.outerWidth() - rhandle.width());
winH -= 30;
(preview.height() > winH) && preview.height(winH);
pheight = preview.height() - (rhandle.outerHeight() - rhandle.height());
if (owidth && oheight) {
setupimg();
}
if (img.height() && preview.height() > img.height() + 20) {
preview.height(img.height() + 20);
pheight = preview.height() - (rhandle.outerHeight() - rhandle.height());
setuprimg();
}
}, | 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.dialog.add("specialchar",function(i){var e,l=i.lang.specialchar,k=function(c){var b,c=c.data?c.data.getTarget():new CKEDITOR.dom.element(c);if("a"==c.getName()&&(b=c.getChild(0).getHtml()))c.removeClass("cke_light_background"),e.hide(),c=i.document.createElement("span"),c.setHtml(b),i.insertText(c.getText())},m=CKEDITOR.tools.addFunction(k),j,g=function(c,b){var a,b=b||c.data.getTarget();"span"==b.getName()&&(b=b.getParent());if("a"==b.getName()&&(a=b.getChild(0).getHtml())){j&&d(null,j);
var f=e.getContentElement("info","htmlPreview").getElement();e.getContentElement("info","charPreview").getElement().setHtml(a);f.setHtml(CKEDITOR.tools.htmlEncode(a));b.getParent().addClass("cke_light_background");j=b}},d=function(c,b){b=b||c.data.getTarget();"span"==b.getName()&&(b=b.getParent());"a"==b.getName()&&(e.getContentElement("info","charPreview").getElement().setHtml(" "),e.getContentElement("info","htmlPreview").getElement().setHtml(" "),b.getParent().removeClass("cke_light_background"), | 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 |
M.push(D);A.appendChild(D);var E=function(oa){Ba.style.display="none";fa.style.display="none";Z.style.left="30px";u(oa?-1:1);null==W&&(W=La);Z.scrollTop=0;Z.innerHTML="";S.spin(Z);var sa=function(ya,wa,ua){H=0;S.stop();La=ya;ua=ua||{};var xa=0,ha;for(ha in ua)xa+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==ya.length&&0==xa)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<xa){Ba.style.display="";Z.style.left="160px";Ba.innerHTML="";
Na=0;Ca={"draw.io":ya};for(ha in ua)Ca[ha]=ua[ha];C()}else O(!0)};oa?q(J.value,sa):p(sa)};p&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),A.appendChild(D),M.push(D));if(q){D=document.createElement("span");D.style.marginLeft="10px";D.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(D);var J=document.createElement("input");J.style.marginRight="10px";J.style.marginLeft="10px";J.style.width="220px";mxEvent.addListener(J,"keypress",function(oa){13== | 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 pd(a) {return a%100===11?!0:a%10===1?!1:!0}function qd(a,b,c,d) {var e=a+" ";switch(c) {case"s":return b||d?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return b?"mínúta":"mínútu";case"mm":return pd(a)?e+(b||d?"mínútur":"mínútum"):b?e+"mínúta":e+"mínútu";case"hh":return pd(a)?e+(b||d?"klukkustundir":"klukkustundum"):e+"klukkustund";case"d":return b?"dagur":d?"dag":"degi";case"dd":return pd(a)?b?e+"dagar":e+(d?"daga":"dögum"):b?e+"dagur":e+(d?"dag":"degi");case"M":return b?"mánuður":d?"mánuð":"mánuði";case"MM":return pd(a)?b?e+"mánuðir":e+(d?"mánuði":"mánuðum"):b?e+"mánuður":e+(d?"mánuð":"mánuði");case"y":return b||d?"ár":"ári";case"yy":return pd(a)?e+(b||d?"ár":"árum"):e+(b||d?"ár":"ári")}} | 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 |
"inline-block":"none"};Ca=function(){ta.innerHTML="";if(null!=F.currentPage){mxUtils.write(ta,F.currentPage.getName());var da=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var la=F.currentPage.getId();ta.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+da+")"+(null!=la?" ["+la+"]":""))}};Fa.parentNode.removeChild(Fa);var Ea=F.actions.get("delete"),La=E("",Ea.funct,null,mxResources.get("delete"),Ea,Editor.trashImage);La.style.opacity="0.1";Q.appendChild(La); | 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 |
error: function (xhr, textStatus, error) {
log.info("Failed to log out of terminal: ", error);
}, | 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 |
(function(){function y(a){for(var a=a.toUpperCase(),c=z.length,b=0,f=0;f<c;++f)for(var d=z[f],e=d[1].length;a.substr(0,e)==d[1];a=a.substr(e))b+=d[0];return b}function A(a){for(var a=a.toUpperCase(),c=B.length,b=1,f=1;0<a.length;f*=c)b+=B.indexOf(a.charAt(a.length-1))*f,a=a.substr(0,a.length-1);return b}var C=CKEDITOR.htmlParser.fragment.prototype,o=CKEDITOR.htmlParser.element.prototype;C.onlyChild=o.onlyChild=function(){var a=this.children;return 1==a.length&&a[0]||null};o.removeAnyChildWithName= | 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 |
select: function (context, version) {
var versionToUse = normalizeElectron(version)
var chrome = e2c[versionToUse]
if (!chrome) {
throw new BrowserslistError(
'Unknown version ' + version + ' of electron'
)
}
return ['chrome ' + chrome]
} | 1 | JavaScript | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | safe |
0;N<T;N++)u=Editor.crcTable[(u^D.charCodeAt(K+N))&255]^u>>>8;return u};Editor.crc32=function(u){for(var D=-1,K=0;K<u.length;K++)D=D>>>8^Editor.crcTable[(D^u.charCodeAt(K))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(u,D,K,T,N){function Q(Z,fa){var aa=ba;ba+=fa;return Z.substring(aa,ba)}function R(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}u=u.substring(u.indexOf(",")+ | 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 |
"<")},htmlEncodeAttr:function(b){return b.replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},htmlDecodeAttr:function(b){return b.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},getNextNumber:function(){var b=0;return function(){return++b}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(b,a){var d=a(b);d.prototype=b.prototype;return d},setTimeout:function(b,a,d,g,e){e||(e=window);d||(d=e);return e.setTimeout(function(){g?b.apply(d,[].concat(g)): | 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 |
init: function(widgetId, url, limit) {
this.$widget = $('#widget' + widgetId);
this.$widget.addClass('loading');
var data = {
url: url,
limit: limit
};
Craft.postActionRequest('dashboard/get-feed-items', data, $.proxy(function(response, textStatus) {
this.$widget.removeClass('loading');
if (textStatus === 'success') {
this.$widget.find('table')
.attr('dir', response.dir);
var $tds = this.$widget.find('td');
for (var i = 0; i < response.items.length; i++) {
var item = response.items[i],
$td = $($tds[i]);
var widgetHtml = $('<a/>', {
href: item.permalink,
target: '_blank',
text: item.title
}).html() + ' ';
if (item.date) {
widgetHtml += '<span class="light nowrap">' + item.date + '</span>';
}
$td.html(widgetHtml);
}
}
}, this));
} | 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 fail (request, response) {
t.ok(false) // fail if we reach here
} | 1 | 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 | safe |
e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" '); | 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 |
b){this.$.style[CKEDITOR.tools.cssStyleToDomStyle(a)]=b;return this},setStyles:function(a){for(var b in a)this.setStyle(b,a[b]);return this},setOpacity:function(a){if(CKEDITOR.env.ie&&CKEDITOR.env.version<9){a=Math.round(a*100);this.setStyle("filter",a>=100?"":"progid:DXImageTransform.Microsoft.Alpha(opacity="+a+")")}else this.setStyle("opacity",a)},unselectable:function(){this.setStyles(CKEDITOR.tools.cssVendorPrefix("user-select","none"));if(CKEDITOR.env.ie||CKEDITOR.env.opera){this.setAttribute("unselectable", | 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(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,u,t,D){var c=u.y,e=u.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=u){var m=this,q=new mxCellState,v=this.graph.getView().scale,x=Math.max(2,this.getGuideTolerance()/2);q.x=d.x+e;q.y=d.y+c;q.width=d.width;q.height=d.height;for(var A=[],z=[],L=0;L<this.states.length;L++){var M=this.states[L];M instanceof mxCellState&&(D||!this.graph.isCellSelected(M.cell))&&((q.x>=M.x&&q.x<=M.x+M.width||M.x>=q.x&&M.x<=q.x+q.width)&&(q.y> | 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 |
var T=document.createElement("tbody"),N=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(R){var Y=new Date(R.modifiedDate),ba=null;if(0<=Y.getTime()){var ea=function(fa){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(fa),va=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=va){var ja=function(Da){null!=Da&&(Da=Ba(Editor.parseDiagramNode(Da)));return Da},Ba=function(Da){var qa=Da.getAttribute("background");
if(null==qa||""==qa||qa==mxConstants.NONE)qa=d.defaultPageBackgroundColor;n.style.backgroundColor=qa;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};M.style.display="none";M.innerHTML="";t=aa;z=fa;k=parseSelectFunction=null;l=0;if("mxfile"==va.nodeName){aa=va.getElementsByTagName("diagram");k=[];for(fa=0;fa<aa.length;fa++)k.push(aa[fa]);l=Math.min(g,k.length-1);0<k.length&&ja(k[l]);if(1<k.length)for(M.removeAttribute("disabled"),M.style.display= | 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 |
d[c]=e,"o"===b[1]&&Y(a[e])});a._hungarianMap=d}function J(a,b,c){a._hungarianMap||Y(a);var d;h.each(b,function(e){d=a._hungarianMap[e];if(d!==k&&(c||b[d]===k))"o"===d.charAt(0)?(b[d]||(b[d]={}),h.extend(!0,b[d],b[e]),J(a[d],b[d],c)):b[d]=b[e]})}function Fa(a){var b=m.defaults.oLanguage,c=a.sZeroRecords;!a.sEmptyTable&&(c&&"No data available in table"===b.sEmptyTable)&&F(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(c&&"Loading..."===b.sLoadingRecords)&&F(a,a,"sZeroRecords","sLoadingRecords"); | 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 |
E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var J=mxUtils.parseXml(E).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(u,E,J){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender? | 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 |
setup: function () {
var data = this.model.get('data') || {};
this.userId = data.userId;
this.messageData['entityType'] = this.getHelper().escapeString(Espo.Utils.upperCaseFirst((this.translate(data.entityType, 'scopeNames') || '').toLowerCase()));
if (data.personEntityId) {
this.messageData['from'] = '<a href="#' + this.getHelper().escapeString(data.personEntityType) + '/view/' + this.getHelper().escapeString(data.personEntityId) + '">' + this.getHelper().escapeString(data.personEntityName) + '</a>';
} else {
this.messageData['from'] = this.getHelper().escapeString(data.fromString || this.translate('empty address'));
}
this.emailId = this.getHelper().escapeString(data.emailId);
this.emailName = this.getHelper().escapeString(data.emailName);
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 |
e.frameId,'" title="',a.label,'" src="javascript:void('];b.push(CKEDITOR.env.ie?"(function(){"+encodeURIComponent("document.open();("+CKEDITOR.tools.fixDomain+")();document.close();")+"})()":"0");b.push(')"></iframe>');return b.join("")})}},fileButton:function(b,a,d){if(!(3>arguments.length)){i.call(this,a);var e=this;a.validate&&(this.validate=a.validate);var c=CKEDITOR.tools.extend({},a),f=c.onClick;c.className=(c.className?c.className+" ":"")+"cke_dialog_ui_button";c.onClick=function(c){var d=
a["for"];if(!f||f.call(this,c)!==false){b.getContentElement(d[0],d[1]).submit();this.disable()}};b.on("load",function(){b.getContentElement(a["for"][0],a["for"][1])._.buttons.push(e)});CKEDITOR.ui.dialog.button.call(this,b,c,d)}},html:function(){var b=/^\s*<[\w:]+\s+([^>]*)?>/,a=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,d=/\/$/;return function(e,c,f){if(!(3>arguments.length)){var h=[],g=c.html;"<"!=g.charAt(0)&&(g="<span>"+g+"</span>");var k=c.focus;if(k){var j=this.focus;this.focus=function(){("function"== | 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 |
Number(I.value),[e[t]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(t){13==t.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,D.clientY);null!=D&&D.parentNode!= | 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.