Bug 495778 - If the text that accompanies a Solaris patch/patch cluster contains Unicode characters, rhnpush will generate an intriguing ISE
If the text that accompanies a Solaris patch/patch cluster contains Unicode c...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Solaris (Show other bugs)
530
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Steve Salevan
:
Depends On:
Blocks: 457000
  Show dependency treegraph
 
Reported: 2009-04-14 14:42 EDT by Steve Salevan
Modified: 2009-09-10 15:41 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:41:14 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 Steve Salevan 2009-04-14 14:42:00 EDT
Description of problem:
If a user attempts to push a custom patch or patch cluster and the text accompanying this patch or cluster contains a Unicode character (such as u'\xb7'), rhnpush will generate an ISE, containing the following Python traceback:

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/server/apacheUploadServer.py", line 107, in _wrapper
    ret = function(req)
  File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 145, in handler
    relative_path=self.rel_package_path, org_id=self.org_id)
  File "/usr/share/rhn/server/rhnPackageUpload.py", line 223, in push_package
    header_end=header_end, channels=channels)
  File "/usr/share/rhn/server/importlib/mpmSource.py", line 215, in create_package
    org_id=org_id, channels=channels)
  File "/usr/share/rhn/server/importlib/mpmSource.py", line 88, in populate
    org_id, channels)
  File "/usr/share/rhn/server/importlib/headerSource.py", line 135, in populate
    header_start, header_end)
  File "/usr/share/rhn/server/importlib/headerSource.py", line 57, in populate
    val = str(val)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb7' in position 4: ordinal not in range(128)

Since, to the best of my knowledge, Unicode is included on modern-day Solaris machines, it seems that we're assuming we'll be receiving ASCII text from the server side, and when we don't receive it, the Unicode codec bombs.

Version-Release number of selected component (if applicable):
530-re20090409.1

How reproducible:
Always

Steps to Reproduce:
1. Create a patch or patch cluster whose accompanying text includes a Unicode character that the ascii codec cannot encode to Unicode
2. Upload this patch or patch cluster to a Solaris box registered to a Satellite
3. rhnpush that patch or patch cluster
  
Actual results:
ISE and traceback e-mail similar to attached traceback e-mail

Expected results:
Upload successful

Additional info:
Comment 4 Jan Pazdziora 2009-04-22 09:22:11 EDT
Steve, what happens when you install the patch cluster on the Solaris box manually, not via Satellite? Will it work as expected?

I wouldn't like use to change the behaviour of rhnpush this late in Satellite 5.3.0 release time, only to find out that the UTF-8 characters bomb in native Solaris toolchain.
Comment 5 Jan Pazdziora 2009-05-22 08:03:41 EDT
I've reproduced the problem.
Comment 6 Jan Pazdziora 2009-05-22 10:08:59 EDT
Fixed in Spacewalk repo, 8803cf9c8ac68f2a3146af2086d20689ab2611d6 and dd570b6d10c1e3f008c3c1e4488a402101f5ee2f.
Comment 7 Steve Salevan 2009-05-26 14:25:24 EDT
It's probably moot by this point, but upon all supported Solaris permutations, all Unicode-laden patch clusters installed successfully when the installation was performed manually.
Comment 8 Steve Salevan 2009-06-03 15:04:29 EDT
VERIFIED on 5/29 build.
Comment 9 Brandon Perkins 2009-08-25 13:27:54 EDT
Release Pending.  Looks good on latest Stage Satellite.
Comment 10 Brandon Perkins 2009-09-10 15:41:14 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.