#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:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Craig Anderson):

 What should happen to cookies signed with the existing hashing method?

 I haven't tested this (yet), but it looks like messages stored with the
 old hashing method will be silently ignored.

 We could:
 1. accept that messages from Django < 2.3 (?) are ignored;
 2. add the existing `_hash` implementation into `_decode` for these legacy
 messages; or
 3. just close this ticket.

 I'll go ahead and implement option 2 as it's the safest.

 However, as I've never left messages in storage for more than one or two
 request-response cycles, option 1 strikes me as reasonable and much
 cleaner.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/27604#comment:6>
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 post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.158a049ff9328ffe1b356e9d456a690d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to