FritzBoxUtils.pm: avoid WARNING on bogus result (Forum #73335)

git-svn-id: https://svn.fhem.de/fhem/trunk@14541 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2017-06-19 09:13:10 +00:00
parent 0077bf94bc
commit b271dc5230

View File

@@ -18,7 +18,7 @@ FB_doCheckPW($$$)
my $data = GetFileFromURL("http://$host/login_sid.lua", undef, undef, 1);
return undef if(!$data);
my $chl;
my $chl="";
$chl = $1 if($data =~ /<Challenge>(\w+)<\/Challenge>/i);
my $chlAnsw .= "$chl-$pw";
$chlAnsw =~ s/(.)/$1.chr(0)/eg; # works probably only with ascii