Merge pull request #16394 from daraelmin/daraelmin-patch-3

Fix #16096 missing CSRF token and use post instead get
This commit is contained in:
Laurent Destailleur 2021-02-23 11:05:29 +01:00 committed by GitHub
commit 7d0d51411b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -574,11 +574,12 @@ function setConstant(url, code, input, entity, strict, forcereload, userid, toke
$.each(data, function(key, value) {
$("#set_" + key).hide();
$("#del_" + key).show();
$.get( url, {
$.post( url, {
action: "set",
name: key,
value: value,
entity: entity
entity: entity,
token: token
});
});
}
@ -644,10 +645,11 @@ function delConstant(url, code, input, entity, strict, forcereload, userid, toke
$.each(data, function(key, value) {
$("#del_" + value).hide();
$("#set_" + value).show();
$.get( url, {
$.post( url, {
action: "del",
name: value,
entity: entity
entity: entity,
token: token
});
});
}