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 |
---|---|---|---|---|---|---|---|
i.onload = function () {
/* Remove preview */
imgPreview.getElement().setHtml('');
/* Set attributes */
if (orgWidth == null || orgHeight == null) {
self.setValueOf('tab-properties', 'width', this.width);
self.setValueOf('tab-properties', 'height', this.height);
imgScale = 1;
if (this.height > 0 && this.width > 0) imgScale = this.width / this.height;
if (imgScale <= 0) imgScale = 1;
} else {
orgWidth = null;
orgHeight = null;
}
this.id = editor.id + 'previewimage';
this.setAttribute('style', 'max-width:400px;max-height:100px;');
this.setAttribute('alt', '');
/* Insert preview image */
try {
let p = imgPreview.getElement().$;
if (p) p.appendChild(this);
} catch (e) {}
};
| 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
|
"should return the correct value": function (res) {
assert.equal(res[0], "b");
},
| 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
|
(i=x)):i=s,f=[null,e][h?"reverse":"concat"]().concat([h?Z:D,H,i,e.equals(a.editable[h?"getLast":"getFirst"](a.isRelevant))?h?y:x:s]);return 0 in f?new u(f):null}function P(a,c,d,b){for(var e=function(){var b=n.ie?c.$.currentStyle:a.win.$.getComputedStyle(c.$,"");return n.ie?function(a){return b[CKEDITOR.tools.cssStyleToDomStyle(a)]}:function(a){return b.getPropertyValue(a)}}(),f=c.getDocumentPosition(),i={},h={},g={},j={},l=t.length;l--;)i[t[l]]=parseInt(e("border-"+t[l]+"-width"),10)||0,g[t[l]]=
parseInt(e("padding-"+t[l]),10)||0,h[t[l]]=parseInt(e("margin-"+t[l]),10)||0;(!d||b)&&I(a,b);j.top=f.y-(d?0:a.view.scroll.y);j.left=f.x-(d?0:a.view.scroll.x);j.outerWidth=c.$.offsetWidth;j.outerHeight=c.$.offsetHeight;j.height=j.outerHeight-(g.top+g.bottom+i.top+i.bottom);j.width=j.outerWidth-(g.left+g.right+i.left+i.right);j.bottom=j.top+j.outerHeight;j.right=j.left+j.outerWidth;a.inInlineMode&&(j.scroll={top:c.$.scrollTop,left:c.$.scrollLeft});return q({border:i,padding:g,margin:h,ignoreScroll:d},
j,!0)}function o(a,c,d){if(!m(c))return c.size=null;if(c.size){if(c.size.ignoreScroll==d&&c.size.date>new Date-ba)return null}else c.size={};return q(c.size,P(a,c,d),{date:+new Date},!0)}function C(a,c){a.view.editable=P(a,a.editable,c,!0)}function I(a,c){a.view||(a.view={});var d=a.view;if(c||!(d&&d.date>new Date-ba)){var b=a.win,d=b.getScrollPosition(),b=b.getViewPaneSize();q(a.view,{scroll:{x:d.x,y:d.y,width:a.doc.$.documentElement.scrollWidth-b.width,height:a.doc.$.documentElement.scrollHeight-
| 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
|
ta);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",ya,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function N(Aa,ta,ka){var oa=mxUtils.getOffset(u,!0),sa=mxUtils.getOffset(Aa,!0);ta.style.position="absolute";ta.style.left=sa.x-oa.x+"px";ta.style.top=sa.y-oa.y+"px";ta.style.width=Aa.offsetWidth+"px";ta.style.height=Aa.offsetHeight-(ka?4:0)+"px";ta.style.zIndex=5}function Q(Aa,ta,ka){var oa=document.createElement("div");oa.style.width="32px";oa.style.height=
"4px";oa.style.margin="2px";oa.style.border="1px solid black";oa.style.background=ta&&"none"!=ta?ta:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ta,function(ya){oa.style.background="none"==ya?"url('"+Dialog.prototype.noColorImage+"')":ya;T(Aa,ya,ka)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(oa);return btn}function R(Aa,ta,ka,oa,sa,ya,wa){null!=ta&&(ta=ta.split(","),
| 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
|
'" for="'+c.inputId+'"'+(a.labelStyle?' style="'+a.labelStyle+'"':"")+">"+CKEDITOR.tools.htmlEncode(a.label)+"</span>"},{type:"html",html:'<span class="cke_dialog_ui_labeled_content"'+(a.controlStyle?' style="'+a.controlStyle+'"':"")+">"+e.call(this,b,a)+"</span>"}]},CKEDITOR.dialog._.uiElementBuilders.hbox.build(b,d,f));return f.join("")})}},textInput:function(b,a,d){if(!(3>arguments.length)){i.call(this,a);var e=this._.inputId=CKEDITOR.tools.getNextId()+"_textInput",c={"class":"cke_dialog_ui_input_"+
| 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
|
wp.updates.installImporterError = function( response ) {
var errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage );
if ( ! wp.updates.isValidResponse( response, 'install' ) ) {
return;
}
if ( wp.updates.maybeHandleCredentialError( response, 'install-plugin' ) ) {
return;
}
wp.updates.addAdminNotice( {
id: response.errorCode,
className: 'notice-error is-dismissible',
message: errorMessage
} );
$( 'a[href*="' + response.slug + '"]' ).removeClass( 'updating-message' );
wp.a11y.speak( errorMessage, 'assertive' );
$document.trigger( 'wp-importer-install-error', 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
|
u[D]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var z=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var D=z.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[u]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
| 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
|
"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=v?"&scale="+v:"")+(null!=x?"&border="+x:"")+(M&&isFinite(M)?"&w="+M:"")+(n&&isFinite(n)?"&h="+n:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var k=window.location.hash,m=mxUtils.bind(this,function(q){var v=null!=c.data?c.data:"";null!=q&&0<q.length&&(0<v.length&&(v+="\n"),v+=q);q=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
| 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
|
mxUtils.convertPoint(m.container,mxEvent.getClientX(E),mxEvent.getClientY(E));mxEvent.consume(E);E=m.view.scale;var S=m.view.translate;m.setSelectionCell(t((H.x-3*E)/E-S.x,(H.y-3*E)/E-S.y))}};u=new mxKeyHandler(m);u.bindKey(46,D);u.bindKey(8,D);m.getRubberband().isForceRubberbandEvent=function(E){return 0==E.evt.button&&(null==E.getCell()||E.getCell()==q)};m.panningHandler.isForcePanningEvent=function(E){return 2==E.evt.button};var v=m.isCellSelectable;m.isCellSelectable=function(E){return E==q?!1:
v.apply(this,arguments)};m.getLinkForCell=function(){return null};var x=m.view.getState(q);k=m.getAllConnectionConstraints(x);for(var A=0;null!=k&&A<k.length;A++){var z=m.getConnectionPoint(x,k[A]);t(z.x-3,z.y-3)}m.fit(8);m.center();A=mxUtils.button("",function(){m.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
| 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
|
openssh_forwardOutStreamLocal(socketPath, cb) {
const opts = { socketPath };
openChannel(this, 'forwarded-streamlocal@openssh.com', opts, cb);
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
|
DotObject.prototype._fill = function (a, obj, v, mod) {
var k = a.shift()
if (a.length > 0) {
obj[k] = obj[k] ||
(this.useArray && isIndex(a[0]) ? [] : {})
if (!isArrayOrObject(obj[k])) {
if (this.override) {
obj[k] = {}
} else {
if (!(isArrayOrObject(v) && isEmptyObject(v))) {
throw new Error(
'Trying to redefine `' + k + '` which is a ' + typeof obj[k]
)
}
return
}
}
this._fill(a, obj[k], v, mod)
} else {
if (!this.override &&
isArrayOrObject(obj[k]) && !isEmptyObject(obj[k])) {
if (!(isArrayOrObject(v) && isEmptyObject(v))) {
throw new Error("Trying to redefine non-empty obj['" + k + "']")
}
return
}
obj[k] = _process(v, mod)
}
}
| 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
|
object: function() {
var properties = [], property;
if (this.peekToken().text !== '}') {
do {
if (this.peek('}')) {
// Support trailing commas per ES5.1.
break;
}
property = {type: AST.Property, kind: 'init'};
if (this.peek().constant) {
property.key = this.constant();
property.computed = false;
this.consume(':');
property.value = this.expression();
} else if (this.peek().identifier) {
property.key = this.identifier();
property.computed = false;
if (this.peek(':')) {
this.consume(':');
property.value = this.expression();
} else {
property.value = property.key;
}
} else if (this.peek('[')) {
this.consume('[');
property.key = this.expression();
this.consume(']');
property.computed = true;
this.consume(':');
property.value = this.expression();
} else {
this.throwError('invalid key', this.peek());
}
properties.push(property);
} while (this.expect(','));
}
this.consume('}');
return {type: AST.ObjectExpression, properties: properties };
},
| 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
|
module.exports = function newline(state, silent) {
var pmax, max, ws, pos = state.pos;
if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; }
pmax = state.pending.length - 1;
max = state.posMax;
// ' \n' -> hardbreak
// Lookup in pending chars is bad practice! Don't copy to other rules!
// Pending string is stored in concat mode, indexed lookups will cause
// convertion to flat mode.
if (!silent) {
if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) {
if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) {
// Find whitespaces tail of pending chars.
ws = pmax - 1;
while (ws >= 1 && state.pending.charCodeAt(ws - 1) === 0x20) ws--;
state.pending = state.pending.slice(0, ws);
state.push('hardbreak', 'br', 0);
} else {
state.pending = state.pending.slice(0, -1);
state.push('softbreak', 'br', 0);
}
} else {
state.push('softbreak', 'br', 0);
}
}
pos++;
// skip heading spaces for next line
while (pos < max && isSpace(state.src.charCodeAt(pos))) { pos++; }
state.pos = pos;
return true;
};
| 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
|
relatedTypeString: this.translateEntityType(this.entityType),
iconHtml: this.getIconHtml(this.entityType, this.entityId)
}, Dep.prototype.data.call(this));
},
init: function () {
if (this.getUser().isAdmin()) {
this.isRemovable = true;
}
Dep.prototype.init.call(this);
},
setup: function () {
var data = this.model.get('data') || {};
this.entityType = this.model.get('relatedType') || data.entityType || null;
this.entityId = this.model.get('relatedId') || data.entityId || null;
this.entityName = this.model.get('relatedName') || data.entityName || null;
this.messageData['relatedEntityType'] = this.translateEntityType(this.entityType);
this.messageData['relatedEntity'] = '<a href="#' + this.getHelper().escapeString(this.entityType) + '/view/' + this.getHelper().escapeString(this.entityId) + '">' + this.getHelper().escapeString(this.entityName) +'</a>';
this.createMessage();
}
});
});
| 1 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
safe
|
"/images/"+ma+".svg";return!0}function M(fa,ca,ba,ja){function ia(na,Ja){null==qa?(na=/^https?:\/\//.test(na)&&!b.editor.isCorsEnabledForUrl(na)?PROXY_URL+"?url="+encodeURIComponent(na):TEMPLATE_PATH+"/"+na,mxUtils.get(na,mxUtils.bind(this,function(Ga){200<=Ga.getStatus()&&299>=Ga.getStatus()&&(qa=Ga.getText());Ja(qa)}))):Ja(qa)}function ma(na,Ja,Ga){if(null!=na&&mxUtils.isAncestorNode(document.body,ca)&&(na=mxUtils.parseXml(na),na=Editor.extractGraphModel(na.documentElement,!0),null!=na)){"mxfile"==
na.nodeName&&(na=Editor.parseDiagramNode(na.getElementsByTagName("diagram")[0]));var Ra=new mxCodec(na.ownerDocument),Sa=new mxGraphModel;Ra.decode(na,Sa);na=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(ca,na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(Ja,
Ga),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";Q.appendChild(Ha);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(Q.removeChild(Ha),Ha=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ca||b.sidebar.currentElt==ca)b.sidebar.hideTooltip();else{var oa=function(na){Ca&&b.sidebar.currentElt==ca&&ma(na,mxEvent.getClientX(ja),mxEvent.getClientY(ja));Ca=!1;
ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ca;Ca=!0;ba.src="/images/aui-wait.gif";fa.isExt?e(fa,oa,function(){A(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):ia(fa.url,oa)}}function n(fa,ca,ba){if(null!=C){for(var ja=C.className.split(" "),ia=0;ia<ja.length;ia++)if(-1<ja[ia].indexOf("Active")){ja.splice(ia,1);break}C.className=ja.join(" ")}null!=fa?(C=fa,C.className+=" "+ca,I=ba,Ba.className="geTempDlgCreateBtn"):(I=C=null,Ba.className=
| 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
|
add = function(dir) {
var node, hash;
if (dir.mime !== 'directory') {
return false;
}
hash = dir.hash;
if (!fm.files().hasOwnProperty(hash)) {
// update cache
fm.trigger('tree', {tree: [dir]});
}
node = create(dir, hash);
if (dir.notfound) {
node.addClass('ui-state-disabled');
}
dirs[hash] = dir;
subtree.prepend(node);
root.addClass(collapsed);
return true;
},
| 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
|
m=P.name;v="";O(null,!0)})));k.appendChild(F)})(E[G],G)}100==E.length&&(k.appendChild(A),B=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",B))}),y)});t()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
| 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
|
null!=this.linkHint&&(this.linkHint.style.visibility="")};var Za=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Za.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function F(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
| 0 |
JavaScript
|
CWE-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
|
reply: () => Promise.resolve()
};
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
beforeEach(() => {
sandbox = sinon.sandbox.create().usingPromise(Promise);
sandbox.spy(mockClient, 'reply');
});
afterEach(() => {
sandbox.restore();
});
it('// unsuccessful', () => {
return cmdFn()
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(501);
});
});
it('BAD // unsuccessful', () => {
return cmdFn({command: {arg: 'BAD', directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(500);
});
});
it('UTF8 BAD // unsuccessful', () => {
return cmdFn({command: {arg: 'UTF8 BAD', directive: CMD}})
.then(() => {
expect(mockClient.reply.args[0][0]).to.equal(501);
});
});
it('UTF8 OFF // successful', () => {
return cmdFn({command: {arg: 'UTF8 OFF', directive: CMD}})
.then(() => {
expect(mockClient.encoding).to.equal('ascii');
expect(mockClient.reply.args[0][0]).to.equal(200);
});
});
it('UTF8 ON // successful', () => {
return cmdFn({command: {arg: 'UTF8 ON', directive: CMD}})
.then(() => {
expect(mockClient.encoding).to.equal('utf8');
expect(mockClient.reply.args[0][0]).to.equal(200);
});
});
});
| 0 |
JavaScript
|
CWE-918
|
Server-Side Request Forgery (SSRF)
|
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
|
https://cwe.mitre.org/data/definitions/918.html
|
vulnerable
|
window.ocJSON=function(json){var jsonString=parse(json);return JSON.parse(jsonString);};}(window);+function(window){"use strict";function trimAttributes(node){$.each(node.attributes,function(){var attrName=this.name;var attrValue=this.value;if(attrName.indexOf('on')==0||attrValue.indexOf('javascript:')==0){$(node).removeAttr(attrName);}});}
| 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
|
exports.set = function(obj, path, value) {
var cachekey = 'S+' + path;
if (F.temporary.other[cachekey])
return F.temporary.other[cachekey](obj, value);
if ((/__proto__|constructor|prototype|eval|function|\*|\+|;|\s|\(|\)|!/).test(path))
return value;
var arr = parsepath(path);
var builder = [];
for (var i = 0; i < arr.length - 1; i++) {
var type = arr[i + 1] ? (REGISARR.test(arr[i + 1]) ? '[]' : '{}') : '{}';
var p = 'w' + (arr[i][0] === '[' ? '' : '.') + arr[i];
builder.push('if(typeof(' + p + ')!==\'object\'||' + p + '==null)' + p + '=' + type + ';');
}
var v = arr[arr.length - 1];
var ispush = v.lastIndexOf('[]') !== -1;
var a = builder.join(';') + ';var v=typeof(a)===\'function\'?a(U.get(b)):a;w' + (v[0] === '[' ? '' : '.') + (ispush ? v.replace(REGREPLACEARR, '.push(v)') : (v + '=v')) + ';return v';
var fn = new Function('w', 'a', 'b', a);
F.temporary.other[cachekey] = fn;
return fn(obj, value, path);
};
| 1 |
JavaScript
|
CWE-94
|
Improper Control of Generation of Code ('Code Injection')
|
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
|
https://cwe.mitre.org/data/definitions/94.html
|
safe
|
d(null,null,0,0,0,0,{xml:X,w:ea.width,h:ea.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function g(E){E.dataTransfer.dropEffect=null!=B?"move":"copy";E.stopPropagation();E.preventDefault()}function k(E){E.stopPropagation();E.preventDefault();z=!1;I=v(E);if(null!=B)null!=I&&I<x.children.length?(l.splice(I>B?I-1:I,0,l.splice(B,1)[0]),x.insertBefore(x.children[B],x.children[I])):(l.push(l.splice(B,1)[0]),x.appendChild(x.children[B]));
| 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.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function ab(){mxRectangleShape.call(this)}function Ka(){mxActor.call(this)}function bb(){mxActor.call(this)}function Pa(){mxActor.call(this)}function Za(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function ma(){mxEllipse.call(this)}
| 0 |
JavaScript
|
CWE-20
|
Improper Input Validation
|
The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly.
|
https://cwe.mitre.org/data/definitions/20.html
|
vulnerable
|
value = value.replace(/href=" *javascript\:(.*?)"/gi, function(m, $1) {
return 'removed=""';
});
| 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
|
f.getCell(x),null!=v&&v!=q&&(q=null));null!=q&&(f.getChildAt(l,c)!=q&&f.add(l,q,c),this.patchCellRecursive(b,f,q,d,u),c++);return x});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=t[k],null!=m&&(delete t[k],g.push({child:f.getCell(m)})),m=D[k],null!=m&&(delete D[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in t)g.push({child:f.getCell(t[k])}),delete t[k];for(k in D)g.push({child:this.getCellForJson(D[k]),insert:!0}),delete D[k]}}};
| 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
|
$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 ' + targetForeignSource + ', using ' + 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 ' + foreignSource + ' has been cloned to ' + targetForeignSource);
},
$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
|
var InputToolTip = function() {
WrappedElement.call(this);
this._promptText = gettext('search or ask your question');
};
| 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
|
Editor.isDarkMode()?Editor.darkColor:"#ffffff";P.style.overflow="hidden";P.style.textAlign="center";var T=null;null!=B?(T={data:B,w:F,h:J,title:O},null!=W&&(T.aspect=W),z[B]=I,k.push(T)):null!=R&&(R.aspect="fixed",k.push(R),T=R);mxEvent.addListener(P,"keydown",function(Z){13==Z.keyCode&&null!=N&&(N(),N=null,mxEvent.consume(Z))});V();D.appendChild(P);mxEvent.addListener(P,"mousedown",function(Z){"true"!=P.getAttribute("contentEditable")&&mxEvent.consume(Z)});S=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
!(null==document.documentMode||9<document.documentMode)){var ka=new FilenameDialog(b,T.title||"",mxResources.get("ok"),function(da){null!=da&&(T.title=da,V())},mxResources.get("enterValue"));b.showDialog(ka.container,300,80,!0,!0);ka.init();mxEvent.consume(Z)}else if("true"!=P.getAttribute("contentEditable")){null!=N&&(N(),N=null);if(null==T.title||0==T.title.length)P.innerHTML="";P.style.textOverflow="";P.style.whiteSpace="";P.style.cursor="text";P.style.color="";P.setAttribute("contentEditable",
"true");mxUtils.setPrefixedStyle(P.style,"user-select","text");P.focus();document.execCommand("selectAll",!1,null);N=function(){P.removeAttribute("contentEditable");P.style.cursor="pointer";T.title=P.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(P,"click",S);mxEvent.addListener(D,"dblclick",S);v.appendChild(D);mxEvent.addListener(D,"dragstart",function(Z){null==B&&null!=R&&(Q.style.visibility="hidden",P.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
| 0 |
JavaScript
|
CWE-94
|
Improper Control of Generation of Code ('Code Injection')
|
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
|
https://cwe.mitre.org/data/definitions/94.html
|
vulnerable
|
noteRenderer: function(note) {
var recordClass = Tine.Tinebase.data.RecordMgr.get(this.record_model),
app = Tine.Tinebase.appMgr.get(this.app);
note = Ext.util.Format.htmlEncode(note);
if (recordClass) {
Ext.each(recordClass.getFieldDefinitions(), function(field) {
if (field.label) {
note = String(note).replace(field.name, '<br>' + app.i18n._hidden(field.label));
//map[field.name] = '<br>' + this.app.i18n._hidden(field.label);
}
}, this);
}
return note;
},
| 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
|
_size ({ id, token }, done) {
return this.client
.get(`https://graph.facebook.com/${id}`)
.qs({ fields: 'images' })
.auth(token)
.request((err, resp, body) => {
if (err || resp.statusCode !== 200) {
err = this._error(err, resp)
logger.error(err, 'provider.facebook.size.error')
return done(err)
}
getURLMeta(this._getMediaUrl(body), true)
.then(({ size }) => done(null, size))
.catch((err2) => {
logger.error(err2, 'provider.facebook.size.error')
done(err2)
})
})
}
| 1 |
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
|
safe
|
T[N],"cells"),this.updateCustomLinkAction(u,T[N],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,D,K){if(null!=D&&null!=D[K]){for(var T=[],N=0;N<D[K].length;N++)if("*"==D[K][N])T.push(D[K][N]);else{var Q=u[D[K][N]];null!=Q?""!=Q&&T.push(Q):T.push(D[K][N])}D[K]=T}};Graph.prototype.getCellsForAction=function(u,D){D=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,D));if(null!=u.excludeCells){for(var K=[],T=0;T<D.length;T++)0>u.excludeCells.indexOf(D[T].id)&&K.push(D[T]);
D=K}return D};Graph.prototype.getCellsById=function(u){var D=[];if(null!=u)for(var K=0;K<u.length;K++)if("*"==u[K]){var T=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var N=this.model.getCell(u[K]);null!=N&&D.push(N)}return D};var S=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return S.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||
| 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
|
App.Actions.DB.update_dns_record_hint = function(elm, hint) {
// clean hint
if (hint.trim() == '') {
$(elm).parent().find('.hint').html('');
}
// set domain name without rec in case of @ entries
if (hint == '@') {
hint = '';
}
// dont show pregix if domain name = rec value
if (hint == GLOBAL.DNS_REC_PREFIX + '.') {
hint = '';
}
// add dot at the end if needed
if (hint != '' && hint.slice(-1) != '.') {
hint += '.';
}
$(elm).parent().find('.hint').text(hint + GLOBAL.DNS_REC_PREFIX);
}
| 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
|
_currentRules:function _currentRules () {
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
} else {
return this.conditions["INITIAL"].rules;
}
},
| 1 |
JavaScript
|
CWE-94
|
Improper Control of Generation of Code ('Code Injection')
|
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
|
https://cwe.mitre.org/data/definitions/94.html
|
safe
|
var abplinkhandler = function(event) {
event.preventDefault();
var searchquery = this.href.replace(/^.+?\?/, '?');
if (searchquery) {
var queryparts = parseUri.parseSearch(searchquery);
var loc = queryparts.location;
var reqLoc = queryparts.requiresLocation;
var reqList = (reqLoc ? "url:" + reqLoc : undefined);
var title = queryparts.title;
BGcall("subscribe", {id: "url:" + loc, requires: reqList, title: title});
// Open subscribe popup
if (SAFARI) {
// In Safari, window.open() cannot be used
// to open a new window from our global HTML file
window.open(chrome.extension.getURL('pages/subscribe.html?' + loc),
"_blank",
'scrollbars=0,location=0,resizable=0,width=450,height=150');
} else {
BGcall("launch_subscribe_popup", loc);
}
}
};
| 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
|
function removeActiveClass($target) {
$target.find('button').removeClass('active');
$selectedNode = null;
}
| 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(){function O(ua,ya,Na){var Fa=U.menus.get(ua),Ra=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),P);Ra.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ra.style.display="inline-block";Ra.style.boxSizing="border-box";Ra.style.top="6px";Ra.style.marginRight="6px";Ra.style.height="30px";Ra.style.paddingTop="6px";Ra.style.paddingBottom="6px";Ra.style.cursor="pointer";Ra.setAttribute("title",mxResources.get(ua));U.menus.menuCreated(Fa,
Ra,"geMenuItem");null!=Na?(Ra.style.backgroundImage="url("+Na+")",Ra.style.backgroundPosition="center center",Ra.style.backgroundRepeat="no-repeat",Ra.style.backgroundSize="24px 24px",Ra.style.width="34px",Ra.innerHTML=""):ya||(Ra.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ra.style.backgroundPosition="right 6px center",Ra.style.backgroundRepeat="no-repeat",Ra.style.paddingRight="22px");return Ra}function X(ua,ya,Na,Fa,Ra,db){var Va=document.createElement("a");Va.className=
| 0 |
JavaScript
|
CWE-94
|
Improper Control of Generation of Code ('Code Injection')
|
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
|
https://cwe.mitre.org/data/definitions/94.html
|
vulnerable
|
return tag(tagName, { classes: field.classes() }, wrappedContent.join(''), true);
};
| 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,b){if(a){var c=function(){b(a.lazySizes),a.removeEventListener("lazyunveilread",c,!0)};b=b.bind(null,a,a.document),"object"==typeof module&&module.exports?b(require("lazysizes")):a.lazySizes?c():a.addEventListener("lazyunveilread",c,!0)}}("undefined"!=typeof window?window:0,function(a,b,c){"use strict";function d(c,d){var e="vimeoCallback"+j,f=b.createElement("script");c+="&callback="+e,j++,a[e]=function(b){f.parentNode.removeChild(f),delete a[e],d(b)},f.src=c,b.head.appendChild(f)}function e(a,b){d(p.replace(k,a),function(a){a&&a.thumbnail_url&&(b.style.backgroundImage="url("+a.thumbnail_url+")")}),b.addEventListener("click",f)}function f(a){var b=a.currentTarget,c=b.getAttribute("data-vimeo"),d=b.getAttribute("data-vimeoparams")||"";d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+q.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>',b.removeEventListener("click",f)}function g(a,b){var d=b.getAttribute("data-thumb-size")||c.cfg.ytThumb||"hqdefault";b.style.backgroundImage="url("+n.replace(k,a).replace(l,d)+")",b.addEventListener("click",h)}function h(a){var b=a.currentTarget,c=b.getAttribute("data-youtube"),d=b.getAttribute("data-ytparams")||"";d&&!m.test(d)&&(d="&"+d),a.preventDefault(),b.innerHTML='<iframe src="'+o.replace(k,c)+d+'" frameborder="0" allowfullscreen="" width="640" height="390"></iframe>',b.removeEventListener("click",h)}if(b.getElementsByClassName){var i="https:"==location.protocol?"https:":"http:",j=Date.now(),k=/\{\{id}}/,l=/\{\{hqdefault}}/,m=/^&/,n=i+"//img.youtube.com/vi/{{id}}/{{hqdefault}}.jpg",o=i+"//www.youtube.com/embed/{{id}}?autoplay=1",p=i+"//vimeo.com/api/oembed.json?url=https%3A//vimeo.com/{{id}}",q=i+"//player.vimeo.com/video/{{id}}?autoplay=1";b.addEventListener("lazybeforeunveil",function(a){if(a.detail.instance==c){var b=a.target,d=b.getAttribute("data-youtube"),f=b.getAttribute("data-vimeo");d&&b&&g(d,b),f&&b&&e(f,b)}})}});
| 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
|
$scope.reset = function() {
bootbox.confirm('Are you sure you want to reset the foreign source definition to the default ?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteForeignSourceDefinition($scope.foreignSource).then(
function() { // success
growl.success('The foreign source definition for ' + $scope.foreignSource + 'has been reseted.');
$scope.initialize();
},
$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)});b.on("destroy",function(){clearTimeout(a)});e.on("keyup",s)}function c(e){return{type:e,canUndo:"cut"==e,startDisabled:!0,exec:function(){"cut"==this.type&&i();var e;var a=this.type;if(CKEDITOR.env.ie)e=l(a);else try{e=b.document.$.execCommand(a,!1,null)}catch(d){e=!1}e||alert(b.lang.clipboard[this.type+"Error"]);return e}}}function d(){return{canUndo:!1,async:!0,exec:function(b,a){var d=function(a,d){a&&g(a.type,a.dataValue,!!d);b.fire("afterCommandExec",{name:"paste",command:c,returnValue:!!a})},
c=this;"string"==typeof a?d({type:"auto",dataValue:a},1):b.getClipboardData(d)}}}function f(){r=1;setTimeout(function(){r=0},100)}function h(){n=1;setTimeout(function(){n=0},10)}function l(e){var a=b.document,d=a.getBody(),c=!1,i=function(){c=!0};d.on(e,i);(7<CKEDITOR.env.version?a.$:a.$.selection.createRange()).execCommand(e);d.removeListener(e,i);return c}function g(e,a,d){e={type:e};if(d&&!b.fire("beforePaste",e)||!a)return!1;e.dataValue=a;return b.fire("paste",e)}function i(){if(CKEDITOR.env.ie&&
| 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
|
p[C]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(p){var C=y.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[p]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var p=this.themes["default-style2"];this.defaultStylesheet=
| 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
|
if(i===k)return a.iDrawError!=e&&null===j&&(K(a,0,"Requested unknown parameter "+("function"==typeof f.mData?"{function}":"'"+f.mData+"'")+" for row "+b+", column "+c,4),a.iDrawError=e),j;if((i===g||null===i)&&null!==j)i=j;else if("function"===typeof i)return i.call(g);return null===i&&"display"==d?"":i}function jb(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d,{settings:a,row:b,col:c})}function La(a){return h.map(a.match(/(\\.|[^\.])+/g)||[""],function(a){return a.replace(/\\./g,".")})}function Q(a){if(h.isPlainObject(a)){var b=
{};h.each(a,function(a,c){c&&(b[a]=Q(c))});return function(a,c,f,g){var j=b[c]||b._;return j!==k?j(a,c,f,g):a}}if(null===a)return function(a){return a};if("function"===typeof a)return function(b,c,f,g){return a(b,c,f,g)};if("string"===typeof a&&(-1!==a.indexOf(".")||-1!==a.indexOf("[")||-1!==a.indexOf("("))){var c=function(a,b,f){var g,j;if(""!==f){j=La(f);for(var i=0,o=j.length;i<o;i++){f=j[i].match(da);g=j[i].match(V);if(f){j[i]=j[i].replace(da,"");""!==j[i]&&(a=a[j[i]]);g=[];j.splice(0,i+1);j=
j.join(".");if(h.isArray(a)){i=0;for(o=a.length;i<o;i++)g.push(c(a[i],b,j))}a=f[0].substring(1,f[0].length-1);a=""===a?g:g.join(a);break}else if(g){j[i]=j[i].replace(V,"");a=a[j[i]]();continue}if(null===a||a[j[i]]===k)return k;a=a[j[i]]}}return a};return function(b,e){return c(b,e,a)}}return function(b){return b[a]}}function R(a){if(h.isPlainObject(a))return R(a._);if(null===a)return function(){};if("function"===typeof a)return function(b,d,e){a(b,"set",d,e)};if("string"===typeof a&&(-1!==a.indexOf(".")||
| 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
|
App.prototype.updateUserElement = function()
{
appUpdateUserElement.apply(this, arguments);
if (this.userElement != null)
{
var elt = this.userElement;
elt.style.cssText = 'position:relative;margin-right:4px;cursor:pointer;display:' + elt.style.display;
elt.className = 'geToolbarButton';
elt.innerHTML = '';
elt.style.backgroundImage = 'url(' + Editor.userImage + ')';
elt.style.backgroundPosition = 'center center';
elt.style.backgroundRepeat = 'no-repeat';
elt.style.backgroundSize = '24px 24px';
elt.style.height = '24px';
elt.style.width = '24px';
elt.style.cssFloat = 'right';
elt.setAttribute('title', mxResources.get('changeUser'));
if (elt.style.display != 'none')
{
elt.style.display = 'inline-block';
var file = this.getCurrentFile();
if (file != null && file.isRealtimeEnabled() && file.isRealtimeSupported())
{
var icon = document.createElement('img');
icon.setAttribute('border', '0');
icon.style.position = 'absolute';
icon.style.left = '18px';
icon.style.top = '2px';
icon.style.width = '12px';
icon.style.height = '12px';
// icon.style.cursor = 'default';
var err = file.getRealtimeError();
var state = file.getRealtimeState();
var status = mxResources.get('realtimeCollaboration');
if (state == 1)
{
icon.src = Editor.syncImage;
status += ' (' + mxResources.get('online') + ')';
}
else
{
icon.src = Editor.syncProblemImage;
if (err != null && err.message != null)
{
status += ' (' + err.message + ')';
}
else
{
status += ' (' + mxResources.get('disconnected') + ')';
}
}
icon.setAttribute('title', status);
elt.style.paddingRight = '4px';
elt.appendChild(icon);
}
}
}
};
| 0 |
JavaScript
|
CWE-94
|
Improper Control of Generation of Code ('Code Injection')
|
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
|
https://cwe.mitre.org/data/definitions/94.html
|
vulnerable
|
(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.1.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
| 0 |
JavaScript
|
CWE-918
|
Server-Side Request Forgery (SSRF)
|
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
|
https://cwe.mitre.org/data/definitions/918.html
|
vulnerable
|
validateFile: function (file, editor) {
const aDeferred = jQuery.Deferred();
if (file.size > CONFIG['maxUploadLimit']) {
aDeferred.reject(app.vtranslate('JS_UPLOADED_FILE_SIZE_EXCEEDS'));
}
this.readAndValidate(file, editor)
.done(function (base) {
aDeferred.resolve(base);
})
.fail(function (error) {
aDeferred.reject(error);
});
return aDeferred.promise();
},
| 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(){function w(a){if(!a)throw"Languages-by-groups list are required for construct selectbox";var c=[],d="",f;for(f in a)for(var g in a[f]){var h=a[f][g];"en_US"==h?d=h:c.push(h)}c.sort();d&&c.unshift(d);return{getCurrentLangGroup:function(c){a:{for(var d in a)for(var f in a[d])if(f.toUpperCase()===c.toUpperCase()){c=d;break a}c=""}return c},setLangList:function(){var c={},d;for(d in a)for(var f in a[d])c[a[d][f]]=f;return c}()}}var e=function(){var a=function(a,b,f){var f=f||{},g=f.expires;
if("number"==typeof g&&g){var h=new Date;h.setTime(h.getTime()+1E3*g);g=f.expires=h}g&&g.toUTCString&&(f.expires=g.toUTCString());var b=encodeURIComponent(b),a=a+"="+b,e;for(e in f)b=f[e],a+="; "+e,!0!==b&&(a+="="+b);document.cookie=a};return{postMessage:{init:function(a){document.addEventListener?window.addEventListener("message",a,!1):window.attachEvent("onmessage",a)},send:function(a){var b=a.fn||null,f=a.id||"",g=a.target||window,h=a.message||{id:f};"[object Object]"==Object.prototype.toString.call(a.message)&&
(a.message.id||(a.message.id=f),h=a.message);a=window.JSON.stringify(h,b);g.postMessage(a,"*")}},hash:{create:function(){},parse:function(){}},cookie:{set:a,get:function(a){return(a=document.cookie.match(RegExp("(?:^|; )"+a.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)")))?decodeURIComponent(a[1]):void 0},remove:function(c){a(c,"",{expires:-1})}}}}(),a=a||{};a.TextAreaNumber=null;a.load=!0;a.cmd={SpellTab:"spell",Thesaurus:"thes",GrammTab:"grammar"};a.dialog=null;a.optionNode=null;a.selectNode=
| 1 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
safe
|
Graph.sanitizeHtml=function(b,e){return DOMPurify.sanitize(b,{ADD_ATTR:["target"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i})};Graph.sanitizeSvg=function(b){return DOMPurify.sanitize(b,{IN_PLACE:!0})};
| 0 |
JavaScript
|
CWE-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
|
Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,E){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,E,J,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
| 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 error(name, file, elem, reason)
{
if (isFunction(options.error))
options.error({name: name}, file, elem, reason);
}
| 1 |
JavaScript
|
CWE-1236
|
Improper Neutralization of Formula Elements in a CSV File
|
The software saves user-provided information into a Comma-Separated Value (CSV) file, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as a command when the file is opened by spreadsheet software.
|
https://cwe.mitre.org/data/definitions/1236.html
|
safe
|
CKEDITOR.tools.extend(CKEDITOR.dom.node.prototype,{appendTo:function(a,e){a.append(this,e);return a},clone:function(a,e){var b=this.$.cloneNode(a),c=function(d){d["data-cke-expando"]&&(d["data-cke-expando"]=false);if(d.nodeType==CKEDITOR.NODE_ELEMENT){e||d.removeAttribute("id",false);if(a)for(var d=d.childNodes,b=0;b<d.length;b++)c(d[b])}};c(b);return new CKEDITOR.dom.node(b)},hasPrevious:function(){return!!this.$.previousSibling},hasNext:function(){return!!this.$.nextSibling},insertAfter:function(a){a.$.parentNode.insertBefore(this.$,
a.$.nextSibling);return a},insertBefore:function(a){a.$.parentNode.insertBefore(this.$,a.$);return a},insertBeforeMe:function(a){this.$.parentNode.insertBefore(a.$,this.$);return a},getAddress:function(a){for(var e=[],b=this.getDocument().$.documentElement,c=this.$;c&&c!=b;){var d=c.parentNode;d&&e.unshift(this.getIndex.call({$:c},a));c=d}return e},getDocument:function(){return new CKEDITOR.dom.document(this.$.ownerDocument||this.$.parentNode.ownerDocument)},getIndex:function(a){var e=this.$,b=-1,
| 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
|
if(jQuery)(function(jQuery){jQuery.extend(jQuery.fn,{uploadify:function(options){jQuery(this).each(function(){settings=jQuery.extend({id:jQuery(this).attr('id'),uploader:'uploadify.swf',script:'uploadify.php',expressInstall:null,folder:'',height:30,width:110,cancelImg:'cancel.png',wmode:'opaque',scriptAccess:'sameDomain',fileDataName:'Filedata',method:'POST',queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:'percentage',onInit:function(){},onSelect:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},options);var pagePath=location.pathname;pagePath=pagePath.split('/');pagePath.pop();pagePath=pagePath.join('/')+'/';var data={};data.uploadifyID=settings.id;data.pagepath=pagePath;if(settings.buttonImg)data.buttonImg=escape(settings.buttonImg);if(settings.buttonText)data.buttonText=escape(settings.buttonText);if(settings.rollover)data.rollover=true;data.script=settings.script;data.folder=escape(settings.folder);if(settings.scriptData){var scriptDataString='';for(var name in settings.scriptData){scriptDataString+='&'+name+'='+settings.scriptData[name];}
| 0 |
JavaScript
|
CWE-20
|
Improper Input Validation
|
The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly.
|
https://cwe.mitre.org/data/definitions/20.html
|
vulnerable
|
this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):K.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var Q=this.graph.getCellStyle(N);if(null!=Q&&"rack"==Q.childLayout){var R=new mxStackLayout(this.graph,!1);R.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;R.marginLeft=Q.marginLeft||0;R.marginRight=Q.marginRight||0;R.marginTop=Q.marginTop||0;R.marginBottom=
Q.marginBottom||0;R.allowGaps=Q.allowGaps||0;R.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");R.resizeParent=!1;R.fill=!0;return R}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var B=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,D){return Graph.processFontStyle(B.apply(this,arguments))};var I=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,D,K,T,N,Q,R,Y,ba,ea,Z){I.apply(this,arguments);Graph.processFontAttributes(Z)};
| 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.updateCounter = function (counter) {
if (counter === undefined) {
this.getAdaptersInfo(this.main.currentHost, false, false, function (repository, installedList) {
let adaptersToUpdate = 0;
for (const adapter in installedList) {
if (!installedList.hasOwnProperty(adapter)) continue;
const obj = installedList ? installedList[adapter] : null;
if (!obj || obj.controller || adapter === 'hosts') continue;
let version = '';
if (repository[adapter] && repository[adapter].version) {
version = repository[adapter].version;
}
if (obj.version && !that.main.upToDate(version, obj.version)) {
adaptersToUpdate++;
}
}
that.updateCounter(adaptersToUpdate);
});
} else if (counter) {
const $updates = $('#updates-for-adapters');
if ($updates.length) {
$updates.text(counter);
} else {
$('<span id="updates-for-adapters" title="' + _('updates') + '" class="new badge updates-for-adapters" data-badge-caption="">' + counter + '</span>').appendTo('.admin-sidemenu-items[data-tab="tab-adapters"] a');
}
} else {
$('#updates-for-adapters').remove();
}
};
| 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
|
Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var D=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(K,T,N,Q){void 0!==T?D.push(T.replace(/\\'/g,"'")):void 0!==N?D.push(N.replace(/\\"/g,
'"')):void 0!==Q&&D.push(Q);return""});/,\s*$/.test(u)&&D.push("");return D};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===
| 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
|
getSocket(options, callback) {
let socket = net.connect(PORT_NUMBER, 'localhost');
let errHandler = function (err) {
callback(err);
};
socket.on('error', errHandler);
socket.on('connect', function () {
socket.removeListener('error', errHandler);
callback(null, {
connection: socket
});
});
}
| 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
|
k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(J){var F=new mxCellOverlay(J.image||p.warningImage,J.tooltip,J.align,J.valign,J.offset);F.addListener(mxEvent.CLICK,function(H,S){l.alert(J.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
| 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.getStatus()&&300>=n.getStatus()?(this.updateDiagram(n.getText()),L()):this.handleError({message:mxResources.get("error")+" "+n.getStatus()}))}),mxUtils.bind(this,function(n){this.handleError(n)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(z,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();z()}));L();z()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(q){m(q)}),mxUtils.bind(this,function(q){null!=
| 0 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
vulnerable
|
clear_table() {
var dataLength = this.data.length;
for (var i=0; i<dataLength; i++) {
this.delete_row_index(i);
}
}
| 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
|
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,l,d,u){if(null!=f)for(var t=0;t<f.length;t++)null!=f[t]&&(b=this.patchPages(b,f[t],l,d,u));return b};
| 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
|
Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),E=0;do var J=this.model.getChildAt(this.model.root,E);while(E++<u&&"1"==mxUtils.getValue(this.getCellStyle(J),"locked","0"));null!=J&&this.setDefaultParent(J)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+
| 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
|
(c=new CKEDITOR.dom.walker(d),c.evaluator=i,d.endContainer=c.previous());if(b)return g(b)}return 0}function p(e,g){g||(g=e.contains(this.context));return g&&e.block&&e.block.equals(g.getFirst(i))}function i(e){return e.type==CKEDITOR.NODE_ELEMENT&&e.is("li")}function t(e){return u(e)&&v(e)}var u=CKEDITOR.dom.walker.whitespaces(!0),v=CKEDITOR.dom.walker.bookmark(!1,!0),q=CKEDITOR.TRISTATE_DISABLED,r=CKEDITOR.TRISTATE_OFF;CKEDITOR.plugins.add("indentlist",{requires:"indent",init:function(e){function g(e,
| 1 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
safe
|
J&&(J=b.shapeForegroundColor);return J};this.createStyle=function(J){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+J+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var J=[],F=0;F<v.length;F++)null!=v[F]&&J.push([v[F].x,v[F].y]);J=PerfectFreehand.getStroke(J,I);v=[];for(F=0;F<J.length;F++)v.push({x:J[F][0],y:J[F][1]});v.push(null)}J=v[0].x;var H=v[0].x,S=v[0].y,V=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(J=Math.max(J,v[F].x),H=Math.min(H,v[F].x),S=Math.max(S,
| 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 reqSubsystem(chan, name, cb) {
if (chan.outgoing.state !== 'open') {
cb(new Error('Channel is not open'));
return true;
}
chan._callbacks.push(function(had_err) {
if (had_err) {
return cb(had_err !== true
? had_err
: new Error('Unable to start subsystem: ' + name));
}
chan.subtype = 'subsystem';
cb(undefined, chan);
});
return chan._client._sshstream.subsystem(chan.outgoing.id, name, true);
}
| 0 |
JavaScript
|
CWE-78
|
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
|
The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
|
https://cwe.mitre.org/data/definitions/78.html
|
vulnerable
|
Wa,Xa,K,Ga,Ja,Ia,Ha);c.stroke()};Ea.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};Ea.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};Ea.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};Ea.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
| 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
|
let errHandler = function (err) {
callback(err);
};
| 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
|
'test delete': function () {
var obj = {};
obj.cool = {};
obj.cool.aid = 'rocks';
obj.cool.hello = ['world'];
dot.delete(obj, 'cool.aid');
dot.delete(obj, 'cool.hello.0');
assert(!obj.cool.hasOwnProperty('aid'))
assert(obj.cool.hello.length == 0);
}
| 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
|
shell(wndopts, opts, cb) {
if (!this._sock || !this._sock.writable)
throw new Error('Not connected');
if (typeof wndopts === 'function') {
cb = wndopts;
wndopts = opts = undefined;
} else if (typeof opts === 'function') {
cb = opts;
opts = undefined;
}
if (wndopts && (wndopts.x11 !== undefined || wndopts.env !== undefined)) {
opts = wndopts;
wndopts = undefined;
}
openChannel(this, 'session', (err, chan) => {
if (err) {
cb(err);
return;
}
const todo = [];
function reqCb(err) {
if (err) {
chan.close();
cb(err);
return;
}
if (todo.length)
todo.shift()();
}
if (this.config.allowAgentFwd === true
|| (opts
&& opts.agentForward === true
&& this.config.agent !== undefined)) {
todo.push(() => reqAgentFwd(chan, reqCb));
}
if (wndopts !== false)
todo.push(() => reqPty(chan, wndopts, reqCb));
if (typeof opts === 'object' && opts !== null) {
if (typeof opts.env === 'object' && opts.env !== null)
reqEnv(chan, opts.env);
if ((typeof opts.x11 === 'object' && opts.x11 !== null)
|| opts.x11 === 'number'
|| opts.x11 === true) {
todo.push(() => reqX11(chan, opts.x11, reqCb));
}
}
todo.push(() => reqShell(chan, cb));
todo.shift()();
});
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
|
mxResources.get("loading"))&&(c.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",J)})})}):mxscript("js/extensions.min.js",J))}var C=null,E=20,G=20,P=!0,J=function(){c.loadingOrgChart=!1;c.spinner.stop();if("undefined"!==typeof mxOrgChartLayout&&null!=C&&P){var X=c.editor.graph,u=new mxOrgChartLayout(X,C,
E,G),D=X.getDefaultParent();1<X.model.getChildCount(X.getSelectionCell())&&(D=X.getSelectionCell());u.execute(D);P=!1}},F=document.createElement("div"),H=document.createElement("div");H.style.marginTop="6px";H.style.display="inline-block";H.style.width="140px";mxUtils.write(H,mxResources.get("orgChartType")+": ");F.appendChild(H);var S=document.createElement("select");S.style.width="200px";S.style.boxSizing="border-box";H=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),
| 1 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
safe
|
K)));T=!0;for(var N=0;N<this.customFonts.length;N++)if(this.customFonts[N].name==D){T=!1;break}T&&(this.customFonts.push({name:D,url:K}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{V.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),z,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
| 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
|
E;var D=y(".odPreview"),K=y("#odFiles");b=function(N,Q){Q=Q||document;return Q.querySelectorAll(N)}(".odCatListTitle");for(E=0;E<b.length;E++)b[E].addEventListener("click",function(){H=U=null;if(!V)switch(L(this),this.id){case "odFiles":z();break;case "odRecent":z("recent");break;case "odShared":z("shared");break;case "odSharepoint":z("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(N){var Q=this;null!=T&&clearTimeout(T);13==N.keyCode?C(Q.value):T=setTimeout(function(){C(Q.value)},
| 1 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
safe
|
d.sSortableDesc,b.sSortingClassJUI=d.sSortJUIDescAllowed):(b.sSortingClass=d.sSortable,b.sSortingClassJUI=d.sSortJUI)}function U(a){if(!1!==a.oFeatures.bAutoWidth){var b=a.aoColumns;Ha(a);for(var c=0,d=b.length;c<d;c++)b[c].nTh.style.width=b[c].sWidth}b=a.oScroll;(""!==b.sY||""!==b.sX)&&Z(a);v(a,null,"column-sizing",[a])}function $(a,b){var c=aa(a,"bVisible");return"number"===typeof c[b]?c[b]:null}function ba(a,b){var c=aa(a,"bVisible"),c=h.inArray(b,c);return-1!==c?c:null}function ca(a){return aa(a,
"bVisible").length}function aa(a,b){var c=[];h.map(a.aoColumns,function(a,e){a[b]&&c.push(e)});return c}function Ia(a){var b=a.aoColumns,c=a.aoData,d=m.ext.type.detect,e,f,g,j,i,h,l,q,u;e=0;for(f=b.length;e<f;e++)if(l=b[e],u=[],!l.sType&&l._sManualType)l.sType=l._sManualType;else if(!l.sType){g=0;for(j=d.length;g<j;g++){i=0;for(h=c.length;i<h;i++){u[i]===k&&(u[i]=B(a,i,e,"type"));q=d[g](u[i],a);if(!q&&g!==d.length-1)break;if("html"===q)break}if(q){l.sType=q;break}}l.sType||(l.sType="string")}}function ib(a,
| 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 O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,E,J){function T(){for(var ja=R.getSelectionCells(),Ba=[],Ha=0;Ha<ja.length;Ha++)R.isCellVisible(ja[Ha])&&Ba.push(ja[Ha]);R.setSelectionCells(Ba)}function N(ja){R.hiddenTags=ja?[]:Y.slice();T();R.refresh()}function Q(ja,Ba){ea.innerHTML="";if(0<ja.length){var Ha=document.createElement("table");
| 0 |
JavaScript
|
CWE-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
|
_mdEmStrong(str) {
return str.replace(/(^|\s|")(\\?)(\*+)(\w[^<]*?)\3/g, (all, b, esc, md, text) => {
if (md.length == 1) return esc ? all.replace(/^\\/, '') : b + '<em>' + text + '</em>';
if (md.length == 2) return esc ? all.replace(/^\\/, '') : b + '<strong>' + text + '</strong>';
if (md.length == 3) return esc ? all.replace(/^\\/, '') : b + '<em><strong>' + text + '</strong></em>';
return all;
});
}
| 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.blockquote = function(quote) {
return '<blockquote>\n' + quote + '</blockquote>\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
|
$scope.delete = function(foreignSource) {
bootbox.confirm('Are you sure you want to remove the requisition ' + _.escape(foreignSource) + '?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteRequisition(foreignSource).then(
function() { // success
growl.success('The requisition ' + _.escape(foreignSource) + ' has been deleted.');
},
$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 policy = function (tagName, attribs) {
if (!(html4.ELEMENTS[tagName] & html4.eflags.UNSAFE)) {
return {
'attribs': sanitizeAttribs(tagName, attribs,
noop, noop, record_messages)
};
} else {
record_messages(tagName + " removed", {
change: "removed",
tagName: tagName
});
}
};
var sanitized = caja.sanitizeWithPolicy(html, policy);
if (allow_css) {
// sanitize style tags as stylesheets
sanitized = sanitize_stylesheets(sanitized, policy);
}
return sanitized;
};
| 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
|
window.location.hash=null!=x?x.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(v){null!=v?(this.fileLoaded(new StorageFile(this,v,b)),null!=d&&d()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else if(null!=l)this.spinner.stop(),
| 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
|
a.searchDelay?a.searchDelay:"ssp"===y(a)?400:0,i=h("input",b).val(e.sSearch).attr("placeholder",d.sSearchPlaceholder).bind("keyup.DT search.DT input.DT paste.DT cut.DT",g?ua(f,g):f).bind("keypress.DT",function(a) {if (13==a.keyCode)return!1}).attr("aria-controls",c);h(a.nTable).on("search.dt.DT",function(b,c) {if (a===c)try{i[0]!==H.activeElement&&i.val(e.sSearch)}catch(d) {}});return b[0]}function ha(a,b,c) {var d=a.oPreviousSearch,e=a.aoPreSearchCols,f=function(a) {d.sSearch=a.sSearch;d.bRegex=a.bRegex;
d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};Ia(a);if ("ssp"!=y(a)) {wb(a,b.sSearch,c,b.bEscapeRegex!==k?!b.bEscapeRegex:b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<e.length;b++)xb(a,e[b].sSearch,b,e[b].bEscapeRegex!==k?!e[b].bEscapeRegex:e[b].bRegex,e[b].bSmart,e[b].bCaseInsensitive);yb(a)}else f(b);a.bFiltered=!0;v(a,null,"search",[a])}function yb(a) {for(var b=m.ext.search,c=a.aiDisplay,d,e,f=0,g=b.length;f<g;f++) {for(var j=[],i=0,o=c.length;i<o;i++)e=c[i],d=a.aoData[e],b[f](a,
| 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
|
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-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.delete = function(foreignSource) {
bootbox.confirm('Are you sure you want to remove the requisition ' + _.escape(foreignSource) + '?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteRequisition(foreignSource).then(
function() { // success
growl.success('The requisition ' + _.escape(foreignSource) + ' has been deleted.');
},
$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
|
onHandshakeComplete: (negotiated) => {
if (++exchanges > 1)
this.emit('rekey');
this.emit('handshake', negotiated);
},
| 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 getCredentialsByURI (uri) {
assert(uri && typeof uri === 'string', 'registry URL is required')
var nerfed = toNerfDart(uri)
var defnerf = toNerfDart(this.get('registry'))
// hidden class micro-optimization
var c = {
scope: nerfed,
token: undefined,
password: undefined,
username: undefined,
email: undefined,
auth: undefined,
alwaysAuth: undefined
}
if (this.get(nerfed + ':_authToken')) {
c.token = this.get(nerfed + ':_authToken')
// the bearer token is enough, don't confuse things
return c
}
// Handle the old-style _auth=<base64> style for the default
// registry, if set.
//
// XXX(isaacs): Remove when npm 1.4 is no longer relevant
var authDef = this.get('_auth')
var userDef = this.get('username')
var passDef = this.get('_password')
if (authDef && !(userDef && passDef)) {
authDef = new Buffer(authDef, 'base64').toString()
authDef = authDef.split(':')
userDef = authDef.shift()
passDef = authDef.join(':')
}
if (this.get(nerfed + ':_password')) {
c.password = new Buffer(this.get(nerfed + ':_password'), 'base64').toString('utf8')
} else if (nerfed === defnerf && passDef) {
c.password = passDef
}
if (this.get(nerfed + ':username')) {
c.username = this.get(nerfed + ':username')
} else if (nerfed === defnerf && userDef) {
c.username = userDef
}
if (this.get(nerfed + ':email')) {
c.email = this.get(nerfed + ':email')
} else if (this.get('email')) {
c.email = this.get('email')
}
if (this.get(nerfed + ':always-auth') !== undefined) {
var val = this.get(nerfed + ':always-auth')
c.alwaysAuth = val === 'false' ? false : !!val
} else if (this.get('always-auth') !== undefined) {
c.alwaysAuth = this.get('always-auth')
}
if (c.username && c.password) {
c.auth = new Buffer(c.username + ':' + c.password).toString('base64')
}
return c
}
| 0 |
JavaScript
|
CWE-200
|
Exposure of Sensitive Information to an Unauthorized Actor
|
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
|
https://cwe.mitre.org/data/definitions/200.html
|
vulnerable
|
asn1.fromDer = function(bytes, options) {
if(options === undefined) {
options = {
strict: true,
decodeBitStrings: true
};
}
if(typeof options === 'boolean') {
options = {
strict: options,
decodeBitStrings: true
};
}
if(!('strict' in options)) {
options.strict = true;
}
if(!('decodeBitStrings' in options)) {
options.decodeBitStrings = true;
}
// wrap in buffer if needed
if(typeof bytes === 'string') {
bytes = forge.util.createBuffer(bytes);
}
return _fromDer(bytes, bytes.length(), 0, options);
};
| 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
|
$scope.reset = function() {
bootbox.confirm('Are you sure you want to reset the foreign source definition to the default ?', function(ok) {
if (ok) {
RequisitionsService.startTiming();
RequisitionsService.deleteForeignSourceDefinition($scope.foreignSource).then(
function() { // success
growl.success('The foreign source definition for ' + $scope.foreignSource + 'has been reseted.');
$scope.initialize();
},
$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
|
o()},usual:function(){s();m();o()},rtl:function(){s();m();o()}},D=function(b){var c=new function(a){var b={};return{getCmdByTab:function(c){for(var e in a)b[a[e]]=e;return b[c]}}}(a.cmd);b.selectPage(c.getCmdByTab(CKEDITOR.config.wsc_cmd));a.sendData(b)},s=function(){a.dialog.hidePage("Thesaurus")},m=function(){a.dialog.hidePage("GrammTab")},o=function(){a.dialog.showPage("SpellTab")},l=function(){a.dialog.getContentElement(a.dialog._.currentTabId,"bottomGroup").getElement().show()},r=function(){a.dialog.getContentElement(a.dialog._.currentTabId,
| 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
|
show: function(){
isatty && process.stdout.write('\u001b[?25h');
},
| 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
|
F=this.editor.graph.getModel().getStyle(F),this.styleInput.value=F||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var K=this.isSelectionAllowed;this.isSelectionAllowed=function(F){return mxEvent.getSource(F)==this.styleInput?!0:K.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(e.container,"dragleave",function(F){e.isEnabled()&&
| 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 EventEmitter(){};
| 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
|
$scope.initialize = function() {
growl.success('Retrieving definition for requisition ' + _.escape($scope.foreignSource) + '...');
RequisitionsService.getForeignSourceDefinition($scope.foreignSource).then(
function(foreignSourceDef) { // success
$scope.foreignSourceDef = foreignSourceDef;
// Updating pagination variables for detectors.
$scope.filteredDetectors = $scope.foreignSourceDef.detectors;
$scope.updateFilteredDetectors();
// Updating pagination variables for policies.
$scope.filteredPolicies = $scope.foreignSourceDef.policies;
$scope.updateFilteredPolicies();
},
$scope.errorHandler
);
};
| 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
|
leave = function(e) {
if (isin(e)) {
e.preventDefault();
e.stopPropagation();
}
},
| 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
|
Mocha.prototype.ui = function(name){
name = name || 'bdd';
this._ui = exports.interfaces[name];
if (!this._ui) try { this._ui = require(name); } catch (err) {};
if (!this._ui) throw new Error('invalid interface "' + name + '"');
this._ui = this._ui(this.suite);
return this;
};
| 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
|
va&&("shape"!=va||Na)&&(!Na||la||0>mxUtils.indexOf(d,va))&&(Ca=mxUtils.setStyle(Ca,va,Ra))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));Q.setStyle(J,Ca)}}finally{Q.endUpdate()}return I};n.addListener("cellsInserted",function(I,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(I,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
| 0 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
vulnerable
|
function(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
|
Cache.prototype.set = function (key, value) {
this._size >= this._maxSize && this.clear()
if (!(key in this._values)) this._size++
return (this._values[key] = value)
}
| 1 |
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
|
safe
|
function errorDiff(err, type, escape) {
var actual = escape ? escapeInvisibles(err.actual) : err.actual;
var expected = escape ? escapeInvisibles(err.expected) : err.expected;
return diff['diff' + type](actual, expected).map(function(str) {
if (str.added) return colorLines('diff added', str.value);
if (str.removed) return colorLines('diff removed', str.value);
return str.value;
}).join('');
}
| 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
|
c.pop();)if(k.indexOf(g)==-1)return false}else if(a.attributes[e]!=d[e])return false;for(l in f)if(a.styles[l]!=f[l])return false;return true}function l(a,b){var c,d;if(typeof a=="string")c=a;else if(a instanceof CKEDITOR.style)d=a;else{c=a[0];d=a[1]}return[{element:c,left:d,right:function(a,c){c.transform(a,b)}}]}function p(a){return function(b){return y(b,a)}}function k(a){return function(b,c){c[a](b)}}var q=CKEDITOR.dtd,z=CKEDITOR.tools.copy,t=CKEDITOR.tools.trim,J="cke-test",H=["","p","br","div"];
| 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
|
x=u.getCell(k.id),null!=x&&(u.setTerminal(x,u.getCell(k.source),!0),u.setTerminal(x,u.getCell(k.target),!1));u.updateEdgeParent=D;if(d&&0<e.length)for(v=0;v<e.length;v++)u.contains(e[v])&&u.updateEdgeParent(e[v])}finally{u.endUpdate()}};
| 0 |
JavaScript
|
CWE-79
|
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
|
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
|
https://cwe.mitre.org/data/definitions/79.html
|
vulnerable
|
null,"Error fetching folder items")+(null!=Ca?" ("+Ca+")":""));V=!1;P.stop()}})}}function L(N){J.className=J.className.replace("odCatSelected","");J=N;J.className+=" odCatSelected"}function C(N){V||(T=null,z("search",null,null,null,N))}var D="";null==e&&(e=I,D='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var N=null;try{N=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return N});null==n&&(n=function(N){if(null!=N){var Q=m()||{};delete N["@microsoft.graph.downloadUrl"];
| 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(K){var F=x.length;if(1===F%2||F>=f){var H=0,S=0,V,M=0;for(V=K;V<F;V++)M++,K=x[V],H+=K.x,S+=K.y;return{x:H/M,y:S/M}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(M,W){if(!P){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(W=JSON.stringify({from:z,id:A,type:M,sessionId:e.clientId,userId:U.id,username:U.displayName,data:W,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),K&&"cursor"!=M&&EditorUi.debug("P2PCollab: sending to socket server",[W]),A++,M=!K&&("cursor"==M||"selectionChange"==M),D&&!M&&V("message",W),M))for(p2pId in C)C[p2pId].send(W)}}function m(M){if(b.shareCursorPosition&&!l.isMouseDown){var W=
| 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 NyanCat(runner) {
Base.call(this, runner);
var self = this
, stats = this.stats
, width = Base.window.width * .75 | 0
, rainbowColors = this.rainbowColors = self.generateColors()
, colorIndex = this.colorIndex = 0
, numerOfLines = this.numberOfLines = 4
, trajectories = this.trajectories = [[], [], [], []]
, nyanCatWidth = this.nyanCatWidth = 11
, trajectoryWidthMax = this.trajectoryWidthMax = (width - nyanCatWidth)
, scoreboardWidth = this.scoreboardWidth = 5
, tick = this.tick = 0
, n = 0;
runner.on('start', function() {
Base.cursor.hide();
self.draw();
});
runner.on('pending', function(test) {
self.draw();
});
runner.on('pass', function(test) {
self.draw();
});
runner.on('fail', function(test, err) {
self.draw();
});
runner.on('end', function() {
Base.cursor.show();
for (var i = 0; i < self.numberOfLines; i++) write('\n');
self.epilogue();
});
}
| 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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.