Last Comment Bug 57763 - "send e-mail address as anonymous ftp passwd" doesn't work
: "send e-mail address as anonymous ftp passwd" doesn't work
: testcase
Product: Core
Classification: Components
Component: Networking: FTP (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: mozilla0.9
Assigned To: Doug Turner (:dougt)
: benc
: Patrick McManus [:mcmanus]
Depends on:
Blocks: 62352
  Show dependency treegraph
Reported: 2000-10-23 20:10 PDT by Koike Kazuhiko
Modified: 2001-11-07 01:35 PST (History)
7 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch to implement FE (5.11 KB, patch)
2001-03-02 18:52 PST, Ben Goodger (use ben at mozilla dot org for email)
no flags Details | Diff | Splinter Review
patch; check advanced.mailftp is true as well; otherwise send 'mozilla@' (1.33 KB, patch)
2001-09-07 19:53 PDT, John Morrison
bbaetz: review+
Details | Diff | Splinter Review
patch; version 2; test the bool pref first and be cleaner (1.25 KB, patch)
2001-09-08 21:27 PDT, John Morrison
no flags Details | Diff | Splinter Review

Description Koike Kazuhiko 2000-10-23 20:10:46 PDT
"mozilla@" is always sent as ftp password even if
"send e-mail address as anonymous ftp passwd" is checked in
preferences dialog.

This bug was reported on Japanese bugzilla.
Comment 1 Gagan 2000-10-23 20:18:55 PDT
Comment 2 Asa Dotzler [:asa] 2000-11-05 19:47:34 PST
setting bug status to New.  kazhik, I've updated your bugzilla permissions.  
Please email me if you have any questions.
Comment 3 Gagan 2000-11-29 17:55:55 PST
Hi dougt, welcome to necko :)
Comment 4 Doug Turner (:dougt) 2001-01-12 15:07:16 PST
My question is which email address to I send and where do I get it from? 
Suppose the user does not install mail/news, or the user has multiple email

Ben, do you think that we can change the Advanced section of the preferences
dialog so that it includes a text field which will allow the user to specify an
email address that they would like use in the case of anonymous ftp?  

I would need this field to do some simply testing before saving it off as a pref
(eg. check to see that it is not empty when the checkbox is enabled and to check
that it does include a @ symbol).


Comment 5 Ben Goodger (use ben at mozilla dot org for email) 2001-01-14 14:34:23 PST
dougt, sure, this sounds reasonable. file a bug on me & mark nsbeta1 if it's 
urgent and I'll hook it up shortly. 
Comment 6 Doug Turner (:dougt) 2001-01-15 00:14:19 PST
Ben, use this one.  Assign it back to me so that I can implement the underlying
protocol to use this preference.

The pref name should be

Comment 7 Ben Goodger (use ben at mozilla dot org for email) 2001-03-02 18:52:29 PST
Created attachment 26677 [details] [diff] [review]
patch to implement FE
Comment 8 Ben Goodger (use ben at mozilla dot org for email) 2001-03-02 18:54:15 PST
adding appropriate keywords. 
Comment 9 Blake Ross 2001-03-02 19:24:38 PST
Looks good.  You've got a tab before the <title/>, and I don't see why we can't 
just use .readonly for the textfield
gs.xml#309). r=blake otherwise
Comment 10 Ben Goodger (use ben at mozilla dot org for email) 2001-03-03 00:11:00 PST
nice catches, thanks! Modified in my tree. 

