Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29198

Modified Files:
        NetAccess.pm ChangeLog 
Log Message:
Quote nonword chars in Source fields when passing them to shell
commands. (thanks for the tip, vasi!)


Index: NetAccess.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/NetAccess.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- NetAccess.pm        2 Jan 2005 15:56:50 -0000       1.36
+++ NetAccess.pm        20 Jan 2005 08:32:07 -0000      1.37
@@ -247,10 +247,10 @@
                if ($dryrun) {
                        print " $url";
                } elsif ($cont) {
-                       $result = &execute("$cont_cmd $url");
+                       $result = &execute("$cont_cmd \Q$url\E");
                        $cont = 0;
                } else {
-                       $result = &execute("$cmd $url");
+                       $result = &execute("$cmd \Q$url\E");
                }
                
                if ($dryrun or ($result or not -f $file)) {
@@ -321,7 +321,7 @@
                        $cmd .= " -P -";
                }
                if ($file ne &filename($url)) {
-                       $cmd .= " -o $file";
+                       $cmd .= " -o \Q$file\E";
                } else {
                        $cmd .= " -O"
                }
@@ -343,7 +343,7 @@
                        $cmd .= " --passive-ftp";
                }
                if ($file ne &filename($url)) {
-                       $cmd .= " -O $file";
+                       $cmd .= " -O \Q$file\E";
                }
                if ($cont) {
                        $cmd .= " -c"
@@ -362,7 +362,7 @@
                        $cmd .= " --verbose";
                }
                if ($file ne &filename($url)) {
-                       $cmd .= " -o $file";
+                       $cmd .= " -o \Q$file\E";
                }
                # Axel always continues downloads, by default
        }

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.812
retrieving revision 1.813
diff -u -d -r1.812 -r1.813
--- ChangeLog   19 Jan 2005 22:34:44 -0000      1.812
+++ ChangeLog   20 Jan 2005 08:32:07 -0000      1.813
@@ -1,3 +1,7 @@
+2005-01-20  Daniel Macks  <[EMAIL PROTECTED]>
+
+       * NetAccess.pm: quotemeta() Source values when used in shell cmd.
+
 2005-01-19  Daniel Macks  <[EMAIL PROTECTED]>
 
        * Services.pm: New do_calls() function processes a list of method



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to