Skip to content

Commit edb025e

Browse files
authored
Update for working with csrfToken in fhem
Fix for function "sveReadGADList()" working with csrfToken in fhem.
1 parent 2afe473 commit edb025e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

www/pgm2/fronthemEditor.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939

4040
function sveReadGADList(device) {
4141
console.log('read list');
42+
var token = $("body").attr('fwcsrf') ? '&fwcsrf=' + $("body").attr('fwcsrf') : '';
4243
var url = $(location).attr('pathname');
4344
var transfer = {};
4445
transfer.cmd = 'gadList';
45-
var dataString = 'dev.' + device + '=' + device + '&cmd.' + device + '=get&arg.' + device + '=webif-data&val.' + device + '=' + JSON.stringify(transfer) + '&XHR=1';
46-
dataString = addcsrf(dataString);
46+
var dataString = 'dev.' + device + '=' + device + '&cmd.' + device + '=get&arg.' + device + '=webif-data&val.' + device + '=' + JSON.stringify(transfer) + '&XHR=1' + token;
4747
$.ajax({
4848
type: "POST",
4949
url: url,

0 commit comments

Comments
 (0)