Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scanner bails out on dir not found on FTP server #139

poeml opened this Issue Jun 5, 2015 · 0 comments


None yet
1 participant
Copy link

poeml commented Jun 5, 2015

                                                                                      [          ]

Issue migrated (2015-06-05) from old issue tracker

Title    scanner bails out on dir not found on FTP server
 Priority   bug       Status      resolved
Superseder           Nosy List    dagobert, poeml
Assigned To          Keywords     scanner

msg502 (view) Author: dagobert Date: 2014-02-01.14:05:44

The bails out if a directory is not found on an FTP sever during scanning:

Net::FTP=GLOB(0x77e8a8)<<< 230 Anonymous access granted, restrictions apply
Net::FTP=GLOB(0x77e8a8)>>> TYPE I
Net::FTP=GLOB(0x77e8a8)<<< 200 Type set to I
belnet: connected to, (anonymous,/opt/csw/bin/scanner@mirror-
Net::FTP=GLOB(0x77e8a8)>>> CWD /mirrorsx/opencsw/
Net::FTP=GLOB(0x77e8a8)<<< 550 /mirrorsx/opencsw/: No such file or directory
$VAR1 = '550 failed: ftp-cwd(/mirrorsx/opencsw/): ';
DIE: (=> => /opt/csw/bin/scanner 317 main::ftp_readdir)
Can't use string ("550 failed: ftp-cwd(/mirrorsx/op") as an ARRAY ref while "strict
refs" in use at /opt/csw/bin/scanner line 804.
Completed in 1 seconds

This is due to the regex match of a scalar string made against a ref to a string, this
should be just a regex match against the scaler. This patch fixes the issue:

From 5ca8b992d77a3479f1081432d21f8a96382b41c6 Mon Sep 17 00:00:00 2001
From: Dagobert Michelsen
Date: Sat, 1 Feb 2014 14:56:06 +0100
Subject: [PATCH] Do not take ref on a simple scalar string or it wont match

tools/ | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/ b/tools/
index ab9bcb8..4216721 100755
--- a/tools/
+++ b/tools/
@@ -774,7 +774,7 @@ sub ftp_readdir
return unless defined $ftp;
my $text = ftp_cont($ftp, "$url/$name");

  • if(!ref($text) && $text =~ m/^(\d\d\d)\s/) { # some FTP status code? Not

  • if(!ref($text) && $text =~ m/^(\d\d\d)\s/) { # some FTP status code? Not good.

    Bug: Net::FTP wrongly reports timeouts (421) as code 550: ftp dir: ftp://sunsite.informatik.rwth-


msg512 (view) Author: poeml Date: 2014-02-02.12:34:49

fixed in r8358. Thanks!

         Date           User   Action            Args
                                      status: unread -> resolved
2014-02-02 12:34:49 poeml    set    nosy: + poeml
                                      messages: + msg512
2014-02-01 14:05:44 dagobert create

(end of migrated issue)

@poeml poeml added bug resolved labels Jun 5, 2015

@poeml poeml closed this Jun 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.