Fix query tool launch error if user name contain html characters. Fixes #4674

This commit is contained in:
Aditya Toshniwal 2019-08-28 10:46:28 +05:30 committed by Akshay Joshi
parent 28b741a13a
commit dbbbb2e5ed
4 changed files with 5 additions and 4 deletions

View File

@ -30,3 +30,4 @@ Bug fixes
| `Issue #4644 <https://redmine.postgresql.org/issues/4644>`_ - Fix length and precision enable/disable issue when changing the data type for Domain node. | `Issue #4644 <https://redmine.postgresql.org/issues/4644>`_ - Fix length and precision enable/disable issue when changing the data type for Domain node.
| `Issue #4650 <https://redmine.postgresql.org/issues/4650>`_ - Fix SQL tab issue for Views. It's a regression of compound triggers. | `Issue #4650 <https://redmine.postgresql.org/issues/4650>`_ - Fix SQL tab issue for Views. It's a regression of compound triggers.
| `Issue #4657 <https://redmine.postgresql.org/issues/4657>`_ - Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container. | `Issue #4657 <https://redmine.postgresql.org/issues/4657>`_ - Fix PGADMIN_SERVER_JSON_FILE environment variable support in the container.
| `Issue #4674 <https://redmine.postgresql.org/issues/4674>`_ - Fix query tool launch error if user name contain html characters.

View File

@ -227,7 +227,7 @@ define('pgadmin.datagrid', [
queryToolForm +=` queryToolForm +=`
</form> </form>
<script> <script>
document.getElementById("title").value = "${panel_title}"; document.getElementById("title").value = "${_.escape(panel_title)}";
document.getElementById("queryToolForm").submit(); document.getElementById("queryToolForm").submit();
</script> </script>
`; `;

View File

@ -52,6 +52,6 @@ export function setQueryToolDockerTitle(panel, is_query_tool, panel_title, is_fi
panel_icon = 'fa fa-bolt'; panel_icon = 'fa fa-bolt';
} }
panel.title('<span title="'+ panel_tooltip +'">'+ panel_title +'</span>'); panel.title('<span title="'+ _.escape(panel_tooltip) +'">'+ _.escape(panel_title) +'</span>');
panel.icon(panel_icon); panel.icon(panel_icon);
} }

View File

@ -3436,7 +3436,7 @@ define('tools.querytool', [
// Find the title of the visible panel // Find the title of the visible panel
_.each(window.top.pgAdmin.Browser.docker.findPanels('frm_datagrid'), function(p) { _.each(window.top.pgAdmin.Browser.docker.findPanels('frm_datagrid'), function(p) {
if (p.isVisible()) { if (p.isVisible()) {
self.gridView.panel_title = $(p._title).html(); self.gridView.panel_title = $(p._title).text();
} }
}); });