Fix frontend for extensions for CSRF protections
This commit is contained in:
parent
1ee5068f0d
commit
aa228c43b2
@ -255,7 +255,7 @@ Refine.DatabaseImportController.prototype._updatePreview = function() {
|
|||||||
$.post(
|
$.post(
|
||||||
"command/core/importing-controller?" + $.param({
|
"command/core/importing-controller?" + $.param({
|
||||||
"controller": "database/database-import-controller",
|
"controller": "database/database-import-controller",
|
||||||
"jobID": this._jobID,
|
"jobID": self._jobID,
|
||||||
"subCommand": "parse-preview",
|
"subCommand": "parse-preview",
|
||||||
"csrf_token": token
|
"csrf_token": token
|
||||||
}),
|
}),
|
||||||
@ -339,7 +339,7 @@ Refine.DatabaseImportController.prototype._createProject = function() {
|
|||||||
$.post(
|
$.post(
|
||||||
"command/core/importing-controller?" + $.param({
|
"command/core/importing-controller?" + $.param({
|
||||||
"controller": "database/database-import-controller",
|
"controller": "database/database-import-controller",
|
||||||
"jobID": this._jobID,
|
"jobID": self._jobID,
|
||||||
"subCommand": "create-project",
|
"subCommand": "create-project",
|
||||||
"csrf_token": token
|
"csrf_token": token
|
||||||
}),
|
}),
|
||||||
|
@ -322,12 +322,12 @@ Refine.GDataImportingController.prototype._updatePreview = function() {
|
|||||||
$.post(
|
$.post(
|
||||||
"command/core/importing-controller?" + $.param({
|
"command/core/importing-controller?" + $.param({
|
||||||
"controller": "gdata/gdata-importing-controller",
|
"controller": "gdata/gdata-importing-controller",
|
||||||
"jobID": this._jobID,
|
"jobID": self._jobID,
|
||||||
"subCommand": "parse-preview",
|
"subCommand": "parse-preview",
|
||||||
"csrf_token": token
|
"csrf_token": token
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
"options" : JSON.stringify(this.getOptions())
|
"options" : JSON.stringify(self.getOptions())
|
||||||
},
|
},
|
||||||
function(result) {
|
function(result) {
|
||||||
if (result.status == "ok") {
|
if (result.status == "ok") {
|
||||||
@ -395,7 +395,7 @@ Refine.GDataImportingController.prototype._createProject = function() {
|
|||||||
$.post(
|
$.post(
|
||||||
"command/core/importing-controller?" + $.param({
|
"command/core/importing-controller?" + $.param({
|
||||||
"controller": "gdata/gdata-importing-controller",
|
"controller": "gdata/gdata-importing-controller",
|
||||||
"jobID": this._jobID,
|
"jobID": self._jobID,
|
||||||
"subCommand": "create-project",
|
"subCommand": "create-project",
|
||||||
"csrf_token": token
|
"csrf_token": token
|
||||||
}),
|
}),
|
||||||
|
@ -56,8 +56,8 @@ Refine.wrapCSRF = function(onCSRF) {
|
|||||||
Refine.postCSRF = function(url, data, success, dataType, failCallback) {
|
Refine.postCSRF = function(url, data, success, dataType, failCallback) {
|
||||||
return Refine.wrapCSRF(function(token) {
|
return Refine.wrapCSRF(function(token) {
|
||||||
var fullData = data || {};
|
var fullData = data || {};
|
||||||
if (typeof fulldata == 'string') {
|
if (typeof fullData == 'string') {
|
||||||
fullData = fullData + $.param({csrf_token: token});
|
fullData = fullData + "&" + $.param({csrf_token: token});
|
||||||
} else {
|
} else {
|
||||||
fullData['csrf_token'] = token;
|
fullData['csrf_token'] = token;
|
||||||
}
|
}
|
||||||
|
@ -55,8 +55,8 @@ Refine.wrapCSRF = function(onCSRF) {
|
|||||||
Refine.postCSRF = function(url, data, success, dataType, failCallback) {
|
Refine.postCSRF = function(url, data, success, dataType, failCallback) {
|
||||||
return Refine.wrapCSRF(function(token) {
|
return Refine.wrapCSRF(function(token) {
|
||||||
var fullData = data || {};
|
var fullData = data || {};
|
||||||
if (typeof fulldata == 'string') {
|
if (typeof fullData == 'string') {
|
||||||
fullData = fullData + $.param({csrf_token: token});
|
fullData = fullData + "&" + $.param({csrf_token: token});
|
||||||
} else {
|
} else {
|
||||||
fullData['csrf_token'] = token;
|
fullData['csrf_token'] = token;
|
||||||
}
|
}
|
||||||
|
@ -420,8 +420,8 @@ Refine.wrapCSRF = function(onCSRF) {
|
|||||||
Refine.postCSRF = function(url, data, success, dataType) {
|
Refine.postCSRF = function(url, data, success, dataType) {
|
||||||
Refine.wrapCSRF(function(token) {
|
Refine.wrapCSRF(function(token) {
|
||||||
var fullData = data || {};
|
var fullData = data || {};
|
||||||
if (typeof fulldata == 'string') {
|
if (typeof fullData == 'string') {
|
||||||
fullData = fullData + $.param({csrf_token: token});
|
fullData = fullData + "&" + $.param({csrf_token: token});
|
||||||
} else {
|
} else {
|
||||||
fullData['csrf_token'] = token;
|
fullData['csrf_token'] = token;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user