Closed Brovning closed 2 years ago
Korrektur: Es scheint beim Login etwas schiefzugehen. "Cookie Provided" ist leer. --> Als Folge hieraus erhält man bei Data Provided ein 401 "Unauthorized" als Antwort.
Output nach "Test authentification":
Authentication | Return-Code Provided is: 200 Authentication | Login Successful Authentication | Cookie Provided is: Debug: | https://\<IP>:443/proxy/network/api/stat/sites UniFi API Call | Successfully Called UniFi API Call | Data Provided: 401 JSONData | 401
Fehler gefunden:
preg_match_all('|Set-Cookie: (.*);|U', substr($data, 0, $header_size), $results);
Es wird Case-sensitive nach "Set-Cookie" gesucht.
In meinem HTTP Header steht jedoch "set-cookie" in Kleinbuchstaben und somit wird das Cookie nicht gefunden.
Nötige Anpassung:
preg_match_all('|(?i)Set-Cookie: (.*);|U', substr($data, 0, $header_size), $results);
--> Case insensitive Mode = ON
Problem gelöst.
Authentication failure handling improved: 92bb4be65dc91d79af2a7029af4922304a995aef
Pull-request merged to beta. --> Closed
Nach dem Update of der DreamMachine von UnifiOS 1.10.x auf 1.11.x erscheint eine Fehlermeldung im Logging. (verwendete Network Version: 6.5.55)