[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apt: Uses bogus ftp password on ftp:// urls



>>>>> "Florian" == Florian Hinzmann <f.hinzmann@public.uni-hamburg.de> writes:

    Florian> Package: apt Version: 0.0.17-1

    Florian> I have problems using an ftp:// url with apt.

*snip* I've actually just fixed this problem last night in CVS. 0.0.18
will correct this problem.

The booboo turns out to be in yet another internal Net:: Perl module;
it's not really our fault, so here's a kludge to patch it.

Ben

--- ftp.orig	Fri Jun 26 11:48:20 1998
+++ ftp	Fri Jun 26 11:48:23 1998
@@ -31,7 +31,7 @@
   if ($@) {print "E Need package libwww-perl\n"; exit (0);}
 }
 
-my $version = ' $Id: ftp,v 1.11 1998/06/16 09:47:24 srivasta Exp $ ';
+my $version = ' $Id: ftp,v 1.12 1998/06/26 07:27:33 che Exp $ ';
 
 =head1 NAME
 
@@ -269,6 +269,17 @@
     my $UseOldConn = 0;
 
     $url = new URI::URL "$uri";
+
+				# Kludge to fix URI::URL improper
+				# password generation
+
+    if ($url->user eq 'anonymous' or $url->user eq 'ftp') {
+				# Are we logging in anonymously?
+      if ($url->password =~ /^(\w+\@)\w+$/) {
+				# Do we have an improper password?
+	$url->password($1);	# Fix it, strip the hostname
+      }
+    }
 
     print "F ", $url->as_string, "\n"; # Tell apt we are looking at this uri now
     
     


-- 
Brought to you by the letters X and S and the number 6.
"What's your order? I can SuperSize that." -- TMBG
Debian GNU/Linux -- where do you want to go tomorrow? http://www.debian.org/
I'm on FurryMUCK as Che, and EFNet and YiffNet IRC as Che_Fox.


--  
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: