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

Fix authenticate_or_request_with_http_basic check for passed blocks #1478

Conversation

hugocorbucci
Copy link
Contributor

Background

Brakeman version: 4.8.0
Rails version: 4.2.11
Ruby version: 2.5.8

Issue

Running brakeman against a rails application with a method that calls authenticate_or_request_with_http_basic without a non direct call (as in the test).

Stack trace:

== Errors ==
Error: undefined method `last' for nil:NilClass
Location: /usr/local/bundle/gems/brakeman-4.8.0/lib/brakeman/checks/check_basic_auth.rb:60:in `include_password_literal?'

@hugocorbucci hugocorbucci force-pushed the fix/basic_auth_error_for_referenced_blocks branch from 956e1c4 to db4bb50 Compare May 12, 2020 17:14
@presidentbeef presidentbeef merged commit 12fadf1 into presidentbeef:master May 12, 2020
@presidentbeef
Copy link
Owner

Thank you!!

@hugocorbucci hugocorbucci deleted the fix/basic_auth_error_for_referenced_blocks branch May 12, 2020 18:44
Repository owner locked and limited conversation to collaborators Jan 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants