Bug #17850

API/UI: err 414 on manipulating entities with long name

Added by Daniel Lobato Garcia 12 months ago. Updated 12 months ago.

Status:Closed
Priority:Normal
Assigned To:Daniel Lobato Garcia
Category:Database
Target version:-
Difficulty: Bugzilla link:1397056
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4134
Story points-
Velocity based estimate-
Release1.15.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1397056
Description of problem:
since string length restrictions no longer apply, satellite allows users to create entities of HUGE length. Such entities are not able to be manipulated later on (editing, deleting), due to the fact, that the names of the entities are being used as the GET parameter of the requests. Such requests return 414 (request URI too long).

Version-Release number of selected component (if applicable):
6.3 snap6

How reproducible:
always

Steps to Reproduce:
1. navigate to e.g. Host -> Architectures -> New architecture
2. generate a really huge string (e.g. 10000 chars) (might vary)
3. create a new architecture with generated string as a name.
4. navigate to architectures.
5. try to click (to edit) the new arch or try to delete it

Actual results:
414 - request uri too long

Expected results:
it either works (the id is used in URI instead of a name) or the size restriction should be reintroduced.

Associated revisions

Revision d56eb681
Added by Daniel Lobato Garcia 12 months ago

Fixes #17850 - Prevent 414 on architecture/usergroup

These two fields had been modified using change_column in other
migrations which removed the limit on 'name'. This causes a 414 if
you create a very long name and try to edit the field.

After the change, the limit is restored so very long names are
forbidden by validates_length_in_database and 414s are prevented

History

#1 Updated by The Foreman Bot 12 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/4134 added

#2 Updated by Anonymous 12 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal 12 months ago

  • Category set to Database
  • Release set to 1.15.0

Also available in: Atom PDF