diff --git a/frappe/model/db_query.py b/frappe/model/db_query.py index b91d6a49b8..333e494ef1 100644 --- a/frappe/model/db_query.py +++ b/frappe/model/db_query.py @@ -1120,8 +1120,9 @@ class DatabaseQuery: tbl = tbl[4:-1] frappe.throw(_("Please select atleast 1 column from {0} to sort/group").format(tbl)) - if function in blacklisted_sql_functions: - frappe.throw(_("Cannot use {0} in order/group by").format(field)) + # Check if the function is used anywhere in the field + if any(func in function for func in blacklisted_sql_functions): + frappe.throw(_("Cannot use {0} in order/group by").format(function)) def add_limit(self): if self.limit_page_length: diff --git a/frappe/recorder.py b/frappe/recorder.py index facdcc416d..a5706c8466 100644 --- a/frappe/recorder.py +++ b/frappe/recorder.py @@ -259,7 +259,7 @@ class Recorder: def dump(self): if not self._recording: return - profiler_output = self.process_profiler() + profiler_output = self.process_profiler() or "" request_data = { "uuid": self.uuid, @@ -277,7 +277,7 @@ class Recorder: request_data["calls"] = self.calls request_data["headers"] = self.headers request_data["form_dict"] = self.form_dict - request_data["profile"] = profiler_output + request_data["profile"] = "".join(profiler_output.splitlines(keepends=True)[:200]) frappe.cache.hset(RECORDER_REQUEST_HASH, self.uuid, request_data) if self.config.record_sql: diff --git a/frappe/www/login.html b/frappe/www/login.html index 2cf043dba0..97f9dfc778 100644 --- a/frappe/www/login.html +++ b/frappe/www/login.html @@ -99,6 +99,23 @@ {% endfor %} + + {% if login_with_frappe_cloud_url %} +
+
+ +
+
+ {% endif %} + {% if login_with_email_link %}