Bug 1001826 - The restrictions related to the cloned channel name are not described correctly.
The restrictions related to the cloned channel name are not described corre...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI (Show other bugs)
560
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Tomas Lestach
Dimitar Yordanov
:
Depends On:
Blocks: sat570-lowbug
  Show dependency treegraph
 
Reported: 2013-08-27 16:47 EDT by Dimitar Yordanov
Modified: 2015-01-13 04:55 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-13 04:55:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dimitar Yordanov 2013-08-27 16:47:17 EDT
Description of problem:

The restrictions related to the  cloned channel name  are not described correctly. There are 4 issues:

=== 1. Channel name may comprise parentheses as well. ===
=== 2. Channel label can start with a digit
This is the current description:

'''
Create or edit software channels from this page.

If the parent channel is set to 'none', the channel is a base channel. Otherwise, the channel is a child of the specified channel.

Channel name and label are required. They each must be at least 6 characters in length. Labels must begin with a letter, contain only lowercase letters, hyphens ('-'), periods ('.'), underscores ('_'), and numerals. Channel name may also contain spaces and forward slashes ('/').

Channel summary is also required.
'''

===> related code:

# bugzilla: 161517 - allow _ and / in channel labels
  # bugzilla: 459827 - disallow names longer than 64 characters


  unless ($channel_name =~ /^[a-z][\w\d\s\-\.\'\(\)\/\_]*$/i and 
length($channel_name) >= 6 and length($channel_name) <= 256) {

    $pxt->push_message(local_alert => "Invalid channel name '" .
    PXT::Utils->escapeHTML($channel_name) . "' - must be at least 6 characters long and no longer than 256 characters, begin with a letter, and contain only letters, digits, spaces, '-', ' / ', '_' and '.'");
    $errors++;
  }

we can see that parentheses are allowed as well for the cloned channel name.

=== 3. Channel name length should not be greater than 256 characters.  ===
=== 4. Channel label length should not be greater than 128 characters. ===

===>  related code:

    label               VARCHAR2(128) NOT NULL,
    basedir             VARCHAR2(256) NOT NULL,
    name                VARCHAR2(256) NOT NULL,

The length issues are not critical, as the Edit Field is limited to 256 chars for Name nad 128 chars for Label, but still if some of the restrictions for the channel name is not met then the error message will inform for the length restriction:

must be at least 6 characters long and no longer than 256 characters, begin with a letter, and contain only letters, digits, spaces, '-', ' / ', '_' and '.'"

   In case something is wrong with the Channel Label, then the error message do not provide info about the length restrictions.
 I guess both messages should be equivalent.
 
Version-Release number of selected component (if applicable):
spacewalk-html-2.0.3-2

How reproducible:
100%

Steps to Reproduce:
1. Create a custom software channel.
2. Clone the channel.
3. Choose a channel name with length less than 6 chars.
4. Choose a channel Label with length less than 6 chars.
5. Choose name for the new channel that comprises  parentheses - clone-test(test), and channel label that starts with digit.

Actual results:
The channel is cloned.

Expected results:
According to the description the name should not comprise parentheses.

Additional info:
Comment 5 Dimitar Yordanov 2013-08-29 08:39:41 EDT
Fix the API error messages.
Spacewalk master: f5c5063d5ff87f319d121e41041dce97e45ccc41
Comment 8 Clifford Perry 2015-01-13 04:55:11 EST
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is
being moved to a Closed Current Release state. 

The Satellite 5.7 GA Errata:
 - https://rhn.redhat.com/errata/RHSA-2015-0033.html 

Satellite 5.7 Release Notes:
 -
https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html

Satellite Customer Portal Blog announcement for release:
 - https://access.redhat.com/blogs/1169563/posts/1315743 

Cliff

Note You need to log in before you can comment on or make changes to this bug.