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

Use Arel.sql to wrap a known safe SQL string in PermissionsService #3888

Merged
merged 1 commit into from
Jul 16, 2019

Commits on Jul 16, 2019

  1. Use Arel.sql to wrap a known safe SQL string in PermissionsService

    To protect against injection attacks, `#pluck` has deprecated raw SQL strings in
    Rails 5.2.
    
    We could use `pluck(:source_id).uniq` here. This would be less efficient in
    some cases. I didn't have the time to look into whether those cases are likely
    to arise, so we simply mark the SQL string as safe by wrapping it with
    `Arel.sql()`.
    Tom Johnson committed Jul 16, 2019
    Configuration menu
    Copy the full SHA
    9ab079c View commit details
    Browse the repository at this point in the history