devise 1.3.3 → 1.3.4

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.

@@ -1,3 +1,8 @@
1
+ == 1.3.4
2
+
3
+ * bug fix
4
+ * Do not add formats if html or "*/*"
5
+
1
6
  == 1.3.3
2
7
 
3
8
  * bug fix
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- devise (1.3.1)
4
+ devise (1.3.4)
5
5
  bcrypt-ruby (~> 2.1.2)
6
6
  orm_adapter (~> 0.0.3)
7
7
  warden (~> 1.0.3)
@@ -65,13 +65,17 @@ module Devise
65
65
  end
66
66
 
67
67
  def redirect_url
68
- if request_format == :html
68
+ if skip_format?
69
69
  send(:"new_#{scope}_session_path")
70
70
  else
71
71
  send(:"new_#{scope}_session_path", :format => request_format)
72
72
  end
73
73
  end
74
74
 
75
+ def skip_format?
76
+ %w(html */*).include? request_format.to_s
77
+ end
78
+
75
79
  # Choose whether we should respond in a http authentication fashion,
76
80
  # including 401 and optional headers.
77
81
  #
@@ -1,3 +1,3 @@
1
1
  module Devise
2
- VERSION = "1.3.3".freeze
2
+ VERSION = "1.3.4".freeze
3
3
  end
@@ -39,6 +39,11 @@ class FailureTest < ActiveSupport::TestCase
39
39
  assert_equal 'http://test.host/users/sign_in', @response.second['Location']
40
40
  end
41
41
 
42
+ test 'return to the default redirect location for wildcard requests' do
43
+ call_failure 'action_dispatch.request.formats' => nil, 'HTTP_ACCEPT' => '*/*'
44
+ assert_equal 'http://test.host/users/sign_in', @response.second['Location']
45
+ end
46
+
42
47
  test 'uses the proxy failure message as symbol' do
43
48
  call_failure('warden' => OpenStruct.new(:message => :test))
44
49
  assert_equal 'test', @request.flash[:alert]
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: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 3
10
- version: 1.3.3
9
+ - 4
10
+ version: 1.3.4
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-04-21 00:00:00 +02:00
19
+ date: 2011-04-29 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency