Project

General

Profile

Actions

Bug #12900

closed

oscap policy name can be created more than 255 chars

Added by Bryan Kearney about 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1293296
Description of problem:

Currently oscap policy name field accepts more than 255 chars and this needs to be checked while adding it in the field itself.

We face the below issues while clicking the submit button.

PGError: ERROR: value too long for type character varying(255) : INSERT INTO "scaptimony_policies" ("created_at", "cron_line", "day_of_month", "description", "name", "period", "scap_content_id", "scap_content_profile_id", "updated_at", "weekday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"

2015-12-21 16:26:14 [I] Processing by ScaptimonyPoliciesController#create as HTML
2015-12-21 16:26:14 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"9d+EQhT93SuywO2kHu1ubkWx7ArbU6qbGE6DFMeCrz0=", "policy"=>{"current_step"=>"", "name"=>"wJNLfPbexTKCGSGdqWjfOsYbetvPhzTBrptteHCIUcjYaacfDzyDnfVmOdsZQWcfIWDfXoLuJLtwEPHjCpSoIzSsYnhBqDcovaLsfHYQtHVQEeNORkhydwKaTqcivVPaCaZQFoRZPWJZCetgRphracvkyMUjKRayVaCrvaLaBBbjOjeWlknHUFpRsLHQkvbuvsZGxWqEMfmwfNIoknRoDaWRFPpoCMtEitUdRUAlyEGGeswFlDsUhlWCFKaZHSizOplYRcVDdxtBmkPjdNrwFEWVdMgnPWWOaiOvMsUhMbXc", "description"=>"", "scap_content_id"=>"14", "scap_content_profile_id"=>"114", "period"=>"weekly", "weekday"=>"sunday", "day_of_month"=>"", "cron_line"=>"", "location_ids"=>[""], "organization_ids"=>["", "1"], "hostgroup_ids"=>[""]}, "commit"=>"Submit"}

2015-12-21 16:26:14 [W] Operation FAILED: PGError: ERROR: value too long for type character varying(255)
: INSERT INTO "scaptimony_policies" ("created_at", "cron_line", "day_of_month", "description", "name", "period", "scap_content_id", "scap_content_profile_id", "updated_at", "weekday") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"
2015-12-21 16:26:14 [I] Rendered common/500.html.erb within layouts/application (19.8ms)
2015-12-21 16:26:14 [I] Rendered layouts/base.html.erb (3.6ms)
2015-12-21 16:26:14 [I] Completed 500 Internal Server Error in 126ms (Views: 33.6ms | ActiveRecord: 17.4ms)
2015-12-21 16:29:14 [I] Processing by HostsController#externalNodes as YML

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

How reproducible:

Steps to Reproduce:
1. Try creating a oscap - policy with more than 255 chars
2. Provide all the entries and click submit.
3.

Actual results:
oscap policy_name field accepts more than 255 chars

Expected results:
oscap policy_name field should detect more than 255 chars and report to the user that the length is too long.

Additional info:

Actions #1

Updated by Shlomi Zadok almost 9 years ago

  • Status changed from New to Duplicate
Actions #2

Updated by Shlomi Zadok almost 9 years ago

Duplicate of #12882

Actions #3

Updated by Marek Hulán over 8 years ago

  • Status changed from Duplicate to New
  • Target version set to 115

still valid issue in 0.6.2

Actions #4

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman_openscap/pull/213 added
Actions #5

Updated by Marek Hulán over 8 years ago

  • Target version changed from 115 to 1.5.3
Actions #6

Updated by Marek Hulán over 8 years ago

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

Updated by Marek Hulán over 8 years ago

  • Translation missing: en.field_release set to 191
Actions

Also available in: Atom PDF