devise 1.0.10 → 1.0.11
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.rdoc +6 -0
- data/README.rdoc +1 -1
- data/lib/devise/failure_app.rb +3 -1
- data/lib/devise/rails/warden_compat.rb +5 -2
- data/lib/devise/version.rb +1 -1
- data/test/integration/authenticatable_test.rb +8 -0
- metadata +6 -6
data/CHANGELOG.rdoc
CHANGED
data/README.rdoc
CHANGED
data/lib/devise/failure_app.rb
CHANGED
@@ -64,7 +64,9 @@ module Devise
|
|
64
64
|
# yet, but we still need to store the uri based on scope, so different scopes
|
65
65
|
# would never use the same uri to redirect.
|
66
66
|
def store_location!(scope)
|
67
|
-
|
67
|
+
if request && request.get? && !request.xhr?
|
68
|
+
session[:"#{scope}.return_to"] = request.request_uri
|
69
|
+
end
|
68
70
|
end
|
69
71
|
end
|
70
72
|
end
|
@@ -42,7 +42,10 @@ class Devise::CookieSanitizer
|
|
42
42
|
def call(env)
|
43
43
|
response = @app.call(env)
|
44
44
|
headers = response[1]
|
45
|
-
|
45
|
+
cookies = headers[SET_COOKIE]
|
46
|
+
if cookies.respond_to?(:join)
|
47
|
+
headers[SET_COOKIE] = cookies.join("\n").squeeze("\n")
|
48
|
+
end
|
46
49
|
response
|
47
50
|
end
|
48
51
|
end
|
@@ -57,4 +60,4 @@ Warden::Manager.after_set_user :event => [:set_user, :authentication] do |record
|
|
57
60
|
request.reset_session
|
58
61
|
request.session.update(backup)
|
59
62
|
end
|
60
|
-
end
|
63
|
+
end
|
data/lib/devise/version.rb
CHANGED
@@ -190,6 +190,14 @@ class AuthenticationTest < ActionController::IntegrationTest
|
|
190
190
|
assert_nil session[:"user.return_to"]
|
191
191
|
end
|
192
192
|
|
193
|
+
test 'xml http requests does not store urls for redirect' do
|
194
|
+
xhr :get, users_path
|
195
|
+
assert_nil session[:"user.return_to"]
|
196
|
+
|
197
|
+
sign_in_as_user
|
198
|
+
assert_template 'home/index'
|
199
|
+
end
|
200
|
+
|
193
201
|
test 'redirect to configured home path for a given scope after sign in' do
|
194
202
|
sign_in_as_admin
|
195
203
|
assert_equal "/admin_area/home", @request.path
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 1
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 11
|
10
|
+
version: 1.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jos\xC3\xA9 Valim"
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-03-11 00:00:00 +01:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
requirements: []
|
214
214
|
|
215
215
|
rubyforge_project:
|
216
|
-
rubygems_version: 1.3
|
216
|
+
rubygems_version: 1.5.3
|
217
217
|
signing_key:
|
218
218
|
specification_version: 3
|
219
219
|
summary: Flexible authentication solution for Rails with Warden
|