Changing keyword field to just read 'approval' now, cc'ing alec. Alec, do you 
think you could super-review this?
Comment 11 Alec Flett 2001-03-05 11:28:10 PST
we should file a new bug about mailnews setting this pref (not turning it on of
course, I just mean setting the e-mail address) when it creates it's first account.
Comment 12 Sean Richardson 2001-03-06 01:12:08 PST
A concern, for the new bug Alec just asked for: if a user has used the 
functionality provided by this patch to set network.ftp.anonymous_password to 
"nobody@home.never" and then creates a Mail account for "my-primary-email", he or she would be justifiably upset, from a privacy standpoint,
to see network.ftp.anonymous_password changed to the latter address. 
The new code to fill network.ftp.anonymous_password should do nothing if
it already contains an address (or even a junk string)!
Comment 13 Alec Flett 2001-03-06 08:31:34 PST
oh of course! I just meant if the pref wasn't already set
Comment 14 Ben Goodger (use ben at mozilla dot org for email) 2001-03-06 23:50:38 PST
Fix checked in. 
Comment 15 Ben Goodger (use ben at mozilla dot org for email) 2001-03-07 02:18:38 PST
forgot to mark fixed. 
Comment 16 John Morrison 2001-03-07 17:38:16 PST
Actually, this was supposed to go back to dougt for the backend.
Comment 17 John Morrison 2001-03-07 17:38:48 PST
-> dougt
Comment 18 Doug Turner (:dougt) 2001-03-19 11:00:18 PST
Ben - Should I be honoring the "advanced.mailftp" preference too?  Could you
please verify this in your patch??  Could we also rename this string to
something like:  

Comment 19 Doug Turner (:dougt) 2001-03-21 12:34:40 PST
FTP now honor the password field.  However, there is a checkbox above this field
in the Advanced Prefs which is not honor nor does it dim the edit field.  

Ben, what do you want to do about this?  Either remove the checkbox (my code
will still continue to work), or make it dim the edit field, rename the pref
that it sets, and assign it back to me.
Comment 20 Ben Goodger (use ben at mozilla dot org for email) 2001-03-27 18:37:05 PST
ok this is about the point where I kill bugzilla for being so brain-dead stupid. 

patch to fix disabling problem follows in this comment, because bugzilla 
wouldn't attach the patch. 

note that we still need a rule in classic at least to make disabled fields be 
greyed out. this was achieved before by setting the readonly property as well, 
but really disabled should do this too. 

Index: pref-advanced.xul
RCS file: 
retrieving revision 1.46
diff -u -r1.46 pref-advanced.xul
--- pref-advanced.xul	2001/03/07 07:49:00	1.46
+++ pref-advanced.xul	2001/03/28 02:34:22
@@ -44,7 +44,7 @@
       var checked = document.getElementById("advancedMailFTP").checked;
       var field = document.getElementById("advancedMailFTPAddress");
-      field.disabled = field.readonly = !checked;
+      field.disabled = !checked;
Comment 21 Ben Goodger (use ben at mozilla dot org for email) 2001-04-06 05:36:46 PDT
someone can review this within three days or this gets scooted into 1.0. 
Comment 22 Peter ``jag'' Annema 2001-04-08 20:05:34 PDT
Comment 23 Alec Flett 2001-04-10 19:12:30 PDT
Comment 24 Paul Chen 2001-04-11 14:44:02 PDT
nav triage team:

Not a beta stopper, but Ben check this mutha in! Marking nsbeta1-
Comment 25 Ben Goodger (use ben at mozilla dot org for email) 2001-04-17 16:13:30 PDT
boom shaka laka
Comment 26 benc 2001-06-13 21:01:00 PDT
FTP behavior working, but checkbox is ignored, if the field is blank, "mozilla"
is sent, if the field is populated, the contents are always sent. I traced the
ftp session on a system with anonymous FTP.

I've traced this on Win32, and will look at the other plats when this is cleared up.

Was the checkbox/grey text field patch actually checked in?

I'm verifying against Mozilla 0.9, and the feature works, but the UI patch is
not in.

I'd really appreciate it if you guys didn't more bugs over milestones.

If you move the fix into a new bug, and mark the milestone for Mozilla 0.9.1,
that would be great.
Comment 27 Elmar Ludwig 2001-09-07 07:18:26 PDT
I'm seeing this as well (on Linux, build ID 2001090400):

Mozilla is sending the email address set as anonymous FTP passwort
even when the checkbox is not checked in Preferences (verified in
FTP server log).

Is there a separate bug for this issue?
Comment 28 John Morrison 2001-09-07 19:51:50 PDT
Well, actually the UI is doing everything correctly. [I suppose one could 
argue that when the checkbox is unchecked, the textfield should be cleared
but that would force a user who wants to occasionally enable "real email"
for ftp anon. logins to enter their email address everytime, instead of just
toggling the 'advanced.mailftp' pref that is tied to that checkbox).

