Merge pull request #33086 from akhilnarang/sanitize-private-workspace-route

fix(router): sanitize private workspace route in msgprint
This commit is contained in:
Akhil Narang 2025-06-25 12:06:33 +05:30 committed by GitHub
commit ef66b86d93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -170,7 +170,11 @@ frappe.router = {
// private workspace
let private_workspace = route[1] && `${route[1]}-${frappe.user.name.toLowerCase()}`;
if (!frappe.workspaces[private_workspace]) {
frappe.msgprint(__("Workspace <b>{0}</b> does not exist", [route[1]]));
frappe.msgprint(
__("Workspace <b>{0}</b> does not exist", [
frappe.utils.xss_sanitise(route[1]),
])
);
return ["Workspaces"];
}
route = ["Workspaces", "private", frappe.workspaces[private_workspace].name];