2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-12 16:46:35 +00:00

95_Dashboard: fixed issue with csrf token preventing ajax requests to succeed

git-svn-id: https://svn.fhem.de/fhem/trunk@13650 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Talkabout 2017-03-08 20:52:03 +00:00
parent 672938ed23
commit 18080badda
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- bugfix: 95_Dashboard: fixed issue with csrf token that prevents
ajax request to succeed
- feature: 71_YAMAHA_NP: Code rewritten for improved usabiliy. See docs.
- new: 98_MediaList: adds support to navigate through local attached
media library, pls see https://wiki.fhem.de/wiki/MediaList

View File

@ -64,7 +64,7 @@ function dashboard_showsvgIcon(svgIcon, svgColor, destObj) {
type: "GET",
contentType: "application/json",
data: "{}",
url: svgIcon + "&XHR=1",
url: svgIcon + "&XHR=1&fwcsrf=" + $('body').attr('fwcsrf'),
dataType: "text",
success: function(data) {
if (data) {
@ -97,7 +97,7 @@ function dashboard_getData(jsonurl, get, dType, cb) {//get Dashboard config
type: "POST",
contentType: "application/json",
data: "{}",
url: jsonurl+" "+get+"&XHR=1",
url: jsonurl+" "+get+"&XHR=1&fwcsrf=" + $('body').attr('fwcsrf'),
dataType: dType,
success: function(data) {
if (get == "config") {for (var key in data.CONFIG) {if (data.CONFIG.hasOwnProperty(key)) {DashboardConfigHash[key] = data.CONFIG[key];} } }