Red Hat Bugzilla – Bug 990349
Group name length is not validated correctly
Last modified: 2018-02-05 19:41:31 EST
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
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'.
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.
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.
Beaker needs to validate the group name length instead of letting MySQL silently truncate it.
*** Bug 990351 has been marked as a duplicate of this bug. ***
On Gerrit: http://gerrit.beaker-project.org/#/c/2140/1
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.
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.
Beaker 0.15 has been released.
*** Bug 962646 has been marked as a duplicate of this bug. ***