diff --git a/FHEM/01_FHEMWEB.pm b/FHEM/01_FHEMWEB.pm index 15eaabb07..4176b0ce6 100755 --- a/FHEM/01_FHEMWEB.pm +++ b/FHEM/01_FHEMWEB.pm @@ -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); diff --git a/www/pgm2/console.js b/www/pgm2/console.js index d6adcc9fc..4b9a454e2 100644 --- a/www/pgm2/console.js +++ b/www/pgm2/console.js @@ -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, " ");