app/controllers/follows_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Unsafe reflection method constantize called with parameter value
Open

    params[:followable_type].constantize.find(params[:followable_id])
Severity: Critical
Found in app/controllers/follows_controller.rb by brakeman

Brakeman reports on several cases of remote code execution, in which a user is able to control and execute code in ways unintended by application authors.

The obvious form of this is the use of eval with user input.

However, Brakeman also reports on dangerous uses of send, constantize, and other methods which allow creation of arbitrary objects or calling of arbitrary methods.

Line is too long. [116/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    flash.now[:notice] = t("shared.followable.#{followable_translation_key(@follow.followable)}.create.notice_html")

Line is too long. [117/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)
Open

    flash.now[:notice] = t("shared.followable.#{followable_translation_key(@follow.followable)}.destroy.notice_html")

There are no issues that match your filters.

Category
Status