Skip to content

Cop idea: Enforce explicit skip_forgery_protection instead of self.allow_forgery_protection = false #1579

@phil-wkt

Description

@phil-wkt

Is your feature request related to a problem? Please describe.

I've noticed code with:

self.allow_forgery_protection = false

in controllers.
It achieves the same result as skip_forgery_protection, but is lower-level and not documented in the Rails API.

Describe the solution you'd like

Cop idea: Enforce explicit skip_forgery_protection instead.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions