Questions tagged [bcrypt-ruby]

The bcrypt Ruby gem provides a simple wrapper for safely handling passwords.

Bcrypt-ruby gem is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords. The bcrypt Ruby gem provides a simple wrapper for safely handling passwords.

If you store user passwords in the clear, then an attacker who steals a copy of your database has a giant list of emails and passwords. Some of your users will only have one password -- for their email account, for their banking account, for your application. A simple hack could escalate into massive identity theft.

It's your responsibility as a web developer to make your web application secure -- blaming your users for not being security experts is not a professional response to risk.

Source: https://rubygems.org/gems/bcrypt-ruby

109 questions
1
vote
0 answers

Is there a reason these password updates don't work?

I am creating a password reset token for my rails app. In my user controller, using BCrypt-Ruby, the rails scaffolding took care of everything with the built in validation/saving. Now, however, I am having a bit of difficulty. In my ResetToken…
drewwyatt
  • 5,989
  • 15
  • 60
  • 106
1
vote
0 answers

Correct login with Doorkeeper/Bcrypt for Rails API

I have a created and API using rails 4 and at the moment I'm trying to figure out how to do the login. Since the API will be used for an iPhone app we decided to go with token authentication and Doorkeeper/OAuth2 gem. So far I created a signin…
1
vote
2 answers

Rails Console: User will not save - Stack level too deep

I've run into an error in the Rails console. I'm using the latest version of Rails and Pry. I am attempting to generate a user. I am able to set values within user attributes, but am unable to save them. Maybe User.new is looping somewhere? Here's…
user3181113
  • 758
  • 2
  • 11
  • 23
1
vote
2 answers

Update user without hashing twice password

My model: class User < Sequel::Model self.raise_on_save_failure = false plugin :validation_helpers def validate super validates_format /@/, :email validates_presence [:email, :password] validates_unique :email end def before_save …
korywka
  • 7,537
  • 2
  • 26
  • 48
1
vote
1 answer

Rails 4: can't save a record to db

I've got a problem: i'm trying to add authentication to my first rails app using (mac os x mavericks): rails 4, mysql (via mysql2 gem), ActiveRecord. Following notes on railstutorial guide I've added: Gemfile: gem 'bcrypt-ruby', '~> 3.1.2' User…
user1820686
  • 2,008
  • 5
  • 25
  • 44
1
vote
0 answers

bcrypt-ruby is not part of the bundle. Add it to Gemfile

I get this error when I run bundle exec rails s and rails s: bcrypt-ruby is not part of the bundle. Add it to Gemfile. I uninstalled bcrypt-ruby from the command line and tried to reinstall it specifying the version and platform: gem install…
Tim
  • 3,191
  • 2
  • 16
  • 22
1
vote
0 answers

Rails Authentication using bcrypt-ruby gem fails on IE, when using CNAME DNS (WARNING: Can't verify CSRF token authenticity)

We have a Rails application hosted on Amazon EC2. The application uses the has_secure_password authentication feature introduced in Rails 3.1 - described in Railscasts episode 250 - that is enabled via the bcrypt-ruby gem. We set up a GoDaddy CNAME…
1
vote
2 answers

bcrypt_ext. so (LoadError)

I get the following Error when i try to start the rails server. Any ideas? Im using a 32bit Windows 7 machine with Ruby on Rails 4 and ruby 2.0.0p247 . I included the gem "bcrypt-ruby", "~> 3.1.1" in my gemfile. Heres my stack trace. rails…
Mulaiko
  • 536
  • 7
  • 23
1
vote
1 answer

ruby 2 + rails 4 + devise

I am trying to upgrade a very small devise application to ruby 2 and rails 4. I get a missing bcrypt-ruby (a dependency of devise) error when I try to start the rails server or input db commands. How can I force devise to use the newer version of…
LightBox
  • 3,395
  • 4
  • 25
  • 38
1
vote
1 answer

block in replace_gem can't activate bcrypt-ruby (~> 3.0.0), already activated bcrypt-ruby-3.1.1

I've looked at several answers regarding this problem and none seem to do the trick. This is on windows and I am lost for ideas. Thanks for the help! C:/Ruby200/lib/ruby/gems/2.0.0/gems/bcrypt-ruby-3.0.1-x86-mingw32/lib/bcrypt_ext.rb:2:in…
natecraft1
  • 2,737
  • 9
  • 36
  • 56
1
vote
1 answer

Updating password with BCrypt

When I login with a username and password by BCrypt checks no problem, everything is fine. But when I go through the process of recovering password and try to login with the new password the BCrypt never returns true. The code I have is as…
aperez
  • 121
  • 1
  • 13
1
vote
2 answers

Rails: BCrypt::Errors::InvalidSalt: invalid salt

Loosely following Ryan Bates's How I Test Railscast to implement sending an email confirmation token to users when they sign up. class User < ActiveRecord::Base has_secure_password strip_attributes except: [:password, :password_confirmation] …
Meltemi
  • 37,979
  • 50
  • 195
  • 293
1
vote
1 answer

BCrypt - "no such file to load -- bcrypt" (Rails)

As the title suggests! Here are the relevant files/configs: $ gem list --local *** LOCAL GEMS *** Ascii85 (1.0.2) bcrypt-ruby (3.0.1) hashery (2.0.1) pdf-reader (1.2.0) prawn (0.12.0) ruby-rc4 (0.1.5) ttfunk (1.0.3) $ grep bcrypt Gemfile gem…
user1381745
  • 3,850
  • 2
  • 21
  • 35
0
votes
1 answer

Unable to save password utilizing bcrypt-ruby and has_secure_password

We are moving from Devise to a more streamlined authentication process. If I can solve the following problem, I think I can get the rest of the authentication process working. If one of our clients looses a password, they can submit their user ID…
Jay
  • 6,206
  • 11
  • 48
  • 82
0
votes
1 answer

Issue with install xcode while installing ruby, rails and postgresql on macOS Big Sur 11.2.3

UPDATES I'm having some issues on a new mac m1 and my install of ruby, rails, xcode and postgresql First attempt: ##What I did ? Installing homebrew, ruby, rails, postgresql OS: macOS Big Sur Version 11.2.1 (20D74) zsh: 5.8…