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
0
votes
1 answer

bcrypt-ruby upgrade password from hashed_password fields, salt to password_digest field

I am planning to upgrade my rails application from 2.3.5 to 4.1. In old version of rails bcrypt-ruby had two fields(hashed_password, salt). Now In latest version of rails we have only single field called password_digest. Now I need to upgrade…
user3801644
  • 71
  • 1
  • 3
0
votes
3 answers

bundle show ['bcrypt-ruby'] Unfortunately, a fatal error has occurred. on Mac

i've problem on Mac ruby 1.9.3p448 (2013-06-27 revision 41675) with bcrypt-ruby - any version. If i install bcrypt - Rspec ask to install bcrypt-ruby too...(( why? i' m in the begin of Rails too - with M.Hartl....)) .After installing'bcrypt-ruby'-…
0
votes
1 answer

Using has secure password on a rails 4 app

I'm trying to use has_secure_password for user login, I've defined the User mode as below require 'digest/md5' class User < ActiveRecord::Base has_secure_password before_validation :prep_emailId before_save :create_avatar_url …
user3283997
0
votes
1 answer

User login system in Rails 4

I have defined the following strong parameters in my user controller def user_params params.require(:user).permit(:category_id, :nationality_id, :first_name, :last_name, :gender, :date_of_birth, :emailId, :password, :password_confirm,…
user3283997
0
votes
1 answer

Ruby on Rails bcrypt-ruby error

I'm following Michael Hartl's tutorial for Rails 4, and I'm working on the user auth section. He says to add bcrypt-ruby to the Gemfile, then bundle install. Here's the line from my Gemfile: gem 'bcrypt-ruby', '3.1.2' // as explained at…
user101289
  • 9,888
  • 15
  • 81
  • 148
0
votes
1 answer

Ubuntu, Bundle Install/Update could not find gem bcrpyt-ruby ... in the gems available

Solution below in comment and in post: OS: Ubuntu 12.0.4 Problem: bcrypt-ruby, bundle install/update Working on RoR, following Michael Hartl's Tutorial. Ch. 6.3.1, Encrypted Password I've included this line in my gem-file: gem 'bcrypt-ruby',…
pigate
  • 351
  • 1
  • 7
  • 16
0
votes
1 answer

Rails Active Record Query (testing user logged into a given session)

Apologies, but I have been a little stuck on what I believe to be an easy fix. I am building a rails app and simply want to test if the user currently logged into my app has the name 'Tom'. I have a user named Tom and when I log in with him I get…
jfalkson
  • 3,471
  • 4
  • 20
  • 25
0
votes
1 answer

Creation working on console but not on website - ruby on rails

I have a form to register customers in my app that was working fine before adding password stuff(bcrypt-ruby). Now customers don't get created when the form is submitted, but if i create via console using the exact same values it works just fine. I…
lhoppe
  • 623
  • 1
  • 5
  • 9
0
votes
1 answer

authentication fails after submiting - rails 4

I am trying to make simple authentication/registration ruby app. I am using BCrypt gem for crypting and it now gives me some problems. When I press submit button it throws undefined method `password_salt=' for # Ok, so I red…
andris
  • 99
  • 4
  • 13
0
votes
1 answer

Nokogiri / bcrypt-ruby error?

I'm getting the below error when trying to seed my database. I've included Nokogiri and bcrypt-ruby and haven't specified a version number so they should be fine. WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded…
anon_swe
  • 8,791
  • 24
  • 85
  • 145
0
votes
1 answer

New User Form with Rails and Bcrypt

For my small Rails application, I am using bcrypt to hash users' passwords when they are stored. However, when loading the new user form, I was hit with "invalid hash" for the password, as my new action was def new @user = User.new end which does…
J3RN
  • 1,683
  • 4
  • 20
  • 27
0
votes
1 answer

RailsCan't mass-assign protected attributes

I'm trying a simple authentication system with has_secure_password and I am getting the error listed in the title. I've seen this question several times but none of the advice or fixes for others are working for me. I'm at the point where I"m sure…
fuller
  • 35
  • 1
  • 5
0
votes
1 answer

How does bcrypt-ruby obscure the passwords of a hacked database?

I am trying to understand how has_secure_password works. On the bcrypt-ruby website has the following below examples of how to use it. The password method of class User confuses me. It looks like the code @password ||= Password.new(password_hash)…
user782220
  • 10,677
  • 21
  • 72
  • 135
0
votes
1 answer

Rails 3 production server complaining that bcrypt-ruby gem is not part of the bundle

As can be seen from the following excerpt of the output of a cap deploy ** [out :: 178.79.170.199] Using bcrypt-ruby (3.0.1) the bcrypt-ruby gem is installed on my server but unicorn is unable to start up properly and is complaining that bcrypt-ruby…
jamesc
  • 12,423
  • 15
  • 74
  • 113
0
votes
1 answer

bcrypt-ruby gem Gem::Installer::ExtensionBuildError:

Good day. I'm trying to set up project that's beings worked on by other people. when i run bundle install it crashes with an error Installing bcrypt-ruby (3.0.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build…
Elmor
  • 4,775
  • 6
  • 38
  • 70