mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 12:46:03 +00:00
GUEST ENIGMA2 RESIDENTS PHTV ONKYO_AVR ROOMMATE: improve stability when $FW_wname is not set
git-svn-id: https://svn.fhem.de/fhem/trunk@9140 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c637b00210
commit
9dd45f5383
@ -282,8 +282,10 @@ sub RESIDENTS_Set($@) {
|
|||||||
|
|
||||||
# depending on current FHEMWEB instance's allowedCommands,
|
# depending on current FHEMWEB instance's allowedCommands,
|
||||||
# restrict set commands if there is "set-user" in it
|
# restrict set commands if there is "set-user" in it
|
||||||
my $adminMode = 1;
|
my $adminMode = 1;
|
||||||
my $FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 );
|
my $FWallowedCommands = 0;
|
||||||
|
$FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 )
|
||||||
|
if ( defined($FW_wname) );
|
||||||
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
||||||
$adminMode = 0;
|
$adminMode = 0;
|
||||||
return "Forbidden command: set " . $a[1]
|
return "Forbidden command: set " . $a[1]
|
||||||
|
@ -287,8 +287,10 @@ sub GUEST_Set($@) {
|
|||||||
|
|
||||||
# depending on current FHEMWEB instance's allowedCommands,
|
# depending on current FHEMWEB instance's allowedCommands,
|
||||||
# restrict set commands if there is "set-user" in it
|
# restrict set commands if there is "set-user" in it
|
||||||
my $adminMode = 1;
|
my $adminMode = 1;
|
||||||
my $FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 );
|
my $FWallowedCommands = 0;
|
||||||
|
$FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 )
|
||||||
|
if ( defined($FW_wname) );
|
||||||
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
||||||
$adminMode = 0;
|
$adminMode = 0;
|
||||||
return "Forbidden command: set " . $a[1]
|
return "Forbidden command: set " . $a[1]
|
||||||
|
@ -292,8 +292,10 @@ sub ROOMMATE_Set($@) {
|
|||||||
|
|
||||||
# depending on current FHEMWEB instance's allowedCommands,
|
# depending on current FHEMWEB instance's allowedCommands,
|
||||||
# restrict set commands if there is "set-user" in it
|
# restrict set commands if there is "set-user" in it
|
||||||
my $adminMode = 1;
|
my $adminMode = 1;
|
||||||
my $FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 );
|
my $FWallowedCommands = 0;
|
||||||
|
$FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 )
|
||||||
|
if ( defined($FW_wname) );
|
||||||
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
||||||
$adminMode = 0;
|
$adminMode = 0;
|
||||||
return "Forbidden command: set " . $a[1]
|
return "Forbidden command: set " . $a[1]
|
||||||
|
@ -212,8 +212,10 @@ sub ENIGMA2_Set($@) {
|
|||||||
|
|
||||||
# depending on current FHEMWEB instance's allowedCommands,
|
# depending on current FHEMWEB instance's allowedCommands,
|
||||||
# restrict set commands if there is "set-user" in it
|
# restrict set commands if there is "set-user" in it
|
||||||
my $adminMode = 1;
|
my $adminMode = 1;
|
||||||
my $FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 );
|
my $FWallowedCommands = 0;
|
||||||
|
$FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 )
|
||||||
|
if ( defined($FW_wname) );
|
||||||
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
||||||
$adminMode = 0;
|
$adminMode = 0;
|
||||||
return "Forbidden command: set " . $a[1]
|
return "Forbidden command: set " . $a[1]
|
||||||
|
@ -609,8 +609,10 @@ sub ONKYO_AVR_Set($@) {
|
|||||||
|
|
||||||
# depending on current FHEMWEB instance's allowedCommands,
|
# depending on current FHEMWEB instance's allowedCommands,
|
||||||
# restrict set commands if there is "set-user" in it
|
# restrict set commands if there is "set-user" in it
|
||||||
my $adminMode = 1;
|
my $adminMode = 1;
|
||||||
my $FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 );
|
my $FWallowedCommands = 0;
|
||||||
|
$FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 )
|
||||||
|
if ( defined($FW_wname) );
|
||||||
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
||||||
$adminMode = 0;
|
$adminMode = 0;
|
||||||
return "Forbidden command: set " . $a[1]
|
return "Forbidden command: set " . $a[1]
|
||||||
|
@ -283,8 +283,10 @@ sub PHTV_Set($@) {
|
|||||||
|
|
||||||
# depending on current FHEMWEB instance's allowedCommands,
|
# depending on current FHEMWEB instance's allowedCommands,
|
||||||
# restrict set commands if there is "set-user" in it
|
# restrict set commands if there is "set-user" in it
|
||||||
my $adminMode = 1;
|
my $adminMode = 1;
|
||||||
my $FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 );
|
my $FWallowedCommands = 0;
|
||||||
|
$FWallowedCommands = AttrVal( $FW_wname, "allowedCommands", 0 )
|
||||||
|
if ( defined($FW_wname) );
|
||||||
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
if ( $FWallowedCommands && $FWallowedCommands =~ m/\bset-user\b/ ) {
|
||||||
$adminMode = 0;
|
$adminMode = 0;
|
||||||
return "Forbidden command: set " . $a[1]
|
return "Forbidden command: set " . $a[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user