The real problem is that nsFtpConnectionThread.cpp is only checking whether
'network.ftp.anonymous_password' is not empty, and not checking if 
'advanced.mailftp' is enabled. Both need to be checked. Patch coming up.

dougt, bbaetz: can I get a witness! Amen.
Comment 29 John Morrison 2001-09-07 19:53:08 PDT
Created attachment 48672 [details] [diff] [review]
patch; check advanced.mailftp is true as well; otherwise send 'mozilla@'
Comment 30 John Morrison 2001-09-07 19:55:22 PDT
... and I'll note that sending 'mozilla@' is the correct thing to do when
the checkbox is checked and the textfield is blank. Some ftp servers insist
on receiving at least a plausible email address before allowing anonymous 
login, so need to send that stub name. It's as anonymous as a blank string
(well almost).
Comment 31 Bradley Baetz (:bbaetz) 2001-09-08 10:00:29 PDT
Comment on attachment 48672 [details] [diff] [review]
patch; check advanced.mailftp is true as well; otherwise send 'mozilla@'

"advanced.mailftp"? Yuck.

you don't need rv2, either, do you?

Comment 32 John Morrison 2001-09-08 21:27:48 PDT
Created attachment 48731 [details] [diff] [review]
patch; version 2; test the bool pref first and be cleaner
Comment 33 John Morrison 2001-09-08 21:31:46 PDT
> "advanced.mailftp"? Yuck.

Legacy pref name, I think. Don't see much point in changing it though.

> you don't need rv2, either, do you?

Um, no. Patch take 2. Test the bool pref before even bothering getting the 
string. I also changed 'if (NS_SUCCEEDED(rv) || pPref)' to be an '&&' test
since I don't see why you would go ahead if rv was a failure (although testing
for both seems like overkill).

r=/sr=? dougt?
Comment 34 Doug Turner (:dougt) 2001-09-10 06:39:42 PDT
sr=dougt on patch 2.  John, do you want to check this in?
Comment 35 John Morrison 2001-09-10 14:47:03 PDT

> do you want to check this in?

No can do (don't have cvs access to the main tree). Okay, I should fix that,
but for now can you or bbaetz check this in?
Comment 36 Doug Turner (:dougt) 2001-09-10 15:35:03 PDT
Checking in nsFtpConnectionThread.cpp;
/cvsroot/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp,v  <-- 
new revision: 1.192; previous revision: 1.191
Comment 37 benc 2001-10-21 15:19:26 PDT
Mozilla 0.9.5 - all plats.

Did this not make it into the 0.9.4 trunk? This does not work in Mozilla 0.9.4 
in Mac classic.

Comment 38 John Morrison 2001-10-21 19:12:40 PDT
Hmm. Nope, this didn't go on the 0.9.4 branch. Oh, well. Too late now.
Comment 39 benc 2001-10-22 08:12:55 PDT
RELNOTE NS 6.2/Mozilla 0.9.4:

Configuring the Anonymous FTP password:

"Send this email address as anonymous FTP password" does not work as expected.

1- An email address is not required, any password is acceptable.
2- The checkbox is ignored. If there is anything in the password field, that
password will be used, even if the checkbox is off. 

The default value is "".
Comment 40 John Morrison 2001-10-22 15:00:49 PDT
The default value is 'mozilla@' in the branch builds (like it has been for 7 
years :-).

> 1- An email address is not required, any password is acceptable.

I wouldn't even mention that since that is true independent of the UI (although 
some small number of ftp servers may enforce at least the presence of '@').

The defect in this bug is really just point (2).
Comment 41 Bradley Baetz (:bbaetz) 2001-10-22 15:11:39 PDT
jrgm: (IIRC) insisted on user@host, so we've changed it on the trunk to I don't think that made the branch, though.
Comment 42 John Morrison 2001-10-22 15:30:44 PDT
Yes, the change is not on the branch either, so I was just 
noting that the default password was still 'mozilla@'.
Comment 43 Dawn Endico 2001-11-06 19:40:06 PST
this is fixed. removing from 0.9.6 release notes
Comment 44 benc 2001-11-07 01:35:32 PST

Note You need to log in before you can comment on or make changes to this bug.