Bug 480345 - API activationkey.create - generates oracle error on bad input
Summary: API activationkey.create - generates oracle error on bad input
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 0.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Brad Buckingham
QA Contact: Jesus M. Rodriguez
URL:
Whiteboard:
Depends On:
Blocks: space05
TreeView+ depends on / blocked
 
Reported: 2009-01-16 15:45 UTC by Brad Buckingham
Modified: 2009-09-17 07:09 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:09:20 UTC
Embargoed:


Attachments (Terms of Use)

Description Brad Buckingham 2009-01-16 15:45:54 UTC
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 15:52:06 UTC
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 14:12:20 UTC
Spacewalk 0.5 released.

Comment 3 Miroslav Suchý 2009-09-17 07:09:20 UTC
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.