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:
Khushboo Vashi
2019-05-28 10:59:51 +05:30
committed by Akshay Joshi
parent 90a45557b9
commit 6f0eafb223
36 changed files with 387 additions and 124 deletions

View File

@@ -43,8 +43,7 @@ export class RestoreDialog extends Dialog {
const baseUrl = this.url_for_utility_exists(sid);
// Check pg_restore utility exists or not.
let that = this;
let service = axios.create({});
service.get(
axios.get(
baseUrl
).then(function(res) {
if (!res.data.success) {

View File

@@ -140,8 +140,7 @@ export class RestoreDialogWrapper extends DialogWrapper {
this.setExtraParameters(selectedTreeNode, treeInfo);
let service = axios.create({});
service.post(
axios.post(
baseUrl,
this.view.model.toJSON()
).then(function (res) {