Closed cons0l3 closed 1 year ago
I fixed this issue only yesterday! It's not in the master branch though, it's in the pylontech branch, where I'm currently making a lot of changes
Thanks Stuart, I will setup "pio" and compile and burn the pylontech branch.
Hi Stuart, I have successfully compiled and uploaded (commit #6a2dba39afed4312efc57b9bd509085ad3716c79 from branch pylonbatteryemulation). I will close the issue, and re-test after it has been merged with master.
Hi Stuart et al.,
first of all, great work. Thanks! I will put something into the cookie jar.
When trying to save changed rule parameters, I receive a "Failed to save settings" (POST /post/saverules) returns a 400 with an "Invalid cookie" in the response. All other "Save"-operations work great. So I compared the POST of eg. /post/saventp request header with the header for /post/saverules. Everything important e.g. Cookie looks exactly the same.
I have identified the function "validateXSSWithPOST" and checked if the "xss" parameter in the request body (form-data) is properly set. It is in all requests. Its value equals the Cookie.
The ESP-LOG puts out a
W (12468745) diybms-webfuncs: xss query key returned not OK
, which implies thathttpd_query_key_value(postbuffer, "xss", param, sizeof(param)) == ESP_OK
is not ok.I found the
$.ajaxPrefilter
function inpagecode.js
which injects the xss-parameter in every POST request. Looks fine.Why does this work for all the other posts, but not the /post/saverules? My debug-capabilities are reading the source code. Your setup propably allows debugging into a running ESP32.
Could you please look into it. Or tell me to clear my browser cache, which I have already tried ;.) Thanks.
I run an esp32, Controller with HW-version c8f1403, Cellmodules v4.4 (HW-version 09be325).
The software version of the controller...