
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
http-cat-rails is a configurable gem that changes every http-error page in your rails application with an image of a cute little cat, that describes purrfectly the error code (credits for the default images to https://http.cat)
This gem is highly customizable: you could even decide to self host your own error images, and use them.
To change this gem's behaviour, you can create a http_cat_rails.rb inside /config/initializers, and structure it as
follows:
Http::Cat::Rails.configure do |c|
c.base_url = "https://www.myurl.com/"
c.status_codes = { "404": "code_name", "500": "code_name_2" }
c.layout = "application"
c.extension = :jpg
end
In this example, if an error 404 is raised, your page will load an image inside your application.html.erb from the following url: "https://www.myurl.com/404.jpg"
This option is used to set the base url to retrieve images
This option is used to pass an Hash of status codes, to limit them, or change the url visited. The value of each element must be unique, since it's used to define a function.
Extension to insert in the url. Can also be false or nil, to dont include an extension
The img tag that contains the image has the following class: "http_error_image"
You can customize its style using that
url_to_visit:
"#{base_url}#{code_of_this_error}#{".#{extension}" if extension}"
Add this line to your application's Gemfile:
gem "http-cat-rails"
And then execute:
$ bundle
Or install it yourself as:
$ gem install http-cat-rails
Then, you'll need to add this line to your application.rb:
config.exceptions_app = self.routes
This gem won't work if your application.rb or <your_environment>.rb contains the following line
config.consider_all_requests_local = true
It's a small project, but if you want to contribute feel free to send a Pull Request, or open an Issue
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that http-cat-rails demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.