Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#19387 closed Bug (fixed)

CookieStorage does not encode/decode SafeData properly

Reported by: Anton Baklanov Owned by: Claude Paroz
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 4 years ago by Anton Baklanov

comment:2 Changed 4 years ago by Russell Keith-Magee

Triage Stage: UnreviewedReady for checkin

comment:3 Changed 4 years ago by Claude Paroz

Owner: changed from Anton Baklanov to Claude Paroz

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

Resolution: fixed
Status: newclosed

In e277301c2c96915ba1408d57a866bc65e51de95a:

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

Thanks Anton Baklanov for the report and the patch.

comment:5 Changed 4 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 4 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