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
@@ -12,6 +12,7 @@ import url_for from 'sources/url_for';
|
||||
import $ from 'jquery';
|
||||
import * as Alertify from 'pgadmin.alertifyjs';
|
||||
import * as SqlEditorUtils from 'sources/sqleditor_utils';
|
||||
|
||||
var modifyAnimation = require('sources/modify_animation');
|
||||
|
||||
const pgBrowser = pgAdmin.Browser = pgAdmin.Browser || {};
|
||||
@@ -88,10 +89,14 @@ _.extend(pgBrowser, {
|
||||
|
||||
// Get and cache the preferences
|
||||
cache_preferences: function (modulesChanged) {
|
||||
var self = this;
|
||||
var self = this,
|
||||
headers = {};
|
||||
headers[pgAdmin.csrf_token_header] = pgAdmin.csrf_token;
|
||||
|
||||
setTimeout(function() {
|
||||
$.ajax({
|
||||
url: url_for('preferences.get_all'),
|
||||
headers: headers,
|
||||
})
|
||||
.done(function(res) {
|
||||
self.preferences_cache = res;
|
||||
|
||||
Reference in New Issue
Block a user