Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
hapi-stateless-notifications
Advanced tools
A simple, explicit-state plugin to pass notices between pages.
A plugin to give a hapi reply
a reply.saveNotifications()
method that collects user notifications and store them long enough to display on later pages, given the token.
// step 0: set up a plugin that gives a request.redis property that's a
// client connection, ready to use for this request. We steal the
// connection from `catbox-redis`.
server.register({
register: require('hapi-stateless-notifications'),
options: {
queryParameter: 'notice',
prefix: 'notice:',
timeout: 3600
}
});
The options
are optional.
options.queryParameter
controls which query parameter will cause the plugin to look up a token and defaults to 'notice'
options.prefix
controls the key prefix in redis, and defaults to 'notice:'
options.timeout
controls the the expiration timeout of the key in redis, in seconds. The default is 3600
, that is, one hour.
Then in a handler:
request.saveNotifications([
Promise.resolve('Success message here ...'),
Promise.reject(new Error('Error message here ...')),
]).then(function (token) {
// if there's a token, put it in the query of the page you load next as `notice={token}`
// Otherwise, there's nothing to do.
});
FAQs
A simple, explicit-state plugin to pass notices between pages.
We found that hapi-stateless-notifications demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 20 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.