Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19387 closed Bug (fixed)

CookieStorage does not encode/decode SafeData properly

Reported by: bak1an Owned by: claudep
Component: contrib.messages Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When i'm trying to send a Message to user with some SafeData inside (e.g. a link) and message is saved in CookieStorage i get just str back from storage. With SessionStorage everything works, which is expected because it does not converts messages to json and back.

Here is a branch with tests and proposed solution:
cookie_storage

Change History (6)

comment:1 Changed 3 years ago by bak1an

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by russellm

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 3 years ago by claudep

  • Owner changed from bak1an to claudep

comment:4 Changed 3 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In e277301c2c96915ba1408d57a866bc65e51de95a:

Fixed #19387 -- Preserved SafeData status in contrib.messages

Thanks Anton Baklanov for the report and the patch.

comment:5 Changed 3 years ago by Claude Paroz <claude@…>

In be10289d03332da7c074e93f8a1541baa29c1990:

[1.5.x] Fixed #19387 -- Preserved SafeData status in contrib.messages

Thanks Anton Baklanov for the report and the patch.
Backport of e277301c2 from master.

comment:6 Changed 3 years ago by Claude Paroz <claude@…>

In 9e7183073f64e541587e8dcfd8bb3ddeb47f8162:

[1.5.x] Added compatibility with legacy message length

Added compatibility code to not break when decoding messages
encoded on pre-1.5 versions.
Refs #19387. Thanks Florian Apolloner for noticing the issue.

Note: See TracTickets for help on using tickets.
Back to Top