Closed Bug 196286 Opened 21 years ago Closed 21 years ago

ftp URLs w/ "anonymous" user should automatically use anonymous password.

Categories

(Core Graveyard :: Networking: FTP, defect)

x86
Windows 98
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: benc, Assigned: dougt)

References

()

Details

(Whiteboard: checklinux checkwin)

Attachments

(1 file)

STEPS: click on URL
EXPECTED:
Should the browser recognize the user is "anonymous" and automatically use the
built-in anonymous password?
Or maybe pre-populate the password field?

It seems logical.

OBSERVED:
User+password auth dialog (user is pre-filled as anonymous). 

NOTE:
I don't know if there is a difference between:

ftp://ftp.mozilla.org
ftp://anonymous@ftp.mozilla.org

The RFC's don't seem to say. The RFC's also don't seem to suggest clearly what
the author of the URL should expect, this could be considered a way of forcing
the user to manually enter a password.
Testing with IE, both "anonymous" and "ftp" logins are allowed to proceed
without a password prompt.

On second thought, shouldn't the URL ftp://anonymous@ftp.mozilla.org be
interpreted as
server: ftp.mozilla.org
user: anonymous
password: (blank)
as opposed to auto-filling in a password (or prompting).  Disclaimer, I'm not
looking at the RFC right now.
well, we have an automatic anonymous password, so maybe filling it in and
auto-hilighting would be the best choice.

Long ago, bug 17661 requested mailnewws integration w/ the anonymous password,
where you might get to use an address configured for a mailbox or newsserver.

Attached patch patchSplinter Review
Attachment #119514 - Flags: superreview?(darin)
Attachment #119514 - Flags: review+
Comment on attachment 119514 [details] [diff] [review]
patch

>Index: nsFtpConnectionThread.cpp

>+    if (!uname.IsEmpty() && !uname.Equals(NS_LITERAL_CSTRING("anonymous"))) {
>+        mAnonymous = PR_FALSE;
>+        mUsername = NS_ConvertUTF8toUCS2(NS_UnescapeURL(uname));

pretty busted to treat unescaped username as UTF-8 i would imagine,
but that's another bug :-/

wu-ftpd seems to treat AnOnYmOuS as guest login, so shouldn't the
comparison above be case-insensitive?
Attachment #119514 - Flags: superreview?(darin) → superreview-
on many systems passwords are case-sensitive.  that means you could have a vaild
user "aNoNyMoUs" which is different from the anonymous account.  Therefore we
must use a case sensitive comparison.

I am not going to open the can of worms wrt unescaped usernames as UTF-8 in this
bug. :-)
also see rfc1635.
Comment on attachment 119514 [details] [diff] [review]
patch

fair enough... thx for the explanation.  sr=me
Attachment #119514 - Flags: superreview- → superreview+
on many systems *usernames* are case-sensitive -- pw's are almost always case
sensitive now adays. 
Checking in nsFtpConnectionThread.cpp;
/cvsroot/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp,v  <-- 
nsFtpConnectionThread.cpp
new revision: 1.256; previous revision: 1.255
done

fixed.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
V/fixed:
Mozilla 1.6, Mac OS X
The URL's w/ "anonymous" as the user now authenticate w/o a prompt, with or w/o
a password in the URL.
Status: RESOLVED → VERIFIED
Whiteboard: checklinux checkwin
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: