Bug 728624
Summary: | activation keys are successfully being created with invalid chars | ||
---|---|---|---|
Product: | [Community] Candlepin | Reporter: | John Sefler <jsefler> |
Component: | candlepin | Assignee: | William Poteat <wpoteat> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | John Sefler <jsefler> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 0.5 | CC: | jmolet, spandey, wpoteat |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Solaris | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-05-30 13:15:27 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: | 682238 |
Description
John Sefler
2011-08-05 20:45:54 UTC
An empty name value appears to be ok too. I would assume this is acceptable. Please confirm. [jsefler@jseflerT510 ~]$ curl -k --request POST --user testuser1:password --data '{"name":""}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-onprem-62candlepin.usersys.redhat.com:8443/candlepin/owners/admin/activation_keys | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 104 259 100 259 0 11 539 22 --:--:-- --:--:-- --:--:-- 701 { "created": "2011-08-05T20:55:41.106+0000", "id": "8a90f8c63196bb2001319bbae1323a24", "name": "", "owner": { "displayName": "Admin Owner", "href": "/owners/admin", "id": "8a90f8c63196bb20013196bb9e210006", "key": "admin" }, "pools": [], "updated": "2011-08-05T20:55:41.106+0000" } Works as expected now, all above cases fail as they should: [jmolet@jmolet ~]$ for NAME in "" [OpeningBracket[ ]ClosingBracket] \`BackTick\` ^Caret^ \\Backslash\\; do echo "name: $NAME"; curl -k --request POST --user testuser1:password --data '{"name":"$NAME"}' --header 'accept: application/json' --header 'content-type: application/json' https://mgmt5.rhq.lab.eng.bos.redhat.com:8443/candlepin/owners/admin/activation_keys | python -mjson.tool; echo; done name: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 116 100 100 100 16 306 49 --:--:-- --:--:-- --:--:-- 393 { "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [$NAME]" } name: [OpeningBracket[ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 116 100 100 100 16 300 48 --:--:-- --:--:-- --:--:-- 400 { "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [$NAME]" } name: ]ClosingBracket] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 116 100 100 100 16 311 49 --:--:-- --:--:-- --:--:-- 398 { "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [$NAME]" } name: `BackTick` % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 116 100 100 100 16 296 47 --:--:-- --:--:-- --:--:-- 390 { "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [$NAME]" } name: ^Caret^ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 116 100 100 100 16 304 48 --:--:-- --:--:-- --:--:-- 392 { "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [$NAME]" } name: \Backslash\ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 116 100 100 100 16 310 49 --:--:-- --:--:-- --:--:-- 398 { "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [$NAME]" } Tested against: "version": "0.4.10" marking VERIFIED |