
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
= => errship3
The static error pages Rails comes with are nice for getting started - you can't break them, no matter what. But without your layout and navigation wrapped around them, they create a frustrating trap for your users.
The obvious solution is to render your layout into the static file, but what happens when you make a change?
Worse, what if you run a network of many Rails applications? Should they share one error page style? Should they all have their own?
You could hire your nephew to keep them all up to date... or you can use Errship3.
Errship3 is a Rails 3.1 engine for rendering error pages inside your layout. It supports i18n, custom exceptions, and Airbrake (Hoptoad) error tracking.
You can also use the flashback method to set an error message and redirect :back safely - if a RedirectBackError is raised, the user is dropped off at the nearest error page and given the flash message anyway.
Now it will also support twitter bootstrap
== Installation
Add this to your Gemfile gem 'errship3', '~> 3.0.1'
Add this to your ApplicationController class ApplicationController < ActionController::Base include Errship3::Rescuers include Errship3::ActiveRecord::Rescuers # or replace 'ActiveRecord' with MongoMapper, or Mongoid
You can generate the view file to customize yourself rails g errship3:view this will generate a view file on your app/views/errship3/standard.html.erb
You can customize it yourself.
Errship3 is ready to go! To test it out in development, you'll need to set
config.consider_all_requests_local = false
in your config/environments/development.rb file. Just don't forget to change it back when you want useful debugging output again instead!
Alternatively, simply point your browser to /error or /not_found to get a taste.
== Configuration
Errship3 renders all error pages with a HTTP status of 200 by default. This is done to ensure that the error page is rendered if the web server is configured to intercept errors (e.g. proxy_intercept_errors for nginx). If you want to have the correct status codes for your errors, add the following to an initializer:
Errship3.status_code_success = false
== I18n
If you want to edit the text that is rendered, add the following to your config/locales/*.yml
en:
errship3:
'404':
title: 'This page does not exist.'
description: 'It could have moved, or someone (maybe you!) mistyped the URL.'
'500':
title: 'An error has occurred.'
description: 'This has been reported to our development team. Thank you!'
...and so forth, for any error code you like.
== Custom Rescuers
If you want errship3 to rescue errors from your own custom exception class, you need to add a custom rescuer in your ApplicationController, like so:
# Render the 404 page
rescue_from MyException::SomethingMissing, :with => :render_404_error
# Render the 500 page
rescue_from MyException::SomethingWentWrong, :with => :render_error
To customize the error for a particular controller or exception class, add a rescuer like this one:
rescue_from ActiveRecord::RecordNotFound, :with => ->(e){ render_404_error e, 'monkeys' }
and then add your text for that scope to config/locales/*.yml
en:
errship3:
'404':
title: 'This page does not exist.'
description: 'It could have moved, or someone (maybe you!) mistyped the URL.'
monkeys:
title: 'They must have escaped'
description: 'This is now a monkey free zone.'
The following methods are provided:
If Airbrake is installed, every rescuer will report the exception, except for 404.
== Changelog
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.1
2.0.0
1.1.0
1.0.0
== Contributing to errship3
== Copyright
Copyright (c) 2011 Logan Koester. See LICENSE.txt for further details.
FAQs
Unknown package
We found that errship3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.