XSS fixes (#6386)
* fix(XSS): Sanitise page name before routing * fix(XSS): Sanitise tag value before saving it
This commit is contained in:
parent
8fe67e17c3
commit
6bbb84f9c3
2 changed files with 4 additions and 2 deletions
|
|
@ -48,7 +48,8 @@ frappe.route = function() {
|
|||
frappe.view_factory[route[0]].show();
|
||||
} else {
|
||||
// show page
|
||||
frappe.views.pageview.show(route[0]);
|
||||
const route_name = frappe.utils.xss_sanitise(route[0]);
|
||||
frappe.views.pageview.show(route_name);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ frappe.ui.Tags = class {
|
|||
bind() {
|
||||
this.$input.keypress((e) => {
|
||||
if(e.which == 13 || e.keyCode == 13) {
|
||||
this.addTag(this.$input.val());
|
||||
const tagValue = frappe.utils.xss_sanitise(this.$input.val());
|
||||
this.addTag(tagValue);
|
||||
this.$input.val('');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue