Closed leolaudouard closed 9 months ago
Your key length is incompatible. Remove it or set it to 32. :) This means you will log out users once you do a new deploy, so please plan accordingly!
Thanks for the quick answer @josevalim :pray:
What is the constraint? Max length is 32?
I suppose this example should be updated: https://github.com/elixir-plug/plug/blob/main/lib/plug/session/cookie.ex#L62
Hi @josevalim , thanks for your work!
I've found a similar issue when updating the library while using a :key_length of 64 instead of 32 in the Plug.Session.COOKIE.
Should this value still and option when the only valid value is 32? Is listed in the documents here https://hexdocs.pm/plug/Plug.Session.COOKIE.html
Looks like this option is incompatible with plug_crypto's Plug.Crypto.MessageEncryptor.encrypt
Thanks for your time
We upgraded plug to 1.15.1, which landed wth plug_crypto 2.0.0, and we have this error, using session cookie plug.
You can reproduce the issue by starting this application:
https://github.com/leolaudouard/plug_issue_example
iex -S mix
& thencurl localhost:4040/testo
Here is the commit where I add the session cookie, maybe I missed something in the docs:
https://github.com/leolaudouard/plug_issue_example/commit/35d2bb3929f9b24f81a56c914b4e423ee8048c3a