Last Comment Bug 271383 - Message body not displayed on HTTP 401 status response
: Message body not displayed on HTTP 401 status response
Status: NEW
[necko-would-take]
: useless-UI
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: x86 Linux
: -- normal with 5 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-23 06:43 PST by Richard Padley
Modified: 2016-01-22 14:27 PST (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Richard Padley 2004-11-23 06:43:27 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5

When a server returns HTTP status code 401 Authorisation Required, mozilla does
not display the message body sent by the server. This effectively severly limits
the utility of standard HTTP authentication.

In order to provide a user-friendly application, it must be possible to display
a 'friendly' page indicating that a resource is not available to the user.
Currently the only way for the user to see this page is in reponse to pressing
cancel in response to the authentication popup dialog. This is user-hostile
rather than user friendly.

A simple workaround would be to 'embed' the popup authentication dialog into the
top of the displayed 401 response. This would also allow easy use of the browser
back button - a double win.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Richard Padley 2004-12-07 02:02:55 PST
HTTP application developers need to offer high quality user interfaces to users
of their applications. One very common pattern is the availability of a
'password reminder' function. This should be available within the same user
interface screen as the username and password entry prompt.

Because mozilla does not display the message-body of a 401 response unless the
user presses the 'cancel' button, developers are not able to offer a sane or
useable interface to a password reminder function. Is is simply not acceptable
to expect a user to know they must press 'cancel' in order to reach this function.

This fault means virtually all web applications are now developed using non
standard cookie based authentication schemes.

This obvious browser misfeature limits the use of standard HTTP authentication.
The HTTP standard itsself is not the problem here; its the UI generated by the
user agent which is the problem.
Comment 2 Gervase Markham [:gerv] 2005-09-27 02:09:47 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Comment 3 Dominic Mitchell 2005-09-30 03:53:23 PDT
Even if you displayed the 401 page underneath the dialog box, it would still do
something useful.  It would indicate to the user that hitting the close dialog
box might get them something useful.
Comment 4 Hixie (not reading bugmail) 2005-09-30 09:47:10 PDT
Confirming to keep on adar. I agree that we need to make HTTP auth better; is
this the way to do it?
Comment 5 Richard Padley 2005-10-01 03:03:44 PDT
This bug exposes one of the issues surrounding the deficiencies of the HTTP authentication mechanism 
in mozilla. There is a decent TR from the W3C about extending HTML forms to add elements to handle 
authentication at http://www.w3.org/TR/1999/NOTE-authentform-19990203

The important points are the user-hostility of the popup authentication dialog, and the lack of the 
ability to supply a useful response in a 401 page. This severly limits the utility of standard 
authentication for most applications. The workaround I suggested would be a quick and dirty way 
towards something better.
Comment 6 Darin Fisher 2005-10-03 15:14:36 PDT
Hmm... there has been talk about making the HTTP authentication prompt be
asynchronous, so that it could be implemented using an info bar or some other
non-modal prompt.  I'm not sure how I feel about morphing the HTTP auth prompt
into a form in the content area of the browser.  It seems like sites can already
achieve that UI by simply returning 200 w/ a HTML form.  I understand that doing
so would not allow sites to leverage HTTP-level authentication, but that doesn't
seem to have been much of a pain-point for e-commerce.
Comment 7 Richard Padley 2005-10-04 02:00:58 PDT
I agree that a non-modal interface would be far better than the current
solution. And you are correct that most sites return a HTML form with a 404 (or
even 200) status. This clearly shows that the UI provided for standard
authentication is too borken for normal use.

Any my workaround suggestion is just that - there are probably far better ways
to engineer this - that should not detract from the main issues here, though,
which is that there is no way for the user to see the content of a 401 response
unless they press the 'cancel' button.

To quote RFC 2616:

>If the 401 response contains the same challenge as the
>prior response, and the user agent has already attempted
>authentication at least once, then the user SHOULD be presented the
>entity that was given in the response, since that entity might
>include relevant diagnostic information.
Comment 8 Darin Fisher 2006-06-21 16:15:42 PDT
-> default owner
Comment 9 Mark Nottingham 2006-10-16 22:32:54 PDT
When I last checked, all major browsers *do* display the 401 page *if* they don't recognise the authentication scheme presented. This always struck me as an interesting hook to layer in a new, form-based authenticated scheme.

That may be a more realistic way forward, considering that most 401 pages out there today aren't suitable for presenting to users, and IIRC most servers don't provide a way to change the content of the 401 based on whether a bad credential was presented vs. no credential (something critical to the "friendly log in" approach.
Comment 10 Robert Sayre 2006-10-16 23:25:12 PDT
(In reply to comment #9)
> When I last checked, all major browsers *do* display the 401 page *if* they
> don't recognise the authentication scheme presented. This always struck me as
> an interesting hook to layer in a new, form-based authenticated scheme.

Good point, and it's not as though the existing schemes are worth saving anyway.

I opened bug 356853 for OpenID-based challenge-response and bug 356855 for one based on SRP.

Comment 11 Richard Padley 2006-10-17 01:33:48 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > When I last checked, all major browsers *do* display the 401 page *if* they
> > don't recognise the authentication scheme presented. This always struck me as
> > an interesting hook to layer in a new, form-based authenticated scheme.
> 
> Good point, and it's not as though the existing schemes are worth saving
> anyway.
> 
> I opened bug 356853 for OpenID-based challenge-response and bug 356855 for one
> based on SRP.
> 


Hmm, this could be an interesting way forward ... I await any news with interest.
Comment 12 Asbjørn Ulsberg 2006-10-30 01:30:23 PST
I also find this bug interesting and a solution to it even more so. I'm not sure the current web architecture and standards allow for the needed extensibility in HTML Forms/HTTP Authentication consolidation, but being able to authenticate a user with HTTP Authentication through HTML forms would be a very good way to standardize authentication across all web sites, so user agents that speak something else than HTML (e.g. Atom through APP) also can authenticate on sites that have HTML Forms logins.
Comment 13 Julian Reschke 2007-11-10 05:11:33 PST
I have added a related issue in HTML WG's issue tracker: <http://www.w3.org/html/wg/tracker/issues/13>

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