DisplayMessageBeforeRedirectMiddleware cannot reset the storage.used flag
Message storages do not work correctly if the used flag is reset to False. Instead of doing that we should only consume messages if necessary.
middleware: iterate message storage only if messages are consumed (fixes #9191)
If a message storage has been iterated but the used flag is reset to False,
semi-consumed messages are pushed to the cookie without normalization by
_prepare_message, as some of them are lazy strings, it breaks the JSON encoder.
The message storage must be iterated only if we are sure messages are going be
Updated by Benjamin Dauvergne over 5 years ago
- Status changed from Nouveau to Résolu (à déployer)
- % Done changed from 0 to 100
Appliqué par commit authentic2|33d3c7195e2c4b3020a1bd5511ae0ec43227c208.