-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix CVE-2015-9284 security alert (#975)
* fix security alert Résolution en suivant les points https://github.com/omniauth/omniauth/wiki/Resolving-CVE-2015-9284 ajout du test proposé omniauth/omniauth#809 (comment) * ajoute une page pour la connexion github en post
- Loading branch information
Yannick François
authored
Nov 26, 2020
1 parent
39ca85f
commit e919007
Showing
6 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.row.mt-3.justify-content-center | ||
.col-md-6 | ||
div.mb-3 | ||
= link_to 'connexion super admin via github', super_admin_github_omniauth_authorize_path, method: :post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Make sure that https://nvd.nist.gov/vuln/detail/CVE-2015-9284 is mitigated | ||
RSpec.describe "CVE-2015-9284", type: :request do | ||
describe "GET /auth/:provider" do | ||
it do | ||
get "/omniauth/github" | ||
expect(response).not_to have_http_status(:redirect) | ||
end | ||
end | ||
|
||
describe "POST /auth/:provider without CSRF token" do | ||
before do | ||
@allow_forgery_protection = ActionController::Base.allow_forgery_protection | ||
ActionController::Base.allow_forgery_protection = true | ||
end | ||
|
||
it do | ||
expect do | ||
post super_admins_agents_path | ||
end.to raise_error(ActionController::InvalidAuthenticityToken) | ||
end | ||
|
||
after do | ||
ActionController::Base.allow_forgery_protection = @allow_forgery_protection | ||
end | ||
end | ||
end |