#27604: Use set_signed_cookie for contrib.messages Cookie storage -------------------------------------+------------------------------------- Reporter: Anthony King | Owner: Craig Type: | Anderson Cleanup/optimization | Status: assigned Component: contrib.messages | Version: master Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Claude Paroz):
* needs_better_patch: 1 => 0 Comment: I created a [https://github.com/django/django/pull/12397 new PR] where the storage is using the `Signer` sign and unsign methods. About using `set_signed_cookie`, I don't think it makes sense, because `CookieStorage` has to calculate the length of the signed encoded messages before setting the cookie value. So when we are setting the real cookie value, we already have the signed value at hand. Using `set_signed_cookie` instead of `set_cookie` would simply re-compute needlessly the messages, and would also need refetching a new signer when we have already one at hand (as we need it for the length stuff). -- Ticket URL: <https://code.djangoproject.com/ticket/27604#comment:11> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.74945d846b36908301753173ca7f2c74%40djangoproject.com.