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.
Gem to add cookie consent to rails application
Add this line to your application's Gemfile:
gem 'cookies_eu'
And then execute:
$ bundle
Run the installation generator:
$ bundle exec rails g cookies_eu:install
Or manually add in application.js:
//= require cookies_eu
And in application.css:
*= require cookies_eu
Or, if you have application.scss:
@import "cookies_eu";
Remember to restart your server!
In your view add
= render 'cookies_eu/consent_banner'
You can add a link parameter to link to your cookies explanation page (you have to create the page and controller for this)
= render 'cookies_eu/consent_banner', link: '/cookies'
You can add a target parameter to the link to open in a new tab
= render 'cookies_eu/consent_banner', link: '/cookies', target: '_blank'
If you wish to customize the style of the div the classes are:
.cookies-eu /* main div */
.cookies-eu-content-holder /* content holder */
.cookies-eu-button-holder /* button holder */
.cookies-eu-ok /* button */
.cookies-eu-link /* link */
If you wish to customize the HTML, create a folder cookies_eu
, create a partial _consent_banner.html.erb
and paste the HTML from here
If you wish to run some arbitrary code when the user acknowledges the cookie message, you can register a callback. This is useful if you wish to persist the user's preference to the database.
document.addEventListener('cookies-eu-acknowledged', function() {
// The user has acknowledged cookies! If they're logged in, make an api call
// so we remember their preference.
fetch('...');
});
This gem uses a cookie called cookie_eu_consented to track whether a user has accepted the cookie notice and whether it needs to be shown again or not.
Is supported out of the box, just require it before cookies_eu
//= require turbolinks
//= require cookies_eu
Cookies are small text files which are downloaded to your computer, tablet or mobile phone when you visit a website or application. The website or application may retrieve these cookies from your web browser (eg Internet Explorer, Mozilla Firefox or Google Chrome) each time you visit, so they can recognise you, remember your preferences and provide you with a more secure online experience.
Generally, cookies are very useful and are a common method used by almost every website you visit because they help to make your online experience as smooth as possible. For security reasons, many websites will not function at all without the use of cookies (or other similar technologies, such as "web beacons" or "tags").
Cookies generally do not hold any information to identify an individual person, but are instead used to identify a browser on an individual machine.
If you prefer, you can restrict, block or delete cookies by changing your browser settings but that may mean that the website won't work properly
For more information about cookies and their impact on you and your browsing visit www.aboutcookies.org.
These cookies are essential in helping you to make use of the features and services we offer on the #{INSERT SITE HERE} website. Without these cookies, the services you want to use cannot be provided. These cookies do not gather information about you that could be used to identify you, and they do not monitor or remember where you have been on the internet.
These cookies allow us to provide you with a better online experience when you use our website. They do not gather or store any information which would allow us to identify you personally.
Performance cookies help us to understand how our customers use our site, so we can keep our products and services relevant, easy to use and up to date. For example, we can see which products and services are most popular, identify when and where errors occur, and test different versions of a page in order to provide an improved online experience.
Sometimes, the services we use to collect this information may be operated by other companies on our behalf. They may use similar technologies to cookies, known as "web beacons" or "tags". These are anonymous and, as they are only used for statistical purposes, they do not contain or collect any information that identifies you.
We have relationships with carefully selected and monitored suppliers (third parties) who may also set cookies during your visit. The purpose of these cookies is "behavioural advertising" (also known as "behavioural targeting" or "remarketing"), which is a means of showing you relevant products and services based on what you appear to be interested in. Although these cookies can track your visits around the web they don't know who you are. Without these cookies, online advertisements you encounter will be less relevant to you and your interests.
Most internet browsers allow you to erase cookies from your computer hard drive, block all cookies (or just third-party cookies) or warn you before a cookie is stored on your device.
Please note, if you choose to block all cookies, our site will not function as intended and you will not be able to use or access many of the services we provide. If you have blocked all cookies and wish to make full use of the features and services we offer, you will need to enable your cookies. You can do this in your browser (see below).
Rather than blocking all cookies, you can choose to only block third-party cookies which will still allow our website to function as intended.
To enable cookies on our website, follow the steps below.
To enable cookies on our website, follow the steps below.
1 Click "Safari" on the top of your browser and select "Settings". 2 Click the "Privacy" and then "Enable cookies." 3 Select "only the pages you have visited."
1 Click "Mozilla" or "Netscape" at the top of your browser and select "Settings". 2 Scroll down to the "Cookies" under "Privacy & Security". 3 Select "Allow cookies only to the original site."
1 Click "Menu" on the top of your browser and select "Settings". 2 Then select "Options" tab and the "Advanced". 3 Select "Enable cookies."
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Maintained and sponsored by Infinum.
FAQs
Unknown package
We found that cookies_eu demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.