Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.