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()); var truncate = function( text, n ){ if (text.length <= n) { return text; } var subString = text.substr(0, n-1); return subString.substr(0, subString.lastIndexOf(' ')) + " ..."; }; if(!title) { metaPanel.getComponent("serpPreview").hide(); return false; } if(metaPanel.getEl().getWidth() > 1350) { metaPanel.getComponent("serpPreview").show(); } var desktopTitleEl = Ext.get(metaPanel.getComponent("serpPreview").getEl().selectNode(".desktop .title")); var stringParts = title.split(" "); desktopTitleEl.setHtml(title); while(desktopTitleEl.getWidth() >= 600) { stringParts.splice(-1,1); tmpString = stringParts.join(" ") + " ..."; desktopTitleEl.setHtml(tmpString); } var desktopDescrEl = metaPanel.getComponent("serpPreview").getEl().selectNode(".desktop .description"); Ext.fly(desktopDescrEl).setHtml(truncate(description, 160)); var mobileTitleEl = metaPanel.getComponent("serpPreview").getEl().selectNode(".mobile .title"); Ext.fly(mobileTitleEl).setHtml(truncate(title, 78)); var mobileDescrEl = metaPanel.getComponent("serpPreview").getEl().selectNode(".mobile .description"); Ext.fly(mobileDescrEl).setHtml(truncate(description, 130)); return true; }.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
handler: function () { pimcore.helpers.uploadDialog( Routing.generate('pimcore_admin_user_uploadcurrentuserimage', {id: this.currentUser.id}), null, function () { Ext.getCmp("pimcore_profile_delete_image_" + this.currentUser.id).setVisible(true); pimcore.helpers.reloadUserImage(this.currentUser.id); this.currentUser.hasImage = true; }.bind(this), function () { Ext.MessageBox.alert(t('error'), t("unsupported_filetype")); }.bind(this) ); }.bind(this)
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.getCmp("pimcore_user_delete_image_" + this.currentUser.id).setVisible(true); pimcore.helpers.reloadUserImage(this.currentUser.id); this.currentUser.hasImage = true; }.bind(this), function () { Ext.MessageBox.alert(t('error'), t("unsupported_filetype")); }.bind(this) ); }.bind(this)
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(/\/$/, ""); var parts = value.split('/'); for (let i = 0; i < parts.length; i++) { let part = parts[i]; if (part.length == 0) { return false; } sanitizedPart = part.replace(/[#\?\*\:\\\\<\>\|"%&@=;]/g, '-'); if (sanitizedPart != part) { return t('url-slug-invalid-chars'); } } } 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
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 }; this.grid.store.insert(0, u); } }.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
handler:function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); const sanitizedEmail = pimcore.helpers.sanitizeEmail(data.data.address); pimcore.helpers.deleteConfirm( t('email_blacklist'), sanitizedEmail, function () { grid.getStore().removeAt(rowIndex); }.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
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 () { grid.getStore().removeAt(rowIndex); }.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
{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.htmlDecode(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
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.htmlDecode(component.value)); }, 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
"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); if(!res.success) { el.getEl().addCls("pimcore_error_input"); if (res.message) { Ext.MessageBox.alert(t("info"), res.message); } } else { el.getEl().removeCls("pimcore_error_input"); } } });
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'}, {name: 'links'}, {name: 'insert'}, '/', {name: 'styles'}, {name: 'tools', groups: ['colors', 'tools', 'cleanup', 'mode', 'others']} ]; //prevent override important settings! eConfig.resize_enabled = false; eConfig.enterMode = CKEDITOR.ENTER_BR; eConfig.entities = false; eConfig.entities_greek = false; eConfig.entities_latin = false; eConfig.extraAllowedContent = "*[pimcore_type,pimcore_id]"; eConfig.baseFloatZIndex = 40000; // prevent that the editor gets displayed behind the grid cell editor window if (eConfig.hasOwnProperty('removePlugins')) { eConfig.removePlugins += ",tableresize"; } else { eConfig.removePlugins = "tableresize"; } try { this.ckeditor = CKEDITOR.inline(this.editableDivId, eConfig); this.ckeditor.setData(this.field.getValue()); // disable URL field in image dialog this.ckeditor.on("dialogShow", function (e) { var urlField = e.data.getElement().findOne("input"); if (urlField && urlField.getValue()) { if (urlField.getValue().indexOf("/image-thumbnails/") > 1) { urlField.getParent().getParent().getParent().hide(); } } else if (urlField) { urlField.getParent().getParent().getParent().show(); } }); } catch (e) { console.log(e); } },
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 () { grid.getStore().removeAt(rowIndex); }.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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('predefined_metadata'), Ext.util.Format.htmlEncode(data.data.name), function () { grid.getStore().removeAt(rowIndex); }.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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('predefined_properties'), Ext.util.Format.htmlEncode(data.data.name), function () { grid.getStore().removeAt(rowIndex); }.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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); pimcore.helpers.deleteConfirm(t('predefined_properties'), Ext.util.Format.htmlEncode(data.data.name), function () { grid.getStore().removeAt(rowIndex); }.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
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(timefield.getValue(), "H:i"); } else { dateString += " 00:00"; } defaultValue.setValue((Ext.Date.parseDate(dateString, "Y-m-d H:i").getTime()) / 1000); } else { datefield.setValue(null); defaultValue.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
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 fullpath = this.data.path + (this.data.parameters ? '?' + Ext.util.Format.htmlEncode(this.data.parameters) : '') + (this.data.anchor ? '#' + Ext.util.Format.htmlEncode(this.data.anchor) : ''); let displayHtml = Ext.util.Format.htmlEncode(text); if (this.config.textPrefix !== undefined) { displayHtml = this.config.textPrefix + displayHtml; } if (this.config.textSuffix !== undefined) { displayHtml += this.config.textSuffix; } return '<a href="' + fullpath + '" class="' + this.config["class"] + ' ' + this.data["class"] + '">' + displayHtml + '</a>'; } return text; },
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 restricted directory.
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) ); textField.resumeEvent('change'); } };
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.name); pimcore.helpers.deleteConfirm( t('staticroute'), Ext.util.Format.htmlEncode(decodedName), function () { grid.getStore().removeAt(rowIndex); }.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
handler: function (grid, rowIndex) { let data = grid.getStore().getAt(rowIndex); const decodedName = Ext.util.Format.htmlDecode(data.data.name); pimcore.helpers.deleteConfirm( t('predefined_properties'), Ext.util.Format.htmlEncode(decodedName), function () { grid.getStore().removeAt(rowIndex); }.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
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()); }.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
getNodeLabel: function (configAttributes) { var nodeLabel = configAttributes.label ? configAttributes.label : this.getDefaultText(); if (configAttributes.attribute) { var attr = configAttributes.attribute; if (configAttributes.param1) { attr += " " + configAttributes.param1; } nodeLabel += '<span class="pimcore_gridnode_hint"> (' + Ext.util.Format.htmlEncode(attr) + ')</span>'; } return nodeLabel; }
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 || this.data.anchor || this.data.parameters) { let fullpath = this.data.path + (this.data.parameters ? '?' + Ext.util.Format.htmlEncode(this.data.parameters) : '') + (this.data.anchor ? '#' + Ext.util.Format.htmlEncode(this.data.anchor) : ''); if (this.config.textPrefix !== undefined) { displayHtml = this.config.textPrefix + displayHtml; } if (this.config.textSuffix !== undefined) { displayHtml += this.config.textSuffix; } return '<a href="' + fullpath + '" class="' + this.config["class"] + ' ' + Ext.util.Format.htmlEncode(this.data["class"]) + '">' + displayHtml + '</a>'; } return displayHtml; },
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.innerHTML; print("Render: " + intermediate); testContainer.innerHTML = intermediate; if (testImage() == null) { print("Image disappeared..."); break; } newInput = testImage().getAttribute("alt"); print("New value: " + newInput); count++; } while (count < 5 && newInput != oldInput); if (count == 5) { print("Failed to achieve fixpoint"); } testContainer.innerHTML = ""; }
1
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The 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", 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
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", 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
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, timePicker24Hour: true, parentEl: "div.dynamic-container", locale: { format: format, cancelLabel: 'Clear' } }); // Apply the date $(selector).on('apply.daterangepicker', function(ev, picker) { $(this).val(picker.startDate.format(format) + ' - ' + picker.endDate.format(format)); }); // clear the date $(selector).on('cancel.daterangepicker', function(ev, picker){ $(this).val(''); }); },
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, timePicker24Hour: true, parentEl: "div.dynamic-container", locale: { format: format, cancelLabel: 'Clear' } }); // Apply the date $(selector).on('apply.daterangepicker', function(ev, picker) { $(this).val(picker.startDate.format(format) + ' - ' + picker.endDate.format(format)); }); // clear the date $(selector).on('cancel.daterangepicker', function(ev, picker){ $(this).val(''); }); },
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=${customer_id}&pqnt=${qnt}&batch=${batch}&packet=${packet}`, contentType: "application/json; charset=utf-8", dataType: "json", 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
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=${customer_id}&pqnt=${qnt}&batch=${batch}&packet=${packet}`, contentType: "application/json; charset=utf-8", dataType: "json", 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
'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){ var code = e.keyCode || e.which; if (code == 13) { api.search(this.value).draw(); } }); } },
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){ var code = e.keyCode || e.which; if (code == 13) { api.search(this.value).draw(); } }); } },
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; // Set the select text on filter data.columns.forEach( (item, i) => { var footer = api.column(i).footer(); var filterObject = $(footer).find("select"); if( filterObject.length > 0 ) { // Add option text in the state data.columns[i].search.text = $(filterObject).find(":selected").text(); } }); },
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; // Set the select text on filter data.columns.forEach( (item, i) => { var footer = api.column(i).footer(); var filterObject = $(footer).find("select"); if( filterObject.length > 0 ) { // Add option text in the state data.columns[i].search.text = $(filterObject).find(":selected").text(); } }); },
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", 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
disableEnableWarehouseSelect: function() { var productCountInList = $(".productQnt").length; if(productCountInList > 0) { $("#stockTransferFromWarehouse, #stockTransferToWarehouse").prop("disabled", true); } else { $("#stockTransferFromWarehouse, #stockTransferToWarehouse").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
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.replace(data, "") : 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
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.replace(data, "") : 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
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 parcantage discount return parseFloat(Number(amount) - (Number(discount.replace("%",""))/100) * Number(amount)); } else { // For Fixed Discount return parseFloat(Number(amount) - Number(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
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 parcantage discount return parseFloat(Number(amount) - (Number(discount.replace("%",""))/100) * Number(amount)); } else { // For Fixed Discount return parseFloat(Number(amount) - Number(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
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", 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
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", 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
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" style="display: none; background-color: #f2fcff;">'; item.forEach((itemData, index) => { var headerClassName = getDataTable.columns().header()[index].className; // If the column is visible, then append the child column with row childRowHtml += columnVisibleState[index] ? `<td class='${headerClassName}'>${itemData}</td>` : ''; }) childRowHtml += '</tr>'; }); return $(childRowHtml).toArray(); }
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" style="display: none; background-color: #f2fcff;">'; item.forEach((itemData, index) => { var headerClassName = getDataTable.columns().header()[index].className; // If the column is visible, then append the child column with row childRowHtml += columnVisibleState[index] ? `<td class='${headerClassName}'>${itemData}</td>` : ''; }) childRowHtml += '</tr>'; }); return $(childRowHtml).toArray(); }
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().padStart(2,0); var hours = Math.floor( totalSeconds / 3600 ).toString().padStart(2,0); $(container).html(`${hours}:${minutes}:${seconds}`); }, 1000);
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().padStart(2,0); var hours = Math.floor( totalSeconds / 3600 ).toString().padStart(2,0); $(container).html(`${hours}:${minutes}:${seconds}`); }, 1000);
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 }, productData => { // if no product found then display the error msg if(productData == null) { $(container).html("<div class='alert alert-danger'>Sorry! No products found in this criteria.</div>"); return; } var productHtml = ""; productData.forEach(product => { var productPhoto = full_website_address; if( product.v && product.v > 0 ) { productPhoto += "/images/?for=products&id="+ product.id +"&q=YTozOntzOjI6Iml3IjtpOjIwMDtzOjI6ImloIjtpOjIyMDtzOjI6ImlxIjtpOjcwO30="+"&v="+ product.v; } else { productPhoto += "/assets/images/noimage.png"; } productHtml += "<button type='button' value='"+ product.id +"' title='"+ product.name +"' data-toggle='tooltip' class='productButton btn-product btn-default'> \ <img src='"+ productPhoto +"' style='width:60px; height:60px;' alt='"+ product.name +"'> \ <span> "+ product.name +" </span> \ </button> \ "; }); // Now all the products display in the products container $(container).html(productHtml); }); },
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 }, productData => { // if no product found then display the error msg if(productData == null) { $(container).html("<div class='alert alert-danger'>Sorry! No products found in this criteria.</div>"); return; } var productHtml = ""; productData.forEach(product => { var productPhoto = full_website_address; if( product.v && product.v > 0 ) { productPhoto += "/images/?for=products&id="+ product.id +"&q=YTozOntzOjI6Iml3IjtpOjIwMDtzOjI6ImloIjtpOjIyMDtzOjI6ImlxIjtpOjcwO30="+"&v="+ product.v; } else { productPhoto += "/assets/images/noimage.png"; } productHtml += "<button type='button' value='"+ product.id +"' title='"+ product.name +"' data-toggle='tooltip' class='productButton btn-product btn-default'> \ <img src='"+ productPhoto +"' style='width:60px; height:60px;' alt='"+ product.name +"'> \ <span> "+ product.name +" </span> \ </button> \ "; }); // Now all the products display in the products container $(container).html(productHtml); }); },
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() .reduce(function(a, b) { var x = parseFloat(a) || 0; var y = parseFloat(b) || 0; return x + y; }, 0); //console.log(BMS.fn._n(sum)); //alert(sum); $(this.footer()).html(sum.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')); }); }
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() .reduce(function(a, b) { var x = parseFloat(a) || 0; var y = parseFloat(b) || 0; return x + y; }, 0); //console.log(BMS.fn._n(sum)); //alert(sum); $(this.footer()).html(sum.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,')); }); }
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); // }; // this.contentWindow.onafterprint = function() { // $(".dynamic-container > iframe").remove(); // afterPrintOrCancel(true); // }; this.contentWindow.focus(); // Required for IE this.contentWindow.print(); 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); // }; // this.contentWindow.onafterprint = function() { // $(".dynamic-container > iframe").remove(); // afterPrintOrCancel(true); // }; this.contentWindow.focus(); // Required for IE this.contentWindow.print(); 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 the error message Swal.fire({ title: "Error!", text: "Discount Must be below of 100%", icon: "error" }); $("#productSaleItemDiscount").val(""); $("#productSaleItemDiscount").select(); event.preventDefault(); } else if ( event.key === "Enter" && Number(Discount) >= Number(netSalesPrice) && Discount.indexOf("%") < 1) { $("#productSaleItemDiscount").val(""); $("#productSaleItemDiscount").select(); // Prevent closing modal if presed enter when have discount problem if(event.key === "Enter") { event.preventDefault(); } // Display the error message Swal.fire({ title: "Error!", text: "Discount Must be below of product sale price", icon: "error" }); event.preventDefault(); } },
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 the error message Swal.fire({ title: "Error!", text: "Discount Must be below of 100%", icon: "error" }); $("#productSaleItemDiscount").val(""); $("#productSaleItemDiscount").select(); event.preventDefault(); } else if ( event.key === "Enter" && Number(Discount) >= Number(netSalesPrice) && Discount.indexOf("%") < 1) { $("#productSaleItemDiscount").val(""); $("#productSaleItemDiscount").select(); // Prevent closing modal if presed enter when have discount problem if(event.key === "Enter") { event.preventDefault(); } // Display the error message Swal.fire({ title: "Error!", text: "Discount Must be below of product sale price", icon: "error" }); event.preventDefault(); } },
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=${author}`, contentType: "application/json; charset=utf-8", dataType: "json", 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
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=${author}`, contentType: "application/json; charset=utf-8", dataType: "json", 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
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 return ((Number(discount.replace("%", "")) / 100) * Number(amount)).toFixed(2); } else { // For Fixed Discount return (Number(discount)).toFixed(2); } },
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 return ((Number(discount.replace("%", "")) / 100) * Number(amount)).toFixed(2); } else { // For Fixed Discount return (Number(discount)).toFixed(2); } },
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 #productSaleItemPrice").val( product_row.find(".netSalesPrice").val() ); $("#productSaleDetails #productSaleItemDiscount").val( product_row.find(".productDiscount").val() ); $("#productSaleDetails #productSaleItemPacket").val( product_row.find(".productPacket").val() ); $("#productSaleDetails #productSaleItemDetails").val( product_row.find(".productItemDetails").val() ); },
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 #productSaleItemPrice").val( product_row.find(".netSalesPrice").val() ); $("#productSaleDetails #productSaleItemDiscount").val( product_row.find(".productDiscount").val() ); $("#productSaleDetails #productSaleItemPacket").val( product_row.find(".productPacket").val() ); $("#productSaleDetails #productSaleItemDetails").val( product_row.find(".productItemDetails").val() ); },
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="wastageSaleItemQnt[]" class="wastageSaleItemQnt form-control" required> </td>\ <td class="col-md-2"> <input type="number" step="any" name="wastageSaleItemPrice[]" class="wastageSaleItemPrice form-control" required> </td>\ <td class="text-right wastageSaleItemSubtotal">0.00</td>\ <td style="width: 30px; !important"> \ <i style="cursor: pointer;" class="fa fa-trash-o removeThisItem"></i> \ </td> \ </tr>'; $("#productTable > tbody").append(html); /* Focus the item name input field */ $(".wastageSaleItem").focus(); /* Count all totals */ this.grandTotal(); }
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="wastageSaleItemQnt[]" class="wastageSaleItemQnt form-control" required> </td>\ <td class="col-md-2"> <input type="number" step="any" name="wastageSaleItemPrice[]" class="wastageSaleItemPrice form-control" required> </td>\ <td class="text-right wastageSaleItemSubtotal">0.00</td>\ <td style="width: 30px; !important"> \ <i style="cursor: pointer;" class="fa fa-trash-o removeThisItem"></i> \ </td> \ </tr>'; $("#productTable > tbody").append(html); /* Focus the item name input field */ $(".wastageSaleItem").focus(); /* Count all totals */ this.grandTotal(); }
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
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
0
Edit dataset card