RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1263734 - Net::FTP incorrectly translates text files to NVT when using ASCII transfer mode
Summary: Net::FTP incorrectly translates text files to NVT when using ASCII transfer mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl
Version: 7.2
Hardware: All
OS: All
high
high
Target Milestone: rc
: ---
Assignee: Jitka Plesnikova
QA Contact: Martin Kyral
Lenka Špačková
URL:
Whiteboard:
Depends On:
Blocks: 1203710 1289025 1295829 1313485
TreeView+ depends on / blocked
 
Reported: 2015-09-16 14:42 UTC by Petr Pisar
Modified: 2019-08-15 05:26 UTC (History)
9 users (show)

Fixed In Version: perl-5.16.3-288.el7
Doc Type: Release Note
Doc Text:
Line endings are now preserved in files uploaded with the Net::FTP Perl module in text mode Previously, when uploading a file with the Net::FTP Perl module in text mode, ends of lines in the uploaded file were incorrectly transformed. This update corrects end-of-line normalization from local to Network Virtual Terminal (NVT) encoding when uploading data to an FTP server, and the described problem no longer occurs.
Clone Of: 1263378
Environment:
Last Closed: 2016-11-04 00:16:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Upstream fix ported to perl-5.16.3 (1.35 KB, patch)
2015-10-27 15:39 UTC, Petr Pisar
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CPAN 41642 0 None None None Never
Red Hat Knowledge Base (Solution) 1615333 0 None None None Never
Red Hat Product Errata RHBA-2016:2191 0 normal SHIPPED_LIVE perl bug fix update 2016-11-03 13:19:19 UTC

Description Petr Pisar 2015-09-16 14:42:12 UTC
+++ This bug was initially created as a clone of Bug #1263378 +++

Transferring a unix text file via ftp with the perl Net:FTP module in ASCII mode leads to incorrect data in the transferred file when the source file contains 2 or more consecutive blank lines due to an incorrect transformation of source data from unix text format to the Network Virtual Terminal (NVT) data format.

[...]
--- Additional comment from Petr Pisar on 2015-09-16 13:20:04 GMT ---

Upstream fixed this issue with libnet's commit:

From 24eb8619451c3d8529d903d9133d03a7f447488f Mon Sep 17 00:00:00 2001
From: Steve Hay <steve.m.hay>
Date: Fri, 3 Jan 2014 17:41:55 +0000
Subject: [PATCH] Fix incorrect handling of CRLF in Net::FTP

----

perl-5.16.3-286.el7.x86_64 is affected.

Comment 2 Petr Pisar 2015-10-27 15:39:18 UTC
Created attachment 1086908 [details]
Upstream fix ported to perl-5.16.3

Comment 4 Jitka Plesnikova 2016-03-03 12:51:38 UTC
How to test:

(1) Install vsftpd server, configure it to enable anonymous upload into /var/ftp/upload directory from localhost, keep ascii_upload_enable=NO.
(2) Install perl, and strict, warnings, Net::FTP, Data::Dumper, Test::More Perl modules.
(3) Store testdata file from https://bugzilla.redhat.com/attachment.cgi?id=1073993 into /tmp/testdata.
(4) Execute reproducer from https://bugzilla.redhat.com/attachment.cgi?id=1073992.
Before:
  The reproducer fails on `remote file matches expected content' test.
  The file stored on the server will have some CR bytes missing.
After:
  The reproducer returns 0 exit code as all tests pass.
  The file stored on the serer will have all CR's converted onto CR-LF pairs.

Comment 8 Jitka Plesnikova 2016-09-27 13:47:28 UTC
It looks good.

Comment 10 errata-xmlrpc 2016-11-04 00:16:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2191.html


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