From c5d5d3ad4837dac002dab58fd559935d97916efb Mon Sep 17 00:00:00 2001 From: moises <> Date: Wed, 8 Jun 2022 16:03:39 +0000 Subject: [PATCH] 38_netatmo: fixed csrf error on home notification settings git-svn-id: https://svn.fhem.de/fhem/trunk@26137 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/38_netatmo.pm | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index fcd612328..559bfca0a 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 38_netatmo: fixed csrf error on home notification settings - bugfix: 10_SOMFY: Correct match for long commands according to #msg1224029 - bugfix: 70_Klafs: Start time error fixed - bugfix: 70_Klafs: minor bugfix for Reading power diff --git a/fhem/FHEM/38_netatmo.pm b/fhem/FHEM/38_netatmo.pm index 116a133a7..f9e5c70f6 100644 --- a/fhem/FHEM/38_netatmo.pm +++ b/fhem/FHEM/38_netatmo.pm @@ -11,7 +11,7 @@ # # ############################################################################## -# Release 25 / 2022-03-2 +# Release 26 / 2022-06-08 package main; @@ -2275,7 +2275,7 @@ netatmo_setNotifications($$$) if( !defined($iohash->{csrf_token}) ) { my($err0,$data0) = HttpUtils_BlockingGet({ - url => "https://auth.netatmo.com/en-us/access/login", + url => "https://auth.netatmo.com/access/csrf", timeout => 10, noshutdown => 1, }); @@ -2285,7 +2285,7 @@ netatmo_setNotifications($$$) return undef; } #Log3 $name, 1, "$name: CSRF\n".$data0; - $data0 =~ /csrf-token" content="(.*)"/; + $data0 =~ /{"token":"(.*)"}/; my $tmptoken = $1; $iohash->{csrf_token} = $tmptoken; if(!defined($iohash->{csrf_token})) {