Fixed a XSS vulnerability in the /settings/store endpoint. #7282

This commit is contained in:
Yogesh Mahajan 2024-04-10 17:58:51 +05:30 committed by GitHub
parent 30d2d1b23e
commit e384c9665a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 6 deletions

View File

@ -139,7 +139,7 @@ define('pgadmin.browser.node', [
},
enable: _.isFunction(self.canEdit) ?
function() {
return !!(self.canEdit(arguments));
return !!(self.canEdit(...arguments));
} : (!!self.canEdit),
}]);
}
@ -159,7 +159,7 @@ define('pgadmin.browser.node', [
},
enable: _.isFunction(self.canDrop) ?
function() {
return !!(self.canDrop(arguments));
return !!(self.canDrop(...arguments));
} : (!!self.canDrop),
}]);
@ -177,7 +177,7 @@ define('pgadmin.browser.node', [
},
enable: _.isFunction(self.canDropCascade) ?
function() {
return self.canDropCascade(arguments);
return self.canDropCascade(...arguments);
} : (!!self.canDropCascade),
}]);
}

View File

@ -38,7 +38,6 @@
define('pgadmin.browser.utils',
['sources/pgadmin'], function(pgAdmin) {
let pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
pgBrowser['MainMenus'] = [];
@ -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 }}',

View File

@ -408,7 +408,7 @@ export class Tree {
}
findNodeByDomElement(domElement) {
const path = domElement.path;
const path = domElement?.path;
if (!path?.[0]) {
return undefined;
}