Bug 619702

Summary: Spacewalk return error when receive Unicode string in xmlrpc communication
Product: Red Hat Satellite 5 Reporter: Miroslav Suchý <msuchy>
Component: ServerAssignee: Miroslav Suchý <msuchy>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: high Docs Contact:
Priority: urgent    
Version: 530CC: cperry, mzazrivec, pnovotny, psklenar, slukasik, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-backend-0.5.28-58-sat Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 619699 Environment:
Last Closed: 2010-10-05 13:16:53 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: 619699    
Bug Blocks: 518253, 579830, 619086    

Description Miroslav Suchý 2010-07-30 08:35:51 UTC
+++ This bug was initially created as a clone of Bug #619699 +++

Description of problem:
During work on https://bugzilla.redhat.com/show_bug.cgi?id=579830
I find that if we send unicode string in xmlrpc, we will get from server rhnFault

While running 'registration.add_hw_profile': caught
exceptions.UnicodeEncodeError : 'ascii' codec can't encode character u'\xae' in position 44: ordinal not in range(128) 

This is becouse we do in backend/server/rhnSQL/driver_cx_Oracle.py
     def _execute_wrapper(self, function, *p, **kw):
        params =  ','.join(["%s: %s" % (str(key), str(value)) for key, value \

and str on e.g. '\xae' will fail.

Comment 1 Clifford Perry 2010-07-30 17:09:34 UTC
We should re-spin the backend errata to include fix for this.

Comment 2 Miroslav Suchý 2010-08-03 13:52:39 UTC
cherrypicked to satellite.git as commit da0e561e38969c5223418a57f1ec0511668efa83

Comment 3 Petr Sklenar 2010-08-04 14:27:48 UTC
*** Bug 619706 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Suchý 2010-09-07 08:31:26 UTC
Can you please retest it again. I assume this was happening due issue which was fixed by http://errata.devel.redhat.com/errata/show/9884
If you find that this bz is still valid, I would welcome if you can provide hostname of client where this issue eventually happen.

Comment 15 errata-xmlrpc 2010-10-05 13:16:53 UTC
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/RHBA-2010-0740.html