Closed
Bug 124480
Opened 23 years ago
Closed 23 years ago
When opening ftp connection to remote URL, missing username should prompt for username and password (nsIAuthPrompt::promptUsernameAndPassword)
Categories
(Core Graveyard :: Networking: FTP, defect)
Core Graveyard
Networking: FTP
Tracking
(Not tracked)
VERIFIED
INVALID
mozilla1.1alpha
People
(Reporter: cmanske, Assigned: Brade)
References
Details
(Whiteboard: verify DUPs when this bug is fixed.)
Attachments
(2 files)
During pulishing, we build an nsURI object and fill in username and password.
We save the document using nsIWebBrowserPersist interface.
When the username is empty, we get a "Login incorrect" message, even though
we have implemented the promptUsernameAndPassword method implemented for both
nsIPrompt and nsIAuthPrompt.
Note that if username is supplied but password is empty, we do get the call to
the nsIAuthPrompt::promptPassword dialog.
Kathy: please reassign to the appropriate network engineer.
Assignee | ||
Updated•23 years ago
|
Comment 1•23 years ago
|
||
i'm not completely following the problem here. can you provide sample URLs with
expected/actual browser behavior? thx!
Reporter | ||
Comment 2•23 years ago
|
||
Darin: We are building an nsIURI object for publishing via
nsIWebBrowserPersist::SaveDocument.
If we supply ftp://user@ftp.foo.com as the URI spec, our
nsIWebProgressListener::promptPassword() method is called and we can get
the password.
If we supply ftp://ftp.foo.com as the URI spec, it seems our
nsIWebProgressListener::promptUsernamePassword() method should be called,
but it isn't. Instead, we get a "Login incorrect" alert dailog.
Using http push to publish doesn't prompt for anything, including missing
username and/or password or any error conditions!
But it does publish correctly if the URI is http://user:pass@www.foo.com
and the "user" and "pass" is correct.
Comment 3•23 years ago
|
||
cc'ing bbaetz for FTP problem.
cmanske: can you generate a HTTP log for the HTTP case? set these variables
before running mozilla:
set NSPR_LOG_MODULES=nsHttp:5
set NSPR_LOG_FILE=c:\http.log
if you can attach the generated log file that would help. thx!
Reporter | ||
Comment 4•23 years ago
|
||
In this case, there was no prompt for the password.
Transfer of file failed.
Reporter | ||
Comment 5•23 years ago
|
||
In this case, neither the username nor the password were supplied,
but it *did* trigger the promptUsernamePassword dialog, and it
succeeded in transfering the file!
Comment 6•23 years ago
|
||
The ftp side of this is a dupe of bug 124561, also see bug 114118.
Reporter | ||
Comment 7•23 years ago
|
||
*** Bug 127094 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•23 years ago
|
Target Milestone: --- → mozilla1.0
Reporter | ||
Comment 9•23 years ago
|
||
Note: HTTP transfer is now working. Only FTP seems to have a problem.
Should we close this and concentrate on bug 124561? For now, I've made that one
a blocker for this bug.
Comment 10•23 years ago
|
||
lets wait to close this out after the blocker is fixed..
Comment 11•23 years ago
|
||
nominating EDITORBASE...already marked nsbeta1+
Whiteboard: verify DUPs when this bug is fixed. → EDITORBASE verify DUPs when this bug is fixed.
Whiteboard: EDITORBASE verify DUPs when this bug is fixed. → verify DUPs when this bug is fixed.
Assignee | ||
Updated•23 years ago
|
Target Milestone: mozilla1.0 → mozilla1.1alpha
Comment 12•23 years ago
|
||
Is this change going to visibly affect non-composer behavior?
If not, then I'd like to have composer qa take this from me.
Either that, or un-duplicate Bug 127094, and make it a duplicate that Composer
QA can verify.
Assignee | ||
Comment 13•23 years ago
|
||
This bug is not a "Composer" bug. The browser should also have this behavior
(if Composer has it).
Comment 14•23 years ago
|
||
umm.. but isn't your solution entirely specific to publishing?
Assignee | ||
Comment 15•23 years ago
|
||
This particular bug does not have a solution; at least not yet.
Composer is working around this issue in a different way.
My understanding of this bug is that if anonymous login fails for some
reason(s), we should prompt the user to authenticate.
If anyone has some suggestions on which particular response codes should cause
the authprompt to come up instead of an alert (or in addition?) that would help
get this bug resolved sooner. Otherwise, it'll sit on my list with a very low
priority.
Reporter | ||
Comment 16•23 years ago
|
||
For Composer publishing, I have reduced this problem by detecting when username or
password is missing and putting up the promptUserNameAndPassword dialog ourselves.
This will help a lot, but still doesn't fix the case when there's an error in
either the username or password; in those cases, it will still fail instead of
reprompting to let user corrrect them.
This is only a problem when using FTP. HTTP does lauch proper prompt dialogs.
Comment 17•23 years ago
|
||
Such an error code does not exist; thats the problem here.
Comment 18•23 years ago
|
||
brade: my point is that this either works (http) or existing bugs cover the
failures (in ftp). I think we are in general agreement that the ftp module is
currently too heavily "browser-only" oriented.
The only reason this bug would exist and be treated separately is to meet the
needs of composer. And in that light, the best person to QA your bug would be a
composer QA.
Assignee | ||
Comment 19•23 years ago
|
||
BenC--I am unaware of which ftp bug already covers this issue. Please duplicate
appropriately if you know of such a bug.
clarify summary and component to be ftp-specific
Component: Networking → Networking: FTP
Summary: When opening connection to remote URL, missing username should prompt for username and password (nsIAuthPrompt::promptUsernameAndPassword) → When opening ftp connection to remote URL, missing username should prompt for username and password (nsIAuthPrompt::promptUsernameAndPassword)
Reporter | ||
Comment 20•23 years ago
|
||
It has now become apparent that Composer is totally screwed by the FTP behavior
of assuming anonymous login if username+password is missing or fails.
We simply cannot edit FTP urls directly with this problem.
In the Publish dialog (Settings Panel) or Publish Settings dialog, the user can
supply a HTTP address that is the alias for the FTP address. If that is not
supplied, we get "login failed" when publishing files (see bug 133823)
This is because after publishing, we change the URL of the page to the ftp
address, but without the username+password, and BOTH are needed to successfully
load the page. We could insert the "username:password@" into the document URI,
but I think that is very evil. You NEVER want the password to show in plain text,
of course, like in the window title and many other places that access the
document's location.href. So after publishing like this, further attempts to
save changes will result in constant "login falied" alerts.
Comment 21•23 years ago
|
||
Well... I'd consider publishing to an ftp-only password protected site to be an
extreme edge case.
Can't you just require an http alias? I'd imagine that that is what 95% of
people want, and probably 99.9% of people who check the option to use abolute
urls would expect that. Or am I missing a use case?
Reporter | ||
Comment 22•23 years ago
|
||
I agree that most users should be publishing to sites that have an HTTP address
for their pages, but are using FTP with username + password. I am doing my best
to make that the encouraged behavior.
But I'm not sure what you mean by "check the option to use ab[s]olute urls"
What option?
Comment 23•23 years ago
|
||
last time I looked, there was an option to make <img> urls relative. If you
don't have that, then its absolute, and putting a link to the ftp site isn't
what is wanted, anyway.
Comment 24•23 years ago
|
||
brade: this behavior was what I was essentially talking about in bug 124561.
bbaetz: The ftp publishing you are talking about is hardly an edge case, it's
one of the best features of composer. In fact, for a fair number of people I
know, the lack of a working publish button is what keeps us using Comm 4.
Assuming this behavior is desirable, how can we structure the code to do what
composer needs? Is it possible that what is needed is some nasty url-hiding
magic (that is done for wyciwyg:) that has the literal ftp URL and then a
sanitized ftp URL for user display? (has a feeling this won't work b/c of links
in the published document).
(not blaming the composer people here, argued with at least one PM about not
having this for the 6.0 releases, I really want this to work!)
Reporter | ||
Comment 25•23 years ago
|
||
I actually discovered something important that fixes the "Login incorrect"
harassment discussed in bug 133823. Check out that bug later for fixes.
Assignee | ||
Comment 26•23 years ago
|
||
Looking at the code, I think I see what the problem here is. In S_user(), we
have "if (mAnonymous) ... append 'anonymous' to the command else if the username
is empty, prompt for username and password" mAnonymous is initialized to true
and set to false based on a username existing in the uri. I think the code
around the PromptUsernameAndPassword call is only called in the edge case that
anonymous login fails.
I'm not sure if we should address this or not since sometimes in the browser, we
just want to be "anonymous" and not login. For publishing we do want the user
to provide a username or be prompted for it in most cases.
I vote for invalid, wontfix or Future.
Other opinions?
Status: NEW → ASSIGNED
Assignee | ||
Comment 27•23 years ago
|
||
marking this as invalid per my argument in earlier comment
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → INVALID
Comment 28•23 years ago
|
||
VERIFIED:
I ultimately don't understand how this bug ended, so I'm verifying it.
In the future, please don't morph bugs, create one per component...
In the case of publishing, basically problems in every protocol handler should
be treated separately (ftp, http, https), even if they are appearing in
parallel. If there is a root cause, file a bug there, and mark them as
dependent. That's the best way to get clear test results when you fix and want
to ship.
I know some people are slack about this, but for my components, I'm going to be
more pushy about this because the older system just didn't work.
Status: RESOLVED → VERIFIED
Updated•1 year ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•