Use SecureRandom instead of the deprecated ActiveSupport::SecureRandom
This commit is contained in:
parent
fc25c3d412
commit
97b1290f1a
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ class UserController < ApplicationController
|
||||||
if params[:user] and params[:user][:openid_url] and @user.pass_crypt.empty?
|
if params[:user] and params[:user][:openid_url] and @user.pass_crypt.empty?
|
||||||
# We are creating an account with OpenID and no password
|
# We are creating an account with OpenID and no password
|
||||||
# was specified so create a random one
|
# was specified so create a random one
|
||||||
@user.pass_crypt = ActiveSupport::SecureRandom.base64(16)
|
@user.pass_crypt = SecureRandom.base64(16)
|
||||||
@user.pass_crypt_confirmation = @user.pass_crypt
|
@user.pass_crypt_confirmation = @user.pass_crypt
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue