From a21f18a3164dd99077ea4503ffb16b47271214b1 Mon Sep 17 00:00:00 2001 From: loredo Date: Tue, 11 Oct 2016 08:28:22 +0000 Subject: [PATCH] 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@12321 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/74_THINKINGCLEANER.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fhem/FHEM/74_THINKINGCLEANER.pm b/fhem/FHEM/74_THINKINGCLEANER.pm index 979ddc2b0..66bfd9186 100644 --- a/fhem/FHEM/74_THINKINGCLEANER.pm +++ b/fhem/FHEM/74_THINKINGCLEANER.pm @@ -883,6 +883,12 @@ sub THINKINGCLEANER_Attr(@) { && $attrName eq "webhookHttpHostname" && $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 "Invalid value for attribute $attrName: FHEMWEB instance $attrVal not existing" if (