devise 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of devise might be problematic. Click here for more details.
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +2 -2
- data/app/controllers/devise/confirmations_controller.rb +2 -0
- data/config/locales/en.yml +1 -1
- data/gemfiles/Gemfile.rails-3.2.x.lock +2 -2
- data/lib/devise/rails/routes.rb +1 -0
- data/lib/devise/version.rb +1 -1
- data/test/integration/confirmable_test.rb +11 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
== 3.1.1
|
2
|
+
|
3
|
+
* bug fix
|
4
|
+
* Improve default message which asked users to sign in even when they were already signed (by @gregates)
|
5
|
+
* Improve error message for when the `config.secret_key` is missing
|
6
|
+
|
1
7
|
== 3.1.0
|
2
8
|
|
3
9
|
Security announcement: http://blog.plataformatec.com.br/2013/08/devise-3-1-now-with-more-secure-defaults/
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,7 @@ GIT
|
|
12
12
|
PATH
|
13
13
|
remote: .
|
14
14
|
specs:
|
15
|
-
devise (3.1.
|
15
|
+
devise (3.1.1)
|
16
16
|
bcrypt-ruby (~> 3.0)
|
17
17
|
orm_adapter (~> 0.1)
|
18
18
|
railties (>= 3.2.6, < 5)
|
@@ -48,7 +48,7 @@ GEM
|
|
48
48
|
tzinfo (~> 0.3.37)
|
49
49
|
arel (4.0.0)
|
50
50
|
atomic (1.1.12)
|
51
|
-
bcrypt-ruby (3.1.
|
51
|
+
bcrypt-ruby (3.1.2)
|
52
52
|
builder (3.1.4)
|
53
53
|
erubis (2.7.0)
|
54
54
|
faraday (0.8.8)
|
@@ -43,6 +43,8 @@ class Devise::ConfirmationsController < DeviseController
|
|
43
43
|
def after_confirmation_path_for(resource_name, resource)
|
44
44
|
if Devise.allow_insecure_sign_in_after_confirmation
|
45
45
|
after_sign_in_path_for(resource)
|
46
|
+
elsif signed_in?
|
47
|
+
signed_in_root_path(resource)
|
46
48
|
else
|
47
49
|
new_session_path(resource_name)
|
48
50
|
end
|
data/config/locales/en.yml
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
en:
|
4
4
|
devise:
|
5
5
|
confirmations:
|
6
|
-
confirmed: "Your account was successfully confirmed.
|
6
|
+
confirmed: "Your account was successfully confirmed."
|
7
7
|
confirmed_and_signed_in: "Your account was successfully confirmed. You are now signed in."
|
8
8
|
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
|
9
9
|
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
devise (3.1.
|
4
|
+
devise (3.1.1)
|
5
5
|
bcrypt-ruby (~> 3.0)
|
6
6
|
orm_adapter (~> 0.1)
|
7
7
|
railties (>= 3.2.6, < 5)
|
@@ -40,7 +40,7 @@ GEM
|
|
40
40
|
multi_json (~> 1.0)
|
41
41
|
arel (3.0.2)
|
42
42
|
atomic (1.1.13)
|
43
|
-
bcrypt-ruby (3.1.
|
43
|
+
bcrypt-ruby (3.1.2)
|
44
44
|
builder (3.0.4)
|
45
45
|
erubis (2.7.0)
|
46
46
|
faraday (0.8.8)
|
data/lib/devise/rails/routes.rb
CHANGED
data/lib/devise/version.rb
CHANGED
@@ -56,7 +56,7 @@ class ConfirmationTest < ActionDispatch::IntegrationTest
|
|
56
56
|
assert_not user.confirmed?
|
57
57
|
visit_user_confirmation_with_token(user.raw_confirmation_token)
|
58
58
|
|
59
|
-
assert_contain 'Your account was successfully confirmed.
|
59
|
+
assert_contain 'Your account was successfully confirmed.'
|
60
60
|
assert_current_url '/users/sign_in'
|
61
61
|
assert user.reload.confirmed?
|
62
62
|
end
|
@@ -135,6 +135,16 @@ class ConfirmationTest < ActionDispatch::IntegrationTest
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
+
test 'unconfirmed but signed in user should be redirected to their root path' do
|
139
|
+
swap Devise, :allow_unconfirmed_access_for => 1.day do
|
140
|
+
user = sign_in_as_user(:confirm => false)
|
141
|
+
|
142
|
+
visit_user_confirmation_with_token(user.raw_confirmation_token)
|
143
|
+
assert_contain 'Your account was successfully confirmed.'
|
144
|
+
assert_current_url '/'
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
138
148
|
test 'error message is configurable by resource name' do
|
139
149
|
store_translations :en, :devise => {
|
140
150
|
:failure => { :user => { :unconfirmed => "Not confirmed user" } }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-10-01 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: warden
|