-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility issue with plug_crypto 2.0.0 #1184
Comments
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 🙏 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:
leolaudouard/plug_issue_example@35d2bb3
The text was updated successfully, but these errors were encountered: