]> sjero.net Git - wget/commitdiff
[svn] Hide password from URL when non-verbose, too.
authorhniksic <devnull@localhost>
Thu, 2 Nov 2000 01:41:20 +0000 (17:41 -0800)
committerhniksic <devnull@localhost>
Thu, 2 Nov 2000 01:41:20 +0000 (17:41 -0800)
src/ChangeLog
src/ftp.c

index c9e45a49cb35ac2aaf0058eaf880eee35e65e867..9e0706cd29dcba065d0baccb10c55cbef8f46b22 100644 (file)
@@ -1,3 +1,9 @@
+2000-11-02  Hrvoje Niksic  <hniksic@arsdigita.com>
+
+       * ftp.c (ftp_loop_internal): Hide the password from the URL when
+       printing non-verbose.  Problem spotted by Dariusz Mlynarczyk
+       <darekm@bydg.lomac.com.pl>.
+
 2000-11-02  Junio Hamano  <junio@twinsun.com>
 
        * ftp-basic.c (ftp_login): Make comparison case-insensitive.
index d2399311e6a56a2f0863b40668aa7b4109ad8bda..3a19d019b6e4c33947e63bbb8ff19aa2ade3af1b 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -996,8 +996,16 @@ ftp_loop_internal (struct urlinfo *u, struct fileinfo *f, ccon *con)
        }
       logprintf (LOG_VERBOSE, _("%s (%s) - `%s' saved [%ld]\n\n"),
                 tms, tmrate, locf, len);
-      logprintf (LOG_NONVERBOSE, "%s URL: %s [%ld] -> \"%s\" [%d]\n",
-                tms, u->url, len, locf, count);
+      if (!opt.verbose && !opt.quiet)
+       {
+         /* Need to hide the password from the URL.  The `if' is here
+             so that we don't do the needless allocation every
+             time. */
+         char *hurl = str_url (u->proxy ? u->proxy : u, 1);
+         logprintf (LOG_NONVERBOSE, "%s URL: %s [%ld] -> \"%s\" [%d]\n",
+                    tms, hurl, len, locf, count);
+         free (hurl);
+       }
 
       if ((con->cmd & DO_LIST))
        /* This is a directory listing file. */