Project

General

Profile

Actions

Refactor #23234

closed

remove friendly_id <5.0 workarounds

Added by Anonymous almost 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
-
Fixed in Releases:
Found in Releases:

Description

With Rails 5.2:

 - message: 'Dangerous query method (method whose arguments are used as raw SQL) called
     with non-attribute argument(s): "CASE WHEN \"hostgroups\".\"title\" = ''928644347''
     THEN 1 ELSE 0 END". Non-attribute arguments will be disallowed in Rails 6.0. This
     method should not be called with user-provided values, such as request parameters
     or model attributes. Known-safe values can be passed by wrapping them in Arel.sql().'
   callstack: app/controllers/api/base_controller.rb:407:in `prioritize_friendly_name_records'

app/controllers/api/base_controller.rb:378 says: "#Should be replaced after moving to friendly_id version >= 5.0"

This should be re-done now in a Rails 5.2 friendlier way.


Related issues 6 (0 open6 closed)

Related to Foreman - Bug #8343: API resource_scope ignores optionsClosedShimon Shtein11/11/2014Actions
Related to Foreman - Tracker #21834: Rails 5.2 upgrade tasksClosed

Actions
Related to Foreman - Refactor #23300: Do not use string interpolation when composing SQL queries.ClosedActions
Related to Foreman - Refactor #23806: raise gem dependencies to Rails 5.2 compatible versionsClosed06/04/2018Actions
Related to Foreman - Bug #32704: The /api/usergroups/:usergroup_id/external_usergroups API is not accepting 1-group as the name of usergroupClosedTomer BriskerActions
Blocks Foreman - Tracker #24837: Rails 6.0 TrackerClosed

Actions
Actions #1

Updated by Anonymous almost 6 years ago

  • Related to Bug #8343: API resource_scope ignores options added
Actions #2

Updated by Anonymous almost 6 years ago

Actions #3

Updated by Anonymous almost 6 years ago

Actions #4

Updated by Anonymous almost 6 years ago

Actions #5

Updated by Anonymous almost 6 years ago

  • Related to Refactor #23300: Do not use string interpolation when composing SQL queries. added
Actions #6

Updated by Anonymous about 5 years ago

Actions #7

Updated by Tomer Brisker over 4 years ago

  • Related to Refactor #23806: raise gem dependencies to Rails 5.2 compatible versions added
Actions #8

Updated by Tomer Brisker over 4 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomer Brisker
Actions #9

Updated by The Foreman Bot over 4 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7289 added
Actions #10

Updated by The Foreman Bot about 4 years ago

  • Fixed in Releases 2.0.0 added
Actions #11

Updated by Tomer Brisker about 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #12

Updated by The Foreman Bot about 4 years ago

  • Pull request https://github.com/theforeman/foreman/pull/7328 added
Actions #13

Updated by Tomer Brisker almost 3 years ago

  • Related to Bug #32704: The /api/usergroups/:usergroup_id/external_usergroups API is not accepting 1-group as the name of usergroup added
Actions

Also available in: Atom PDF