Skip to content

Commit faa62f0

Browse files
committed
Relax omniauth requirement to mitigate CVE-2015-9284
1 parent 9f4a4f1 commit faa62f0

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

omniauth-oauth.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
88
gem.homepage = "https://github.com/intridea/omniauth-oauth"
99
gem.license = "MIT"
1010

11-
gem.add_dependency "omniauth", "~> 1.0"
11+
gem.add_dependency "omniauth", ">= 1.0", "< 3"
1212
gem.add_dependency "oauth"
1313
gem.add_development_dependency "bundler", "~> 1.9"
1414

spec/helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
require "omniauth"
1111
require "omniauth-oauth"
1212

13+
OmniAuth.config.request_validation_phase = nil
14+
1315
RSpec.configure do |config|
1416
config.include WebMock::API
1517
config.include Rack::Test::Methods

spec/omniauth/strategies/oauth_spec.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def session
3434
describe "/auth/{name}" do
3535
context "successful" do
3636
before do
37-
get "/auth/example.org"
37+
post "/auth/example.org"
3838
end
3939

4040
it "should redirect to authorize_url" do
@@ -43,7 +43,7 @@ def session
4343
end
4444

4545
it "should redirect to authorize_url with authorize_params when set" do
46-
get "/auth/example.org_with_authorize_params"
46+
post "/auth/example.org_with_authorize_params"
4747
expect(last_response).to be_redirect
4848
expect([
4949
"https://api.example.org/oauth/authorize?abc=def&oauth_token=yourtoken",
@@ -56,7 +56,7 @@ def session
5656
end
5757

5858
it "should pass request_params to get_request_token" do
59-
get "/auth/example.org_with_request_params"
59+
post "/auth/example.org_with_request_params"
6060
expect(WebMock).to have_requested(:post, "https://api.example.org/oauth/request_token").
6161
with { |req| req.body == "scope=http%3A%2F%2Ffoobar.example.org" }
6262
end
@@ -66,7 +66,7 @@ def session
6666
before do
6767
stub_request(:post, "https://api.example.org/oauth/request_token").
6868
to_raise(::Net::HTTPFatalError.new('502 "Bad Gateway"', nil))
69-
get "/auth/example.org"
69+
post "/auth/example.org"
7070
end
7171

7272
it "should call fail! with :service_unavailable" do
@@ -78,7 +78,7 @@ def session
7878
before do
7979
stub_request(:post, "https://api.example.org/oauth/request_token").
8080
to_raise(::OpenSSL::SSL::SSLError.new("SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed"))
81-
get "/auth/example.org"
81+
post "/auth/example.org"
8282
end
8383

8484
it "should call fail! with :service_unavailable" do

0 commit comments

Comments
 (0)