
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
= CookiesManager
CookiesManager is a simple tool that provides a convenient way to manage any kind of data in the cookies (strings, arrays, hashes, etc.):
== Installation
In Rails 3, add this to your environment.rb file.
gem 'cookies_manager'
Then set a secret token in your config/secret_token.rb file.
::Application.config.secret_token = 'your secret token'
== Getting started
=== Basic usage
To activate the feature, simply call +load_cookies_manager+ on your controller class:
class YourController < ActionController::Base load_cookies_manager # This instantiates a new CookiesManager accessible through the cookies_manager helper method
Hint: You can call +load_cookies_manager+ on your ApplicationController class to enable the feature for all your controllers.
Next, you can refer the CookiesManager instance by calling the +cookies_manager+ helper method from your controllers and views:
len_bytes = cookies_manager.write('a_key', ['an', 'array']) # store the array as is in the cache, and as a base-64 string in the cookies
my_array = cookies_manager.read('a_key') # retrieves the array from the cache (or from the cookies if the cache is not in sync)
my_deleted_array = cookies_manager.delete('a_key') # removes the array from both the cookies and the cache
=== Supported options
All supported options are fully described along with some examples in the {CookiesManager::Base documentation}[http://rubydoc.info/github/RStrike/CookiesManager/master/CookiesManager/Base].
== When to use it?
=== CookiesManager vs native cookies
Whenever you need to store in the cookies some data somewhat more complex than just simple US-ASCII strings (ex: hashes, arrays, etc.), the CookiesManager may be more convenient to use than the native cookies hash.
Note that you can use both CookiesManager and the cookies hash. If needed, the CookiesManager cache is automatically resynchronized from the cookies.
=== CookiesManager vs session
Whenever a cookies storage management is more suited to your needs than a session storage management, the CookiesManager may be a good option if the data you want to store is more complex than just simple US-ASCII strings. For example, there may be times when you need to persist in the cookies some non-sensitive data much longer than the session length, such as user display preferences.
== Important notes
== Running the tests
RSpec 2 is used for testing. To get the specs running, check {spec/README}[https://github.com/RStrike/CookiesManager/blob/master/spec/README.rdoc].
== Compatibility Tested on:
== Changes
Check the {CHANGELOG}[https://github.com/RStrike/CookiesManager/blob/master/CHANGELOG.rdoc].
FAQs
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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.