mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
01_FHEMWEB.js: avoid converting of csrf to Float.
fhemweb.js: avoid JS-Error if Websocket does not work (Forum #64541) git-svn-id: https://svn.fhem.de/fhem/trunk@13103 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ede2dc252f
commit
466e83b58f
@ -275,7 +275,7 @@ FW_Define($$)
|
||||
InternalTimer(1, sub(){
|
||||
if($featurelevel >= 5.8 && !AttrVal($name, "csrfToken", undef)) {
|
||||
my ($x,$y) = gettimeofday();
|
||||
$hash->{CSRFTOKEN} = rand($y)*rand($x);
|
||||
$hash->{CSRFTOKEN} = "fhem_".(rand($y)*rand($x));
|
||||
}
|
||||
}, $hash, 0);
|
||||
|
||||
|
@ -41,6 +41,8 @@ consUpdate(evt)
|
||||
new_content = consConn.responseText.substring(consLastIndex, len);
|
||||
consLastIndex = len;
|
||||
}
|
||||
if(new_content == undefined || new_content.length == 0)
|
||||
return;
|
||||
log("Console Rcvd: "+new_content);
|
||||
if(new_content.indexOf('<') != 0)
|
||||
new_content = new_content.replace(/ /g, " ");
|
||||
|
Loading…
Reference in New Issue
Block a user