mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed CSRF security vulnerability issue. per Alvin Lindstam. Fixes #4217
Initial patch by: Khushboo Vashi Modified by: Ashesh Vashi and Murtuza Zabuawala
This commit is contained in:
committed by
Akshay Joshi
parent
90a45557b9
commit
6f0eafb223
@@ -9,8 +9,8 @@
|
||||
|
||||
define('misc.dependencies', [
|
||||
'sources/gettext', 'underscore', 'underscore.string', 'jquery', 'backbone',
|
||||
'pgadmin.browser', 'pgadmin.alertifyjs', 'pgadmin.backgrid',
|
||||
], function(gettext, _, S, $, Backbone, pgBrowser, Alertify, Backgrid) {
|
||||
'pgadmin', 'pgadmin.browser', 'pgadmin.alertifyjs', 'pgadmin.backgrid',
|
||||
], function(gettext, _, S, $, Backbone, pgAdmin, pgBrowser, Alertify, Backgrid) {
|
||||
|
||||
if (pgBrowser.NodeDependencies)
|
||||
return pgBrowser.NodeDependencies;
|
||||
@@ -150,7 +150,8 @@ define('misc.dependencies', [
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'GET',
|
||||
beforeSend: function() {
|
||||
beforeSend: function(xhr) {
|
||||
xhr.setRequestHeader(pgAdmin.csrf_token_header, pgAdmin.csrf_token);
|
||||
// Generate a timer for the request
|
||||
timer = setTimeout(function() {
|
||||
// notify user if request is taking longer than 1 second
|
||||
|
||||
Reference in New Issue
Block a user