Bug 990349 - Group name length is not validated correctly
Group name length is not validated correctly
Product: Beaker
Classification: Community
Component: general (Show other bugs)
Unspecified Unspecified
medium Severity low (vote)
: 0.15
: ---
Assigned To: Amit Saha
: 962646 990351 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2013-07-30 23:17 EDT by wangjing
Modified: 2018-02-05 19:41 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-02 22:27:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description wangjing 2013-07-30 23:17:42 EDT
Description of problem:
now group name is limited to 16 characters, but there is no message to indicate, and via CLI, the message need to be corrected.

Version-Release number of selected component (if applicable):
Version - 0.14.0 beaker-devel env

How reproducible:

Steps to Reproduce:
1). via CLI, run:
#  bkr group-create --display-name=wjgroup wjgroupnamemorethan16

2). via web UI, add a group which has group name 'wjgroupnamemorethan16'.

Actual results:
1). via CLI, it returned message:'Group created: wjgroupnamemorethan16.'
but actually 'wjgroupnamemoret' is created.

2). via web UI, no message and group name is cut off automatically.

Expected results:
1). via CLI, it should return message: 'Group created: wjgroupnamemoret.' or it's better to return 'Group name limit 16 characters' for indicating.

2). via web UI, we could add a text behind the group name box indicating the limit.

Additional info:
Comment 2 Dan Callaghan 2013-07-30 23:59:30 EDT
Beaker needs to validate the group name length instead of letting MySQL silently truncate it.
Comment 3 Dan Callaghan 2013-07-30 23:59:40 EDT
*** Bug 990351 has been marked as a duplicate of this bug. ***
Comment 4 Amit Saha 2013-07-31 23:55:48 EDT
On Gerrit: http://gerrit.beaker-project.org/#/c/2140/1
Comment 5 Amit Saha 2013-08-02 02:06:58 EDT
As it turns out, we already had Group name validation in place for the Web UI, but it was wrongly setup to allow 255 characters, whereas the database allowed only 16. The patch increases the group length name in the tg_group table to 255 characters. Validation did not exist for the XML-RPC interface and has been added.
Comment 9 wangjing 2013-08-06 02:05:52 EDT
verify on beaker-devel(20130806)-->pass
1. via CLI:

bkr group-modify --group-name=<morethan255charactersname> groupname
bkr group-create <morethan255characters-group name>

bkr group-modify --group-name=<255characterslongname> groupname
bkr group-create <255characterslong-group name>

2. via webUI:

1)add a new group with a group name more than 255 characters.
2)modify a group name to more than 255 characters.

3)add a new group with a group name which is 255 characters long.
4)modify a group name to a name which is 255 characters long.

return proper warning text and limit to 255 characters.
Comment 10 Nick Coghlan 2013-10-02 22:27:27 EDT
Beaker 0.15 has been released.
Comment 11 Dan Callaghan 2014-03-25 20:53:33 EDT
*** Bug 962646 has been marked as a duplicate of this bug. ***

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