fishbigger / TapoP100

A module for controlling the TP-Link Tapo P100 Plugs
MIT License
567 stars 139 forks source link

Improve parsing of cookie, thus removing trailing ; #77

Closed tking2 closed 1 year ago

tking2 commented 1 year ago

This PR fixes #76 by correctly passing the correct cookie for TP_SESSIONID. A simple error in the code included a trailing semicolon at the end. It is apparent that legacy firmware versions ignored this, but P100 1.1.0 and P110 1.0.16 now treats this as invalid. May also resolve #74

vladak commented 1 year ago

Perhaps it should use http.cookies for even better robustness (ala https://gist.github.com/iximiuz/c8d16ce16759eddf6664)

quinot commented 1 year ago

Problem reproduced here and solution confirmed working, thanks @tking2

sangimed commented 1 year ago

Hello,

Anyone can merge the PR please ?

pnuu commented 1 year ago

Tested with L530, and indeed fixes #74 . Hope to get this merge ASAP!

fishbigger commented 1 year ago

So sorry I didn't get to merging this sooner. Looks good :)