Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CVE-2015-9284 Mitigation spec failing #10

Closed
fabioxgn opened this issue Jan 22, 2021 · 2 comments
Closed

CVE-2015-9284 Mitigation spec failing #10

fabioxgn opened this issue Jan 22, 2021 · 2 comments

Comments

@fabioxgn
Copy link

fabioxgn commented Jan 22, 2021

I have this spec in my application, which was added to check for the security flaw mitigation, now, after updating this gem and omniauth to 2.0.1, this spec started to fail with: expected ActionController::InvalidAuthenticityToken but nothing was raised

 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

      after do
        ActionController::Base.allow_forgery_protection = @allow_forgery_protection
      end

      it do
        expect do
          post "/auth/google_oauth2"
        end.to raise_error(ActionController::InvalidAuthenticityToken)
      end
    end

I understood in the release notes that the gem still verifies the CSRF token, why is this test failing now?

@fabioxgn fabioxgn changed the title CVE-2015-9284 Mitigation spec CVE-2015-9284 Mitigation spec failing Jan 22, 2021
@mitnal
Copy link

mitnal commented Feb 3, 2021

I think this is caused by a change in OmniAuth and not here. See omniauth/omniauth#1031

@fabioxgn
Copy link
Author

fabioxgn commented Feb 3, 2021

@mitnal thanks.

@fabioxgn fabioxgn closed this as completed Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants