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