Closed dvvolynkin closed 8 months ago
setItem in createBrowserClient and createServerClient methods has to remove all old cookie chunks before setting the new chunks
Similar issues can occur if the new cookie is chunked while the old cookie is non chunked or vice versa.
@astonfuture closing because it's been fixed in #726
Bug report
Describe the bug
If an old cookie has a length 3 chunks if the new cookie will have length 2 chunks then it will not delete the last third chunk before setting new chunks.
It will break refreshing algo and then remove all cookies because the new full cookie will be invalid after dechunkinizing.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository: Set a cookie that has 3 chunks Then set a cookie that will have 2 chunks. The second cookie will be invalid.
Expected behavior
The second cookie have to be valid.
Screenshots
If applicable, add screenshots to help explain your problem.
Garbage in the end of the second cookie: