74_THINKINGCLEANER.pm: prevent people from using roomba's own address for webhook backwards connection to FHEM

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12321 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2016-10-11 08:28:22 +00:00
parent adbd26e9cb
commit 6750b6e04e

View File

@ -883,6 +883,12 @@ sub THINKINGCLEANER_Attr(@) {
&& $attrName eq "webhookHttpHostname" && $attrName eq "webhookHttpHostname"
&& $attrVal !~ /^([A-Za-z_.0-9]+\.[A-Za-z_.0-9]+)|[0-9:]+$/ ); && $attrVal !~ /^([A-Za-z_.0-9]+\.[A-Za-z_.0-9]+)|[0-9:]+$/ );
return
"Invalid value for attribute $attrName: needs to be different from the defined name/address of your Roomba, we need to know how Rooma can connect back to FHEM here!"
if ( $attrVal
&& $attrName eq "webhookHttpHostname"
&& $attrVal eq $hash->{DeviceName} );
return return
"Invalid value for attribute $attrName: FHEMWEB instance $attrVal not existing" "Invalid value for attribute $attrName: FHEMWEB instance $attrVal not existing"
if ( if (