72_FB_CALLMONITOR.pm: Passwort Sicherheit
git-svn-id: https://svn.fhem.de/fhem/trunk@27455 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -40,7 +40,7 @@ use HttpUtils;
|
|||||||
use DevIo;
|
use DevIo;
|
||||||
use FritzBoxUtils;
|
use FritzBoxUtils;
|
||||||
|
|
||||||
my $ModulVersion = "07.50.3a";
|
my $ModulVersion = "07.50.3b";
|
||||||
my %tellows = ();
|
my %tellows = ();
|
||||||
my %connection_type = (
|
my %connection_type = (
|
||||||
0 => "FON1",
|
0 => "FON1",
|
||||||
@@ -2320,6 +2320,17 @@ sub FB_CALLMONITOR_readPassword($;$)
|
|||||||
my ($hash, $testPassword) = @_;
|
my ($hash, $testPassword) = @_;
|
||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
|
|
||||||
|
my $xline = ( caller(0) )[2];
|
||||||
|
my $xsubroutine = ( caller(1) )[3];
|
||||||
|
my $sub = ( split( ':', $xsubroutine ) )[2];
|
||||||
|
$sub =~ s/FB_CALLMONITOR_// if ( defined $sub );
|
||||||
|
$sub ||= 'no-subroutine-specified';
|
||||||
|
|
||||||
|
if ($sub !~ /readRemotePhonebookViaTelnet|requestHTTPviaTR064|identifyPhoneBooksViaWeb|readRemotePhonebookViaWeb/) {
|
||||||
|
FB_CALLMONITOR_Log $hash, 2, "EMERGENCY: unauthorized call for reading password from: $sub";
|
||||||
|
return undef;
|
||||||
|
}
|
||||||
|
|
||||||
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
|
my $index = $hash->{TYPE}."_".$hash->{NAME}."_passwd";
|
||||||
my $key = getUniqueId().$index;
|
my $key = getUniqueId().$index;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user