
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Products.statusmessages
Advanced tools
statusmessages provides an easy way of handling internationalized status messages managed via an BrowserRequest adapter storing status messages in client-side cookies.
statusmessages provides an easy way of handling internationalized status messages managed via an BrowserRequest adapter storing status messages in client-side cookies.
It is quite common to write status messages which should be shown to the user after some action. These messages of course should be internationalized. As these messages normally are defined in Python code, the common way to i18n-ize these in Zope is to use zope.i18n Messages. Messages are complex objects consisting of a translation domain and a default unicode text and might have an additional mapping dict and a distinct id.
The usual way to provide status messages in CMF/Plone has been to add a "?portal_status_messages=some%20text" to the URL. While this has some usability problems it also isn't possible to i18n-ize these in the common way, as the URL is currently limited to the ASCII charset, but an encoding providing support for the full unicode range is required.
The solution provided by this module is to store the status messages inside a cookie. In version 1.x a server side session like storage has been used, but this turned out not to be caching friendly for the usual web caching strategies.
.. You should NOT be adding new change log entries to this file. You should create a file in the news directory instead. For helpful instructions, please see: https://github.com/plone/plone.releaser/blob/master/ADD-A-NEWS-ITEM.rst
.. towncrier release notes start
Internal:
Bug fixes:
Bug fixes:
Bug fixes:
New features:
Bug fixes:
TypeError: Struct() argument 1 must be string, not unicode
[datakurre]Breaking changes:
New features:
Bug fixes:
Bug fixes:
Bug fixes:
New features:
Simplified the interface to use simpler add/show method names while keeping backwards compatibility. [hannosch]
More code simplification. Make the code itself independent of Zope2. [hannosch]
Removed a five:implements statement, as the ZPublisher.HTTPRequest is always an IBrowserRequest in Zope 2.12. [hannosch]
This version depends on Zope 2.12+. [hannosch]
Package metadata cleanup. [hannosch]
Declare package and test dependencies. [hannosch]
Fixed duplicate message bug. Showing identical messages to the end user more than once, doesn't make any sense. This closes http://dev.plone.org/plone/ticket/6109. [hannosch]
Added 's support for statusmessages without a redirect. This uses annotations on the request instead of direct values, so we avoid the possibility of sneaking those in via query strings. [tomster, hannosch]
Converted to a package in the Products namespace. [hannosch]
Added explicit translation of statusmessages before storing them in the cookie. This makes sure we have a reasonable context to base the translation on. [hannosch]
Changed license to BSD, to make it possible to include it as a dependency in Archetypes. [hannosch]
Updated test infrastructure, removed custom testrunner. [hannosch]
Fixed deprecation warning for the zcml content directive. [hannosch]
Added tests for ThreadSafeDict. [hannosch]
Fixed serious memory leak and did some code improvements. [hannosch, alecm]
FAQs
statusmessages provides an easy way of handling internationalized status messages managed via an BrowserRequest adapter storing status messages in client-side cookies.
We found that Products.statusmessages demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.