Fix authorization with firmware v3.0.*
After upgrade to firmware version 3.0.41-IMS-KDG
vodafone-station-exporter stopped working
crashing with a segmentation violation after querying
/api/v1/phone_calllog/1,2/CallTbl.
Checking the HTTP traffic all API requests requiring authentication
failed with HTTP error 401 and JSON response
{"error":"error","message":"Unauthorized user!"}
Adding a simple GET request to /api/v1/session/menu directly after the
final login POST request fixes this.
This commit is contained in:
parent
ce763bb1a9
commit
cd742fe7b6
1 changed files with 4 additions and 0 deletions
|
|
@ -257,6 +257,10 @@ func (v *VodafoneStation) Login() (*LoginResponse, error) {
|
|||
if loginResponse.Error != "ok" {
|
||||
return nil, fmt.Errorf("Got non error=ok message from vodafone station")
|
||||
}
|
||||
_, err = v.doRequest("GET", v.URL+"/api/v1/session/menu", "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return loginResponse, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue