ha-multiscrape
ha-multiscrape copied to clipboard
Authentication cookies not forwarded
Version of the custom_component
latest
Configuration
multiscrape:
- resource: "http://192.168.0.1:1234/cgi-bin/reboot.sh?boot=now"
scan_interval: 60000
log_response: True
button:
- unique_id: reboot_router
name: reboot router
form_submit:
submit_once: True
resubmit_on_error: False
resource: "http://192.168.0.1:1234/cgi-bin/get_password_cookie.sh"
input:
password: 'withChar&$#SG8Mb"^'
sensor:
- select: ""
name: reboot_router```
## Describe the bug
From form_submit_response_body.txt I see the cookies are set correctly
Set-Cookie:hash=D678DFD98D668721F6E37F6F20E1EE9DDFF168FF382DF82E61E6E2F7DF189D68; Path=/;
Set-Cookie:exp=1692908272; Path=/;
in page_request_headers.txt I would expect those cookies, but there's "None"
in page_response_body.txt I see the error that I'm not logged on.
I'm doing something wrong?
Will https://github.com/danieldotnl/ha-multiscrape/pull/327 fix the problem? If so looking forward to feedback. :)
Will #327 fix the problem? If so looking forward to feedback. :)
Me too!
I'm experiencing this too. I'm attempting to scape a mocreo hub using the configuration similar to here: https://gist.github.com/sdrapha/a942171c3ff0ca16b3f74fab6a3e919a
With log_response enabled, I see the set-cookie header being returned from the form in form_submit_response_headers.txt Headers({'content-type': 'text/html; charset=UTF-8', 'set-cookie': 'id=b03494a0-68d8-f13a-c780-8892c20caa1c; Max-Age=86400;'})
but in page_request_headers.txt is only {}
I tried with 7.0.3 and also going back to 6.8 and this still seems to be the case
Does the login form not save cookies between requests? How could it ever have worked for anyone? What am I missing??
Thanks!
Actually, I think #368 solves this issue.
Please try release 7.1.2 and let me know if it addresses your issue!