Bug 480345 - API activationkey.create - generates oracle error on bad input
API activationkey.create - generates oracle error on bad input
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: API (Show other bugs)
0.5
All Linux
low Severity medium
: ---
: ---
Assigned To: Brad Buckingham
Jesus M. Rodriguez
:
Depends On:
Blocks: space05
  Show dependency treegraph
 
Reported: 2009-01-16 10:45 EST by Brad Buckingham
Modified: 2009-09-17 03:09 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-17 03:09:20 EDT
Type: ---
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 Brad Buckingham 2009-01-16 10:45:54 EST
Description of problem:

When executing the activationkey.create apis, if the user provides a value for the "key" parameter that is too long, a DB exception is returned to the user; however, if the same were done from he UI, the user gets a more user friendly error (e.g. "Key cannot be greater than 45 characters.").

The API needs to be updated to perform the same validations that the UI currently provides and return the user with a more useful error message.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. execute activationkey.create() api with key greater than 45 characters
2.
3.
  
Actual results:
java.sql.SQLException exception generated (viewable in /var/log/tomcat5/catalina.out)

Expected results:
user friendly error/exception generated and thrown to user

Additional info:
Comment 1 Brad Buckingham 2009-01-16 10:52:06 EST
Modifications made to master using git commit: 307a8e2325c896b9af12aecff7ec1b742ce9f24c


Updated the activationkey.create() apis to use the validator that is executed if user were creating the key from the UI.  This will generate a more user friendly ValidationException to the user indicating info like "Key cannot be greater than 45 characters."
Comment 2 Jesus M. Rodriguez 2009-04-14 10:12:20 EDT
Spacewalk 0.5 released.
Comment 3 Miroslav Suchý 2009-09-17 03:09:20 EDT
Spacewalk 0.5 has been released for long time ago.

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