fix(not_permitted_page): escape path
Reported-by: Sadik Shaikh <pc_masters70@yahoo.com> Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
fc1c3f895a
commit
b8fe835d1a
1 changed files with 3 additions and 1 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from urllib.parse import quote_plus
|
||||
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import cstr
|
||||
|
|
@ -14,7 +16,7 @@ class NotPermittedPage(TemplatePage):
|
|||
return True
|
||||
|
||||
def render(self):
|
||||
action = f"/login?redirect-to={frappe.request.path}"
|
||||
action = f"/login?redirect-to={quote_plus(frappe.request.path)}"
|
||||
if frappe.request.path.startswith("/app/") or frappe.request.path == "/app":
|
||||
action = "/login"
|
||||
frappe.local.message_title = _("Not Permitted")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue