Skip Menu |

This queue is for tickets about the Net-SFTP CPAN distribution.

Report information
The Basics
Id: 16117
Status: rejected
Priority: 0/
Queue: Net-SFTP

People
Owner: Nobody in particular
Requestors: diego.veiga [...] embraer.com.br
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.10
Fixed in: (no value)



Subject: hash variable in function put return the error "input must be 8 bytes long at "crypt method" line XX"
perl -V Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.9, archname=sun4-solaris-64int uname='sunos localhost 5.9 sun4u sparc sunw,ultra-1' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=define use64bitall=undef uselongdouble=undef Compiler: cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-xO3 -xdepend', cppflags='' ccversion='Sun WorkShop', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.6.1/lib/sun4-solaris-64int/CORE' cccdlflags='-KPIC', lddlflags='-G' Characteristics of this binary (from libperl): Compile-time options: USE_64_BIT_INT USE_LARGE_FILES Locally applied patches: 9676 Port the OpenBSD glob() security patch 9678 Addendum to #9676: some missing changes from OpenBSD glob.c 9679 Up $File::Glob::VERSION, add OpenBSD glob version note 9693 $VERSION and Version() on same line provokes CPAN.pm warning 9706 #7210 broke .packlist generation 9707 ExtUtils::Installed doesn't quote regex metacharacters in paths 9775 Typo in utf8.h 9950 Revert integration of #8254,#8255 in #8620 (causes coredump) 10021 Insecure regexes 10091 $ref1 == $ref2 behaves unpredictably if not NV_PRESERVES_UV 10093 Incorrect line numbers in AutoSplit 10100 [20010514.027] PL_last_in_gv may not be GV if stale filehandle 10145 [20010515.004] Segfaults from premature GC 10203 Don't think about UTF8 10250 [20010422.005] perl -e '{s//${}/; //}' segfaults 10394 Leakage of file scope lexicals into predeclared subroutines 10404 eval.t was relying on pre-#10394 buggy behavior 10412 Rationalize locale handling to fix bugs uncovered by #10394 10422 Potential buffer overrun if the radix separator > 1 byte 10448 Lexicals outside eval weren't resolved correctly pre-#10394 10450 Optimize #10448 slightly 10543 Add LC_MESSAGES constant to POSIX module 10667 #10449 broke visibility of lexicals inside DB::DB() 10739 C<eval "/x$\r\n/x"> fails to compile correctly 10939 Proposed fix for Pod::Man 11169 Doc patch for Tie::Hash 11374 Make h2ph grok ccsymbols fo the form 1234L, 1234ULL etc 11427 t/harness wasn't picking up all the tests 11428 run/runenv.t needs fflushNULL sanity 11431 pod/*.t tests not picked up by t/TEST either 11510 eval 'format foo=' would loop indefinitely 11713 UTF8 wasn't printing for PVMGs 11716 UTF8 flag should be meaningful only when POK 11808 [20010831.002] Bug in Term::Cap on Solaris ansi terminal 11847 Typo in perl_clone() code causes local(*foo) breakage 12005 [20010912.007] substr reference core dump 12024 Fix local() precedence bug in #8311 12303 Fix 'local $!=0;undef*STDOUT;' segfault 12304 Pod::Html makes a poor guess at author 12350 Typo in IO::Seekable doc 12496 Carp::shortmess_heavy() doesn't notice trailing newline 12549 readline() doesn't work with 'our' variables 12550 #12549 wasn't aware of strictures 12752 croak(Nullch) wasn't printing the contents of ERRSV 12811 [20011101.069] \stat('.') gives 'free unref scalar' error 12812 Slight modification of #12811 13149 Integrate #13147 from mainline (fixes nit in #10091) 13261 Integrate #8340,#13260 from mainline Built under solaris Compiled at Apr 6 2002 14:45:34 @INC: /usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib /usr/perl5/site_perl/5.6.1/sun4-solaris-64int /usr/perl5/site_perl/5.6.1 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int /usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl . ----------------------------------------- uname -a SunOS sp07co 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-V250 ----------------------------------------- modules: Crypt::Blowfish -- 2.09 Crypt::CBC -- 2.14 Crypt::DES -- 2.03 Crypt::DES_EDE3 -- 0.01 Crypt::DH -- 0.03 Crypt::DSA -- 0.12 Crypt::IDEA -- undef Crypt::Random -- 1.25 Crypt::Rijndael -- 0.04 Net::SFTP -- 0.10 Net::SSH::Perl -- 1.29 ----------------------------------------- the package for sftp that i created: package pbs_emb_ftp; use Exporter; # export subs/vars use File::stat; # file statistics use File::Basename; # file statistics use Net::SFTP; # ftp client use Net::SFTP::Constants qw( SSH2_FILEXFER_ATTR_PERMISSIONS SSH2_FILEXFER_VERSION ); use Net::SFTP::Attributes; use strict; use Crypt::Blowfish; use Crypt::CBC; use lib '/export/home/rphp/p_publish/_tools/include/perl'; # in house lib calls # in-house use pbs_env_emb_ftp; # ftp config use pbs_log_emb; # embraer log format use pbs_debug; # debug utils #============================================================================== # Package Vars #============================================================================== our( @ISA, @EXPORT, $VERSION, %hshEmbFtp ); $VERSION = 1.00; @ISA = qw(Exporter); # exported functions/vars @EXPORT = qw( &FtpEmbPut ); sub FtpEmbPut { my ( $strHost, $strPutDir, @arrFiles ) = @_; my ( $objFtp, @RemoteDirAll, $RemoteDirAll, $ending_value, $RemoteDirExplode, $counter, $strFileName, $RemoteDirFile, $a ); #$objFtp = Net::SFTP->new($strHost, user=>$hshEmbFtp{'username'}, password=>$hshEmbFtp{'password'}, ssh_args => [ debug => '1', protocol => '2', ciphers => 'blowfish-cbc' ]) or die "FTP ERROR - Can't connect $strHost \n"; $objFtp = Net::SFTP->new($strHost, user=>$hshEmbFtp{'username'}, password=>$hshEmbFtp{'password'}) or die "FTP ERROR - Can't connect $strHost \n"; @RemoteDirAll = split(/\//, $strPutDir); $ending_value = scalar(@RemoteDirAll); $RemoteDirExplode = '/'.$RemoteDirAll[1]; for($counter=2 ; $counter <= $ending_value ; $counter++) { if ($objFtp->do_realpath($RemoteDirExplode) eq "") { $a = Net::SFTP::Attributes->new; $objFtp->do_mkdir($RemoteDirExplode, $a); &LogEmbMessage( "~~[ok] - Creating $strHost:$RemoteDirExplode \n" ); } $RemoteDirExplode = $RemoteDirExplode.'/'.$RemoteDirAll[$counter]; } $objFtp->do_open($strPutDir) or die "Permission Denied to access directory $RemoteDirExplode \n"; foreach my $strFileName (@arrFiles) { $RemoteDirFile = $strPutDir.'/'.basename($strFileName); #### print "\n objFtp->put($strFileName,$RemoteDirFile) \n"; #### $objFtp->put($strFileName,$RemoteDirFile) or print("FTP ERROR - Permission Denied to put file $strFileName \n"); &LogEmbMessage( "FTP'ing file -->$strFileName<--"); } exit; } sub EmbFtpError { my $objFtp = shift; # get ftp object reference &LogEmbErrorMsg( "FTP ERROR - " . $objFtp->message ); # log error message $objFtp->quit; # quit ftp return 0; # return error to calling function } 1; ----------------------------------------- the program executing the package pbs_emb_ftp with hash variable: .... $fld_file = "$hshProcess{'omni_output'}"; print "\nHASH:".$hshProcess{'omni_output'}; my $HostDir = "/usr5/FLD/1133/rv0/xml"; print "\n HostDir:".$HostDir; #$fld_file="/export/home/145fim1133273100810803a02tsk_entity_translate.xml"; &FtpEmbPut( $strFTPHost, $HostDir, $fld_file); .... the result: HASH:/export/home/145fim1133273100810803a02tsk_entity_translate.xml HostDir:/usr5/FLD/1133/rv0/xml objFtp->put(/export/home/145fim1133273100810803a02tsk_entity_translate.xml,/usr5/FLD/1133/rv0/xml/145fim1133273100810803a02tsk.xml) input must be 8 bytes long at /usr/local/lib/perl5/site_perl/5.8.5/sun4-solaris/Crypt/DES.pm line 57. ----------------------------------------- the program executing the package pbs_emb_ftp with regular variable: #$fld_file = "$hshProcess{'omni_output'}"; print "\nHASH:".$hshProcess{'omni_output'}; my $HostDir = "/usr5/FLD/1133/rv0/xml"; print "\n HostDir:".$HostDir; $fld_file="/export/home/145fim1133273100810803a02tsk_entity_translate.xml"; &FtpEmbPut( $strFTPHost, $HostDir, $fld_file); .... the result: HASH:/export/home/145fim1133273100810803a02tsk_entity_translate.xml HostDir:/usr5/FLD/1133/rv0/xml objFtp->put(/export/home/145fim1133273100810803a02tsk_entity_translate.xml,/usr5/FLD/1133/rv0/xml/145fim1133273100810803a02tsk.xml) __MESSAGE__: FTP'ing file -->/export/home/145fim1133273100810803a02tsk.xml
From: diego.veiga [...] embraer.com.br

