code
stringlengths
14
2.05k
label
int64
0
1
programming_language
stringclasses
7 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
98
description
stringlengths
36
379
url
stringlengths
36
48
label_name
stringclasses
2 values
showWarning: function (message) { return growl.warning(sanitize(message), config); },
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
showSuccess: function (message) { return growl.success(sanitize(message), config); },
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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 sanitize = function(message) { var sanitized = $sanitize(message); return sanitized.split(' ').map(function(part) { return encodeURIComponent(part); }).join(' '); };
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
showError : function (message) { return growl.error(sanitize(message), config); }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
showInfo : function (message) { return growl.info(sanitize(message), config); },
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
const escape = (unsafe) => { return unsafe.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&#039;'); }
1
JavaScript
CWE-94
Improper Control of Generation of Code ('Code Injection')
The product 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
success: function (message) { input.replaceWith('<span data-tag-id="' + id + '">' + escape(input.val().replace(/\//g, '&#x2F;')) + '</span>'); $('span[data-tag-id="' + id + '"]'); $('#pmf-admin-saving-data-indicator').html(message); },
1
JavaScript
CWE-94
Improper Control of Generation of Code ('Code Injection')
The product 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
const escape = (unsafe) => { return unsafe.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&#039;'); }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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 updateSerpPreview = function () { var metaPanel = this.layout.getComponent("metaDataPanel"); var title = htmlspecialchars(metaPanel.getComponent("title").getValue()); var description = htmlspecialchars(metaPanel.getComponent("description").getValue()); ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function () { pimcore.helpers.uploadDialog( Routing.generate('pimcore_admin_user_uploadcurrentuserimage', {id: this.currentUser.id}), null, function () { ...
1
JavaScript
CWE-434
Unrestricted Upload of File with Dangerous Type
The product 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
handler: function () { pimcore.helpers.uploadDialog( Routing.generate('pimcore_admin_user_uploadimage', {id: this.currentUser.id}), null, function () { Ext.getC...
1
JavaScript
CWE-434
Unrestricted Upload of File with Dangerous Type
The product 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
validator: function(value) { if (value) { if (!value.startsWith('/') || value.length < 2) { return false; } value = value.substring(1); value = value.replace(/\/$/, ""); ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
validator: function (value) { if(value !== value.replace(/[^a-zA-Z0-9_\-@.]/g,'')){ this.setValue(value.replace(/[^a-zA-Z0-9_\-@.]/g,'')); } return true; ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
pimcore.helpers.sanitizeEmail = function (email) { return email.replace(/[^a-zA-Z0-9_\-@.+]/g,''); };
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
onAdd:function (btn, ev) { Ext.MessageBox.prompt("", t("email_address"), function (button, value) { if(button == "ok") { const sanitizedEmail = pimcore.helpers.sanitizeEmail(value); var u = { "address": sanitizedEmail }; ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler:function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); const sanitizedEmail = pimcore.helpers.sanitizeEmail(data.data.address); pimcore.helpers.deleteConfirm( ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
onChange: function(value) { if(Ext.String.hasHtmlCharacters(value)) { this.reset(); } },
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('document_type'), Ext.util.Format.htmlEncode(data.data.name), function () { ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
{text: t("time"), width: 100, sortable: true, dataIndex: 'time', editor: new Ext.form.TimeField({ format: "H:i", listeners: { focus : function(component) { component.setValue(Ext.util.Format.htmlD...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
blur: function(component){ component.setValue(Ext.util.Format.htmlEncode(component.value)); }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
safe
{text: t("time"), width: 100, sortable: true, dataIndex: 'time', editor: new Ext.form.TimeField({ format: "H:i", listeners: { focus : function(component) { component.setValue(Ext.util.Format.htmlD...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
"change": function (el) { const sanitizedValue = pimcore.helpers.sanitizeUrlSlug(el.getValue()); el.setValue(sanitizedValue); }.bind(this)
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
path: pimcore.helpers.sanitizeUrlSlug(el.getValue()) }, success: function (res) { res = Ext.decode(res.responseText); ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
pimcore.helpers.sanitizeUrlSlug = function (slug) { return slug.replace(/[^a-z0-9-_+/]/gi, ''); };
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
validator: function (value) { if(value !== value.replace(/[^a-za-z0-9_\-+]/g,'')){ this.setvalue(value.replace(/[^a-za-z0-9_\-+]/g,'')); } return true; }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
onNodeDrop : this.onNodeDrop.bind(this) }); var eConfig = {}; eConfig.toolbarGroups = [ {name: 'basicstyles', groups: ['undo', 'find', 'basicstyles', 'list']}, '/', {name: 'paragraph', groups: ['align', 'indent']}, {name: 'blocks'}, ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('predefined_metadata'), Ext.util.Format.htmlEncode(data.data.name), function () { ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('predefined_metadata'), Ext.util.Format.htmlEncode(data.data.name), function () { ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('predefined_properties'), Ext.util.Format.htmlEncode(data.data.name), function () {...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('predefined_properties'), Ext.util.Format.htmlEncode(data.data.name), function () {...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
onDelete: function () { var selections = this.grid.getSelectionModel().getSelected(); if (!selections || selections.length < 1) { return false; } var rec = selections.getAt(0); this.grid.store.remove(rec); },
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
sanitizeTextColumn: function (textField) { if(textField.getValue()){ const sanitizedValue = textField.getValue().replace(/[<>"'!?/\\&%$();]/gi, ''); textField.setValue(sanitizedValue); } }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
change: function (defaultDateField, newValue, oldValue) { if(typeof this.getValue() != 'object') { this.setValue(null); } }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
setDefaultValue:function (defaultValue, datefield, timefield) { if(datefield.getValue() && typeof datefield.getValue() === 'object') { var dateString = Ext.Date.format(datefield.getValue(), "Y-m-d"); if (timefield.getValue()) { dateString += " " + Ext.Date.format(tim...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
getLinkContent: function () { let text = "[" + t("not_set") + "]"; if (this.data.text) { text = this.data.text; } else if (this.data.path) { text = this.data.path; } if (this.data.path || this.data.anchor || this.data.parameters) { let ful...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
pimcore.helpers.getStringWithoutControlChars = function (text) { return text.replace(/[<>"'`!?/\\%$(){};,:|=]/gi, ''); };
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
pimcore.helpers.getStringWithoutControlChars = function (text) { return text.replace(/[<>"'`!?/\\%$(){};,:|=]/gi, ''); };
1
JavaScript
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
The product 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 product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the...
https://cwe.mitre.org/data/definitions/22.html
safe
pimcore.helpers.htmlEncodeTextField = function (textField) { if(textField.getValue()) { textField.suspendEvent('change'); const decodedValue = Ext.util.Format.htmlDecode(textField.getValue()); textField.setValue( Ext.util.Format.htmlEncode(decodedValue) ); textFie...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function (grid, rowIndex) { var data = grid.getStore().getAt(rowIndex); if (!data.data.writeable) { return; } const decodedName = Ext.util.Format.htmlDecode(data.data...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); const decodedName = Ext.util.Format.htmlDecode(data.data.name); pimcore.helpers.deleteConfirm( ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
success: function () { this.refresh(this.tree.getRootNode()); }.bind(this)
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
}.bind(this) }); }.bind(this));
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
url: Routing.generate('pimcore_ecommerceframework_pricing_delete'), method: 'DELETE', params: { id: record.id }, success: function () { this.refresh(this.tree.getRootNode()...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
getNodeLabel: function (configAttributes) { var nodeLabel = configAttributes.label ? configAttributes.label : this.getDefaultText(); if (configAttributes.attribute) { var attr = configAttributes.attribute; if (configAttributes.param1) { ...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
getEditor: function() { return new Ext.form.TextField({ listeners: {'change': pimcore.helpers.htmlEncodeTextField } }); }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
renderer: function (value) { return Ext.util.Format.htmlEncode(value); }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
getLinkContent: function () { let text = "[" + t("not_set") + "]"; if (this.data.text) { text = this.data.text; } else if (this.data.path) { text = this.data.path; } let displayHtml = Ext.util.Format.htmlEncode(text); if (this.data.path || thi...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
question: function() { return htmlEncode(this.$element.attr('title')); },
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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 toggleWriteability(id_of_patient, checked) { document.getElementById(id_of_patient).disabled = checked; }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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 test(input) { var count = 0; var oldInput, newInput; testContainer.innerHTML = "<img />"; testImage().setAttribute("alt", input); print("------"); print("Test input: " + input); do { oldInput = testImage().getAttribute("alt"); var intermediate = testContainer.innerHT...
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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 print(s) { out.value += s + "\n"; }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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 testImage() { return testContainer.firstChild; }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product 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
getProductReturnDetails: function({product_id, customer_id}, returnData) { $.ajax({ url: full_website_address + "/info/?module=data&page=productDetailsForReturn&product_id=" + product_id+"&customer_id="+customer_id, contentType: "application/json; charset=utf-8", dataType: "json", succes...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
getProductReturnDetails: function({product_id, customer_id}, returnData) { $.ajax({ url: full_website_address + "/info/?module=data&page=productDetailsForReturn&product_id=" + product_id+"&customer_id="+customer_id, contentType: "application/json; charset=utf-8", dataType: "json", succes...
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
getDateTime: function() { var date = new Date(); return date.getFullYear() + "-" + date.getMonth() + "-" + date.getDay() + "-" + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); },
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
getDateTime: function() { var date = new Date(); return date.getFullYear() + "-" + date.getMonth() + "-" + date.getDay() + "-" + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); },
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
dateRangePicker: function({selector=".dateRangePicker", format="YYYY-MM-DD", timePicker= false}="") { $(selector).daterangepicker({ autoUpdateInput: false, showDropdowns: true, drops: "auto", linkedCalendars: false, timePicker: timePicker, ...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
dateRangePicker: function({selector=".dateRangePicker", format="YYYY-MM-DD", timePicker= false}="") { $(selector).daterangepicker({ autoUpdateInput: false, showDropdowns: true, drops: "auto", linkedCalendars: false, timePicker: timePicker, ...
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
getProductDetails: function( {product_id, warehouse_id, customer_id="", qnt='', batch='', packet=''}, returnData ) { // Parse product list and return $.ajax({ url: full_website_address + `/info/?module=data&page=productDetailsForPos&product_id=${product_id}&warehouse_id=${warehouse_id}&cid=${custom...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
getProductDetails: function( {product_id, warehouse_id, customer_id="", qnt='', batch='', packet=''}, returnData ) { // Parse product list and return $.ajax({ url: full_website_address + `/info/?module=data&page=productDetailsForPos&product_id=${product_id}&warehouse_id=${warehouse_id}&cid=${custom...
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
'text/html': new Blob( [ element.html() ], { type: 'text/html' } ) }) ]);
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
'text/html': new Blob( [ element.html() ], { type: 'text/html' } ) }) ]);
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
initComplete: function(settings, json) { if(disableOnTypeSearch) { var api = new $.fn.dataTable.Api( settings ); $('.dataTables_filter input').unbind(); $('.dataTables_filter input').bind('keyup', function(e){ ...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
initComplete: function(settings, json) { if(disableOnTypeSearch) { var api = new $.fn.dataTable.Api( settings ); $('.dataTables_filter input').unbind(); $('.dataTables_filter input').bind('keyup', function(e){ ...
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
"stateSaveParams": function(settings, data) { var api = this.api(); // Disable search, order and length in stateSave data.search.search = ""; data.length = 15; data.order = DtDefaultOrder; // S...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
"stateSaveParams": function(settings, data) { var api = this.api(); // Disable search, order and length in stateSave data.search.search = ""; data.length = 15; data.order = DtDefaultOrder; // S...
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
disableEnableWarehouseSelect: function() { var productCountInList = $(".productQnt").length; if(productCountInList > 0) { $("#stockTransferFromWarehouse, #stockTransferToWarehouse").prop("disabled", true); } else { $("#stockTransferFromWarehouse, #stockTransferToWarehouse").prop("disabled",...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
disableEnableWarehouseSelect: function() { var productCountInList = $(".productQnt").length; if(productCountInList > 0) { $("#stockTransferFromWarehouse, #stockTransferToWarehouse").prop("disabled", true); } else { $("#stockTransferFromWarehouse, #stockTransferToWarehouse").prop("disabled",...
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
footer : function (data, column, row) { // If no print class exists then remove the whol html inside th return ($(row).prop('outerHTML').indexOf("no-print") > 0) ? data.repla...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
footer : function (data, column, row) { // If no print class exists then remove the whol html inside th return ($(row).prop('outerHTML').indexOf("no-print") > 0) ? data.repla...
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
calculateDiscount: function(amount, discount=null) { if(discount === "" || discount === null || discount === 'null' || discount === 0) { return parseFloat(Number(amount)); } else if( typeof discount === 'string' && discount.indexOf("%") > 0 ) { // For parc...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
calculateDiscount: function(amount, discount=null) { if(discount === "" || discount === null || discount === 'null' || discount === 0) { return parseFloat(Number(amount)); } else if( typeof discount === 'string' && discount.indexOf("%") > 0 ) { // For parc...
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
isExists: function(product_id, whereToCheck=".productID") { return $(whereToCheck).filter(function() { return this.value === product_id; }).length > 0; },
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
isExists: function(product_id, whereToCheck=".productID") { return $(whereToCheck).filter(function() { return this.value === product_id; }).length > 0; },
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
getDetails: function(product_id, returnData) { // Parse product list and return $.ajax({ url: full_website_address + `/info/?module=data&page=productDetails&product_id=${product_id}`, contentType: "application/json; charset=utf-8", dataType: "json", ...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
getDetails: function(product_id, returnData) { // Parse product list and return $.ajax({ url: full_website_address + `/info/?module=data&page=productDetails&product_id=${product_id}`, contentType: "application/json; charset=utf-8", dataType: "json", ...
1
JavaScript
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
safe
function format(data) { // Get all column visibility states var columnVisibleState = getDataTable.columns().visible(); var childRowHtml = ''; //'<div class="slider">'; data.forEach((item) => { childRowHtml += '<tr class="childRow" s...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
function format(data) { // Get all column visibility states var columnVisibleState = getDataTable.columns().visible(); var childRowHtml = ''; //'<div class="slider">'; data.forEach((item) => { childRowHtml += '<tr class="childRow" s...
1
JavaScript
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
safe
return setInterval(function() { var distance = new Date().getTime() - startTime; var totalSeconds = distance / 1000; var seconds = Math.floor( totalSeconds % 60 ).toString().padStart(2,0); var minutes = Math.floor( ( totalSeconds % 3600 ) / 60 ).toString().pad...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
return setInterval(function() { var distance = new Date().getTime() - startTime; var totalSeconds = distance / 1000; var seconds = Math.floor( totalSeconds % 60 ).toString().padStart(2,0); var minutes = Math.floor( ( totalSeconds % 3600 ) / 60 ).toString().pad...
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
showProduct: function({container='#productListContainer', category='', brand='', edition='', generic='', author=''}='' ) { this.parseProductList({ category:category, brand:brand, edition:edition, generic:generic, author:author }, product...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
showProduct: function({container='#productListContainer', category='', brand='', edition='', generic='', author=''}='' ) { this.parseProductList({ category:category, brand:brand, edition:edition, generic:generic, author:author }, product...
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
disableEnableWCSelect: function() { // WC = warehouse and Customer if( $(".productQnt").length > 0) { $("#customers, #warehouse").prop("disabled", true); } else { $("#customers, #warehouse").prop("disabled", false); } },
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
disableEnableWCSelect: function() { // WC = warehouse and Customer if( $(".productQnt").length > 0) { $("#customers, #warehouse").prop("disabled", true); } else { $("#customers, #warehouse").prop("disabled", false); } },
1
JavaScript
CWE-352
Cross-Site Request Forgery (CSRF)
The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request.
https://cwe.mitre.org/data/definitions/352.html
safe
"footerCallback": function(row, data, start, end, display) { var api = this.api(); api.columns('.countTotal, .highlightWithCountTotal', { page: 'current' }).every(function() { var sum = this .data()...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
"footerCallback": function(row, data, start, end, display) { var api = this.api(); api.columns('.countTotal, .highlightWithCountTotal', { page: 'current' }).every(function() { var sum = this .data()...
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
oHideFrame.onload = function() { //** this onafterprint event not working in iframe currently */ // this.contentWindow.onbeforeunload = function() { // $(".dynamic-container > iframe").remove(); // afterPrintOrCancel(true); // }; ...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
oHideFrame.onload = function() { //** this onafterprint event not working in iframe currently */ // this.contentWindow.onbeforeunload = function() { // $(".dynamic-container > iframe").remove(); // afterPrintOrCancel(true); // }; ...
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
success: function (data, status) { returnData(data); },
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
success: function (data, status) { returnData(data); },
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
productDiscountCheck: function(event) { // Count Sub total for each product. var netSalesPrice = $("#productSaleItemPrice").val(); var Discount = $("#productSaleItemDiscount").val(); if( event.key === "Enter" && Discount.indexOf("%") > 1 && Discount.replace("%","") >= 100) { // Display t...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
productDiscountCheck: function(event) { // Count Sub total for each product. var netSalesPrice = $("#productSaleItemPrice").val(); var Discount = $("#productSaleItemDiscount").val(); if( event.key === "Enter" && Discount.indexOf("%") > 1 && Discount.replace("%","") >= 100) { // Display t...
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
parseProductList: function( {category='', brand='', edition='', generic='', author=''}, returnData ) { // Parse product list and return $.ajax({ url: full_website_address + `/info/?module=data&page=productList&catId=${category}&brand=${brand}&edition=${edition}&generic=${generic}&author...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
parseProductList: function( {category='', brand='', edition='', generic='', author=''}, returnData ) { // Parse product list and return $.ajax({ url: full_website_address + `/info/?module=data&page=productList&catId=${category}&brand=${brand}&edition=${edition}&generic=${generic}&author...
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
calculateTarifCharges: function(amount, discount = null) { if(discount === "" || discount === null || discount === 'null' || discount === 0) { return 0.00; } else if (typeof discount === 'string' && discount.indexOf("%") > 0) { // For parcantage discount ...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
calculateTarifCharges: function(amount, discount = null) { if(discount === "" || discount === null || discount === 'null' || discount === 0) { return 0.00; } else if (typeof discount === 'string' && discount.indexOf("%") > 0) { // For parcantage discount ...
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
editProductItemDetails: function(rowId, product_name) { // Display the product name on modal $("#productSaleDetails .modal-title").html(product_name); $("#productSaleDetails .rowId").val(rowId); // select product details row var product_row = $(`#${rowId}`); $("#productSaleDetails #productS...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
editProductItemDetails: function(rowId, product_name) { // Display the product name on modal $("#productSaleDetails .modal-title").html(product_name); $("#productSaleDetails .rowId").val(rowId); // select product details row var product_row = $(`#${rowId}`); $("#productSaleDetails #productS...
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
addWastageSaleItem: function() { var html = '<tr>\ <td class="col-md-5"> <input type="text" name="wastageSaleItem[]" placeholder="Enter Item name and details" class="wastageSaleItem form-control" required> </td>\ <td class="col-md-2"> <input type="number" step="any" name="wastageS...
1
JavaScript
CWE-829
Inclusion of Functionality from Untrusted Control Sphere
The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.
https://cwe.mitre.org/data/definitions/829.html
safe
addWastageSaleItem: function() { var html = '<tr>\ <td class="col-md-5"> <input type="text" name="wastageSaleItem[]" placeholder="Enter Item name and details" class="wastageSaleItem form-control" required> </td>\ <td class="col-md-2"> <input type="number" step="any" name="wastageS...
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