Bug 470098 - system.setDetails doesn't handle if you pass in a country name greater than 2 characters
system.setDetails doesn't handle if you pass in a country name greater than 2...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
medium Severity medium
: ---
: ---
Assigned To: Justin Sherrill
John Matthews
:
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2008-11-05 13:41 EST by Justin Sherrill
Modified: 2009-09-10 15:54 EDT (History)
1 user (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:54:00 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 Justin Sherrill 2008-11-05 13:41:28 EST
We store countries in the DB by 2 letters.  If you try to call system.setDetails to set the country and pass in something greater than 2 letters, you get an odd traceback because an uncaught oracle exception was thrown.

We need to check to see if it's greater than 2 letters and throw a verbose exception if it is.
Comment 1 Justin Sherrill 2008-11-05 15:14:59 EST
 f5911db..346398b
Comment 2 John Matthews 2009-01-23 15:54:04 EST
Verified against: Satellite-5.3.0-RHEL5-re20081223.1-i386-embedded-oracle.iso

Example of the error message returned:

redstone.xmlrpc.XmlRpcFault: The specified country code 'USAA' is not recognized.  Countries are specified using their two letter abbreviations.
Comment 3 Sayli Karmarkar 2009-08-14 14:59:38 EDT
import xmlrpclib
server = xmlrpclib.Server("http://saturl/rpc/api", verbose = 0)
key = server.auth.login("sayli", "redhat")

result = server.system.setDetails(key, 1000013080, {"country":"fdhks"})
print result

>>>
xmlrpclib.Fault: <Fault 2280: "redstone.xmlrpc.XmlRpcFault: The specified country code 'fdhks' is not recognized.  Countries are specified using their two letter abbreviations.">

Moving to release_pending.
Comment 4 Brandon Perkins 2009-09-10 15:54:00 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

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