Skip Menu |
 

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

Report information
The Basics
Id: 13434
Status: resolved
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: cpan [...] StageRigger.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.27
Fixed in: (no value)



Subject: Use of uninitialized value in concatenation (.) or string at Net/SSH/Perl.pm line 107.
Download (untitled) / with headers
text/plain 671b
When using Net::SSH::Perl (via Net::SFTP), warnings, and strict in a CGI script running under Apache on RHEL... Net::SSH::Perl tries to use /.ssh/config instead of the Apache user's config due to $ENV{'HOME'} not being set. Line 107: my $user_config = delete $arg{user_config} || "$ENV{HOME}/.ssh/config"; A safer method would be to use getpw* (possibly if $ENV{HOME} is empty) Examples: use English; my ($name,$passwd,$uid,$gid, $quota,$comment,$gcos,$dir,$shell,$expire) = getpwuid($UID); # $> if not using 'use English;' my $home = (getpwuid($>))[7]; Workaround: Hard code $ENV{'HOME'} or setting $ssh_args{'user_config'} = '/some/path' in CGI scripts.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.