lib/brakeman/checks/check_session_settings.rb in brakeman-lib-4.5.1 vs lib/brakeman/checks/check_session_settings.rb in brakeman-lib-4.6.0
- old
+ new
@@ -19,11 +19,14 @@
def run_check
settings = tracker.config.session_settings
check_for_issues settings, @app_tree.file_path("config/environment.rb")
- ["session_store.rb", "secret_token.rb"].each do |file|
- if tracker.initializers[file] and not ignored? file
+ session_store = @app_tree.file_path("config/initializers/session_store.rb")
+ secret_token = @app_tree.file_path("config/initializers/secret_token.rb")
+
+ [session_store, secret_token].each do |file|
+ if tracker.initializers[file] and not ignored? file.basename
process tracker.initializers[file]
end
end
if tracker.options[:rails4]