rack-oauth2 0.10.0.alpha → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-oauth2 (0.9.5)
4
+ rack-oauth2 (0.10.0.alpha)
5
5
  activesupport (>= 2.3)
6
6
  attr_required (>= 0.0.3)
7
7
  httpclient (>= 2.2.0.2)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.0.alpha
1
+ 0.10.0
@@ -49,7 +49,11 @@ module Rack
49
49
  def verify_redirect_uri!(pre_registered, allow_partial_match = false)
50
50
  @verified_redirect_uri = if redirect_uri.present?
51
51
  verified = Array(pre_registered).any? do |_pre_registered_|
52
- Util.uri_match?(_pre_registered_, redirect_uri, allow_partial_match)
52
+ if allow_partial_match
53
+ Util.uri_match?(_pre_registered_, redirect_uri)
54
+ else
55
+ _pre_registered_.to_s == redirect_uri.to_s
56
+ end
53
57
  end
54
58
  if verified
55
59
  redirect_uri
@@ -40,19 +40,14 @@ module Rack
40
40
  redirect_uri.to_s
41
41
  end
42
42
 
43
- def uri_match?(base, given, allow_partial_match = true)
43
+ def uri_match?(base, given)
44
44
  base = parse_uri(base)
45
45
  given = parse_uri(given)
46
46
  base.path = '/' if base.path.blank?
47
47
  given.path = '/' if given.path.blank?
48
- path_match = if allow_partial_match
49
- /^#{base.path}/ =~ given.path
50
- else
51
- base.path == given.path
52
- end
53
48
  [:scheme, :host, :port].all? do |key|
54
49
  base.send(key) == given.send(key)
55
- end && path_match
50
+ end && /^#{base.path}/ =~ given.path
56
51
  rescue
57
52
  false
58
53
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 7
5
- version: 0.10.0.alpha
4
+ prerelease:
5
+ version: 0.10.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - nov matake