Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 595500 - configchannel.createOrUpdatePath cuts off newlines
Summary: configchannel.createOrUpdatePath cuts off newlines
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 1.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Lukas Zapletal
QA Contact: Red Hat Satellite QA List
: 795834 856586 (view as bug list)
Depends On:
Blocks: 620366 space12 819027
TreeView+ depends on / blocked
Reported: 2010-05-24 20:10 UTC by Josh
Modified: 2018-11-29 20:12 UTC (History)
6 users (show)

Fixed In Version: spacewalk-java-1.2.41-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 620366 (view as bug list)
Last Closed: 2010-11-20 14:20:52 UTC

Attachments (Terms of Use)
api verbose output (4.06 KB, text/plain)
2010-05-25 19:56 UTC, Joshua Roys
no flags Details

Description Josh 2010-05-24 20:10:18 UTC
Description of problem:
using the createOrUpdatePath xmlrpc command API results in newlines being removed from the end of the file

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

How reproducible:

Steps to Reproduce:
1. configchannel.createOrUpdatePath()
2. Log in to web ui, see that the file has a missing newline.
Actual results:
ending newlines are removed

Expected results:
ending newlines are preserved

Additional info:
have not tested against 1.0 yet

Comment 1 Joshua Roys 2010-05-25 19:56:21 UTC
Created attachment 416499 [details]
api verbose output

1.0 has the bug still.

Comment 2 Lukas Zapletal 2010-09-16 07:45:47 UTC
I am going to commit a fix that will add new parameter named "contents_enc64" to the filestruct of client.system.config.createOrUpdatePath API call. When this parameter is set to true the server expects to have the content in base64 encoding. This prevents from any whitespace stripping that takes place while parsing XML. Example:

# login etc

content = base64.b64encode(open("/my/config/file.conf").read())

file_struct = { 'contents':content,
        'contents_enc64':'true' }

# call createOrUpdatePath and logout

Comment 3 Lukas Zapletal 2010-09-16 14:24:42 UTC

Comment 4 Lukas Zapletal 2010-09-24 06:20:46 UTC
Setting ON_QA on Cliff's request. This should be already in 2010-09-19 respin.

Comment 5 Jan Pazdziora 2010-11-20 14:20:52 UTC
Aligning under space12 and closing with CURRENTRELEASE.

Comment 6 Tomas Lestach 2012-02-21 16:27:35 UTC
*** Bug 795834 has been marked as a duplicate of this bug. ***

Comment 7 Tomas Lestach 2012-09-26 12:00:27 UTC
*** Bug 856586 has been marked as a duplicate of this bug. ***

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