Project

General

Profile

Actions

Bug #12885

closed

A SCAP Compliance Policy cannot be created with a space in its name

Added by Shlomi Zadok over 8 years ago. Updated almost 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=1292622
Description of problem: When I try to create a new Compliance Policy with a space in its name, the Satellite web UI will accept the policy's name but on trying to move to the next step, it reports the name is invalid.

Version-Release number of selected component (if applicable): Satellite web UI version 6.1.3.

How reproducible: Every time.

Steps to Reproduce:
1. Login to the Satellite Web UI.
2. Navigate Hosts > Policies.
3. Click "New Compliance Policy".
4. Enter the text "Test policy" in the 'Name' field and the same in the 'Description' field.
5. Click 'Next'.

Actual results: The label and border of the 'Name' fields becomes read and the text "is invalid" appears to the right of the field.

Expected results: One of the following..

1. Information about which characters are invalid is provided when the "Name" field is active. If the user enters an invalid character, the validation message which appears when the user clicks 'Next' should provide detail about why the name provided is invalid. Simply stating it's invalid does not enable the user to rectify the problem as they don't know what's wrong. An enhancement to this would be to have the validation message appear immediately that the user tries to leave the 'Name' field.
2. The 'Name' field allows the entry of a policy name which includes spaces. I cannot see any reason why space characters are not allowed.

Additional info: The restriction on having spaces in the policy's name appears to be enforced at [1]. Thanks to Ohad Levy for providing this link.

[1] https://github.com/theforeman/foreman_openscap/blob/master/app/models/foreman_openscap/policy.rb#L24

Actions #1

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Shlomi Zadok
  • Pull request https://github.com/theforeman/foreman_openscap/pull/147 added
Actions #2

Updated by Shlomi Zadok over 7 years ago

  • Target version set to 1.6.0
Actions #3

Updated by Shlomi Zadok over 7 years ago

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

Also available in: Atom PDF