Message body is not shown because it is too large.

Please try to narrow down the repro to a smaller chunk of code.
From: mjoinsd
On Thu Feb 16 22:53:53 2006, DBROBINS wrote: Show quoted text
> Please try to narrow down the repro to a smaller chunk of code.
I am a new poster here, and have the issue which the previous poster had. Installed all required perl mods to get the Net::SFTP to actually run - was a bit complicated but managed it. Here is my code: ************************* print "Enter your user name for walnut.safe-med.com: "; my $ftpUser=<STDIN>; print "\n"; chomp($ftpUser); print "Enter your password for <remote host>: "; ReadMode('noecho'); my $ftpPassword= ReadLine(0); print "\n"; chomp($ftpPassword); ReadMode('normal'); print "Logging onto <remote host> via SFTP\n"; my $ftpObj = Net::SFTP-> new ("<remote host>", user=>$ftpUser, password=>$ftpPassword, debug=>0); print "Logged onto <remote host>...\n"; ******************** Before I get to the final print statement, the script displays input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Crypt/DES.pm line 57. then terminates. Any idea why and/or what I can do to overcome this issue?
From: arul
Hi I am getting the same error.is there a fix/workaround? Thanks Arul On Mon Mar 27 14:27:23 2006, guest wrote: Show quoted text
> On Thu Feb 16 22:53:53 2006, DBROBINS wrote:
> > Please try to narrow down the repro to a smaller chunk of code.
> > > I am a new poster here, and have the issue which the previous poster > had. Installed all required perl mods to get the Net::SFTP to
actually Show quoted text
> run - was a bit complicated but managed it. Here is my code: > ************************* > print "Enter your user name for walnut.safe-med.com: "; > my $ftpUser=<STDIN>; > print "\n"; > chomp($ftpUser); > > print "Enter your password for <remote host>: "; > ReadMode('noecho'); > > my $ftpPassword= ReadLine(0); > print "\n"; > chomp($ftpPassword); > ReadMode('normal'); > > print "Logging onto <remote host> via SFTP\n"; > my $ftpObj = Net::SFTP-> new ("<remote host>", user=>$ftpUser, > password=>$ftpPassword, debug=>0); > print "Logged onto <remote host>...\n"; > > ******************** > Before I get to the final print statement, the script displays > input must be 8 bytes long at > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Crypt/DES.pm
line 57. Show quoted text
> then terminates. > > Any idea why and/or what I can do to overcome this issue?
From: diego.veiga [...] embraer.com.br
Not fixed the bug, I use another solution. regards diego On Qua. Mai. 24 14:10:04 2006, guest wrote: Show quoted text
> Hi > > I am getting the same error.is there a fix/workaround? > > Thanks > Arul > > On Mon Mar 27 14:27:23 2006, guest wrote:
> > On Thu Feb 16 22:53:53 2006, DBROBINS wrote:
> > > Please try to narrow down the repro to a smaller chunk of code.
> > > > > > I am a new poster here, and have the issue which the previous
poster Show quoted text
> > had. Installed all required perl mods to get the Net::SFTP to
> actually
> > run - was a bit complicated but managed it. Here is my code: > > ************************* > > print "Enter your user name for walnut.safe-med.com: "; > > my $ftpUser=<STDIN>; > > print "\n"; > > chomp($ftpUser); > > > > print "Enter your password for <remote host>: "; > > ReadMode('noecho'); > > > > my $ftpPassword= ReadLine(0); > > print "\n"; > > chomp($ftpPassword); > > ReadMode('normal'); > > > > print "Logging onto <remote host> via SFTP\n"; > > my $ftpObj = Net::SFTP-> new ("<remote host>", user=>$ftpUser, > > password=>$ftpPassword, debug=>0); > > print "Logged onto <remote host>...\n"; > > > > ******************** > > Before I get to the final print statement, the script displays > > input must be 8 bytes long at > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-
multi/Crypt/DES.pm Show quoted text
> line 57.
> > then terminates. > > > > Any idea why and/or what I can do to overcome this issue?
> >
From: arul
Hi Diego Thanks for your reply..Could you please share what is your solution. Regards Arul On Wed May 24 15:21:43 2006, guest wrote: Show quoted text
> Not fixed the bug, I use another solution. > regards > > diego > > On Qua. Mai. 24 14:10:04 2006, guest wrote:
> > Hi > > > > I am getting the same error.is there a fix/workaround? > > > > Thanks > > Arul > > > > On Mon Mar 27 14:27:23 2006, guest wrote:
> > > On Thu Feb 16 22:53:53 2006, DBROBINS wrote:
> > > > Please try to narrow down the repro to a smaller chunk of code.
> > > > > > > > > I am a new poster here, and have the issue which the previous
> poster
> > > had. Installed all required perl mods to get the Net::SFTP to
> > actually
> > > run - was a bit complicated but managed it. Here is my code: > > > ************************* > > > print "Enter your user name for walnut.safe-med.com: "; > > > my $ftpUser=<STDIN>; > > > print "\n"; > > > chomp($ftpUser); > > > > > > print "Enter your password for <remote host>: "; > > > ReadMode('noecho'); > > > > > > my $ftpPassword= ReadLine(0); > > > print "\n"; > > > chomp($ftpPassword); > > > ReadMode('normal'); > > > > > > print "Logging onto <remote host> via SFTP\n"; > > > my $ftpObj = Net::SFTP-> new ("<remote host>", user=>$ftpUser, > > > password=>$ftpPassword, debug=>0); > > > print "Logged onto <remote host>...\n"; > > > > > > ******************** > > > Before I get to the final print statement, the script displays > > > input must be 8 bytes long at > > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-
> multi/Crypt/DES.pm
> > line 57.
> > > then terminates. > > > > > > Any idea why and/or what I can do to overcome this issue?
> > > >
> >
Hi Arul, I use this module, take a look over it... use Net::SFTP::Foreign; use Net::SFTP::Foreign::Constants qw( SSH2_FILEXFER_ATTR_PERMISSIONS SSH2_FILEXFER_VERSION ); use Net::SFTP::Foreign::Attributes; Regards On Qui. Mai. 25 13:25:12 2006, guest wrote: Show quoted text
> Hi Diego > > Thanks for your reply..Could you please share what is your > solution. > > Regards > Arul > > On Wed May 24 15:21:43 2006, guest wrote:
> > Not fixed the bug, I use another solution. > > regards > > > > diego > > > > On Qua. Mai. 24 14:10:04 2006, guest wrote:
> > > Hi > > > > > > I am getting the same error.is there a fix/workaround? > > > > > > Thanks > > > Arul > > > > > > On Mon Mar 27 14:27:23 2006, guest wrote:
> > > > On Thu Feb 16 22:53:53 2006, DBROBINS wrote:
> > > > > Please try to narrow down the repro to a smaller chunk of
code. Show quoted text
> > > > > > > > > > > > I am a new poster here, and have the issue which the previous
> > poster
> > > > had. Installed all required perl mods to get the Net::SFTP to
> > > actually
> > > > run - was a bit complicated but managed it. Here is my code: > > > > ************************* > > > > print "Enter your user name for walnut.safe-med.com: "; > > > > my $ftpUser=<STDIN>; > > > > print "\n"; > > > > chomp($ftpUser); > > > > > > > > print "Enter your password for <remote host>: "; > > > > ReadMode('noecho'); > > > > > > > > my $ftpPassword= ReadLine(0); > > > > print "\n"; > > > > chomp($ftpPassword); > > > > ReadMode('normal'); > > > > > > > > print "Logging onto <remote host> via SFTP\n"; > > > > my $ftpObj = Net::SFTP-> new ("<remote host>", user=>$ftpUser, > > > > password=>$ftpPassword, debug=>0); > > > > print "Logged onto <remote host>...\n"; > > > > > > > > ******************** > > > > Before I get to the final print statement, the script displays > > > > input must be 8 bytes long at > > > > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-
> > multi/Crypt/DES.pm
> > > line 57.
> > > > then terminates. > > > > > > > > Any idea why and/or what I can do to overcome this issue?
> > > > > >
> > > >
> >
Please reduce repro steps (one short script with only Net::SFTP as the only dependency).