Skip to content

Commit

Permalink
Fixed a XSS vulnerability in the /settings/store endpoint. #7282
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshmahajan-1903 committed Apr 10, 2024
1 parent 30d2d1b commit e384c96
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions web/pgadmin/browser/static/js/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ define('pgadmin.browser.node', [
},
enable: _.isFunction(self.canEdit) ?
function() {
return !!(self.canEdit(arguments));
return !!(self.canEdit(...arguments));
} : (!!self.canEdit),
}]);
}
Expand All @@ -159,7 +159,7 @@ define('pgadmin.browser.node', [
},
enable: _.isFunction(self.canDrop) ?
function() {
return !!(self.canDrop(arguments));
return !!(self.canDrop(...arguments));
} : (!!self.canDrop),
}]);

Expand All @@ -177,7 +177,7 @@ define('pgadmin.browser.node', [
},
enable: _.isFunction(self.canDropCascade) ?
function() {
return self.canDropCascade(arguments);
return self.canDropCascade(...arguments);
} : (!!self.canDropCascade),
}]);
}
Expand Down
3 changes: 1 addition & 2 deletions web/pgadmin/browser/templates/browser/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

define('pgadmin.browser.utils',
['sources/pgadmin'], function(pgAdmin) {

let pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};

pgBrowser['MainMenus'] = [];
Expand Down Expand Up @@ -86,7 +85,7 @@ define('pgadmin.browser.utils',
];

pgBrowser.utils = {
layout: '{{ layout }}',
layout: {{ layout|tojson }},
theme: '{{ theme }}',
pg_help_path: '{{ pg_help_path }}',
tabSize: '{{ editor_tab_size }}',
Expand Down
2 changes: 1 addition & 1 deletion web/pgadmin/static/js/tree/tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ export class Tree {
}

findNodeByDomElement(domElement) {
const path = domElement.path;
const path = domElement?.path;
if (!path?.[0]) {
return undefined;
}
Expand Down

0 comments on commit e384c96

Please sign in to comment.