From 15451109c6d69bb9d758eaa8f06029806d6a8da4 Mon Sep 17 00:00:00 2001 From: betateilchen Date: Sun, 24 Feb 2019 22:23:21 +0000 Subject: [PATCH] :for debug only git-svn-id: https://svn.fhem.de/fhem/trunk@18722 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/betateilchen/57_Calendar.pm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fhem/contrib/betateilchen/57_Calendar.pm b/fhem/contrib/betateilchen/57_Calendar.pm index d650822a0..bc7cbc033 100644 --- a/fhem/contrib/betateilchen/57_Calendar.pm +++ b/fhem/contrib/betateilchen/57_Calendar.pm @@ -1718,7 +1718,6 @@ sub Calendar_Define($$) { my $url = $a[4]; $url =~ /(^https?:\/\/)(.*:.*@)?(.*)/; - #$1 = https:// $2 = user:password@ $3 = url if($2) { # credentials found in url, store them in keystore setKeyValue($name,$2); @@ -1726,15 +1725,11 @@ sub Calendar_Define($$) { $hash->{DEF} = "$a[2] $a[3] $url"; } - $url =~ /(^https?:\/\/.*google.*)(\/private-.*\/)(.*)/; - #$1 = https:// $2 = /private-.*/ $3 = url + $url =~ /(^https?:\/\/.*google.*\/)(private-.*)(\/.*)/; if($2) { - # private key found in url, store them in keystore - $url = $1.'/credentials@/'.$3; - my $cred = $2; - $cred =~ s/^\/|\/$//g; - Debug $cred; - setKeyValue($name,$cred); + # private key found in url, store it in keystore + setKeyValue($name,$2); + $url = $1.'credentials@'.$3; $hash->{DEF} = "$a[2] $a[3] $url"; }