Bug 672233
| Summary: | consumer names with ',' or '#' in name not allowed, possibly other chars | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] Candlepin (Migrated to Jira) | Reporter: | Adrian Likins <alikins> | ||||||
| Component: | candlepin | Assignee: | Justin Harris <jharris> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | John Sefler <jsefler> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 0.5 | CC: | cduryee, jharris, jkeck | ||||||
| Target Milestone: | --- | Keywords: | QA-Closed | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Solaris | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2011-02-23 21:51:31 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 639436 | ||||||||
| Attachments: |
|
||||||||
|
Description
Adrian Likins
2011-01-24 14:30:39 UTC
Consumer names are now limited to: alphanumeric, period, dash, underscore Names are also limited to 250 characters max. Verifying candlepin version (0.1.32).... [root@jsefler-dev2-1 ~]# curl -k -u foo:bar --request GET https://candlepin1.devlab.phx1.redhat.com:443/candlepin/status | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 56 0 56 0 0 103 0 --:--:-- --:--:-- --:--:-- 666 { "release": "1%{?dist}", "result": true, "version": "0.1.32" } [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=periods.dashes-underscores_alphanumeric123 The system with UUID ba2c99e6-7a7e-4302-833a-77184ac95513 has been unregistered d9b00b6d-b668-47f9-a017-69a4c71b42f2 periods.dashes-underscores_alphanumeric123 [root@jsefler-dev2-1 ~]# subscription-manager identity Current identity is: d9b00b6d-b668-47f9-a017-69a4c71b42f2 name: periods.dashes-underscores_alphanumeric123 ^^^ VERIFIED SUCCESS AS EXPECTED [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=a! System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=a@ System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=a# System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=a, System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=a* System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=a= System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name="&" System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=? System name must consist of only alphanumeric characters, periods, dashes and underscores. [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name="|" System name must consist of only alphanumeric characters, periods, dashes and underscores. ^^^ REGISTER WITH INVALID CHARACTERS IN THE NAME WAS BLOCKED AS EXPECTED [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 97f41ef3-2036-4c9d-b7df-d78df8d9b05e 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 ^^^ REGISTER WITH A NAME OF 249 CHARACTERS WAS A SUCCESS AS EXPECTED [root@jsefler-dev2-1 ~]# subscription-manager register --username=xeops --password=redhat --force --name=1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 The system with UUID 97f41ef3-2036-4c9d-b7df-d78df8d9b05e has been unregistered Name of the consumer should be shorter than 250 characters ^^^ REGISTER WITH A NAME OF 250 CHARACTERS WAS BLOCKED AS EXPECTED moving to VERIFIED Name of the consumer should be shorter than 250 characters
^ MISSING PERIOD
Created attachment 475882 [details]
verified 250 char limit name test through the gui
Created attachment 475884 [details]
verified invalid chars test through the gui
Period has been added. Was that the only issue so far? Yes - your implementation for the character limitations for consumer names looks good. The tests in comment #2 all passed and I've already built some automated tests around this for our nightly test runs. [root@jsefler-f12-candlepin candlepin]# git show-ref BETA
3b0042c82f8277ef3cc1e81771b0c19181721fa7 refs/heads/BETA
d32f011d86b900370d80ddb5518f584689044b87 refs/remotes/origin/BETA
[root@jsefler-onprem01 ~]# grep hostname= /etc/rhsm/rhsm.conf
hostname=jsefler-f12-candlepin.usersys.redhat.com
[root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --force --name=1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
Name of the consumer should be shorter than 250 characters.
^ PERIOD WAS ADDED
moving back to VERIFIED
Update...
Names are now limited to 255 characters max due to the following:
commit a0db7c35f8d7ee71daeabaf39788b3f47206e0e0
Author: William Poteat <wpoteat>
Date: Wed Apr 9 14:34:20 2014 -0400
1065369: Use Hibernate Validation to supersede database error reporting.
Current violations of 'not null' and size constraints result in runtime errors.
Hibernate validation checks annotated fields prior to database interaction.
|