Closed Bug 287716 Opened 19 years ago Closed 19 years ago

HTTP Authorization with password file does not work

Categories

(Core :: Networking: HTTP, defect)

x86
All
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ravenbugzilla, Assigned: darin.moz)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050324
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050324

I have discovered that if you try to use HTTP Authorization on a subdirectory
(actually a subdomain: addon domain), Mozilla/FF is unable to resolve the host.
Assume that the domain name is mozillazine.com and the addon/sub domain is
addon.mozillazine.com. addon resides in a subfolder beneath public_html and
public_html points to mozillazine.com. This works in other browsers as it
should, but not in Mozilla/FF.

Example .htaccess code
Code:
   AuthName "Restricted Area"
   AuthType Basic
   AuthUserFile '/home/johndoe/public_html/addon/application_folder/.passfile'

The .passfile resides in the same place as .htaccess. .htaccess gets called and
when you enter the correct user/pass Mozilla/FF pops up an alert that says
"addon.mozillazine.com could not be found. Please check the name and try again".

Reproducible: Always

Steps to Reproduce:
1.Create a .htaccess file as described in previous step
2.Create a .passfile with a line in the format of username:encoded_user_pass
where encoded_user_pass is encoded with the mcrypt function (I use PHP)
3.Place .htaccess and .passfile in a folder with this hierarchy:
-- public_html
---- addon_folder
------ application_folder
-------- .htaccess
-------- .passfile

4. Point your browser to yourdomain.com/application_folder
5. http auth popup appears
6. The userid/pass is confirmed and Mozilla pops up an alert window that says
"addon.domain.com could not be found. Please check the name and try again"

Actual Results:  
Mozilla pops up an alert window that says "addon.domain.com could not be found.
Please check the name and try again"

addon is an addon/subdomain of the main site/domain

Expected Results:  
Access should have been granted and the application should have been started in
browser.

This is a Frame application but I don't know that that matters.
(In reply to comment #0)

> Actual Results:  
> Mozilla pops up an alert window that says "addon.domain.com could not be found.
> Please check the name and try again"
> 
> addon is an addon/subdomain of the main site/domain

This error seems to indicate that the browser is unable to lookup the host
addon.domain.com.
Where is it defined ? In DNS, /etc/hosts ... ?

Also, how do you rewrite the subdomain into the subdirectory ? Using mod_rewrite
? What are the rewrite rules ?
> Actual Results:  
> Mozilla pops up an alert window that says "addon.domain.com could not be found.
> Please check the name and try again"
> 
> addon is an addon/subdomain of the main site/domain

This error seems to indicate that the browser is unable to lookup the host
addon.domain.com.
Where is it defined ? In DNS, /etc/hosts ... ?

Also, how do you rewrite the subdomain into the subdirectory ? Using mod_rewrite
? What are the rewrite rules ?

No rewrite rules.  The addon host is defined in Apache httpd.conf file as a
normal vhost entry.  FF recognizes the DNS lookup for the site w/o any problem.
 It just can't find it when using the password lookup file.
can you be a little clearer about the steps here?  This is what it looks like to me:

Task A
1) Go to http://www.example.com/test/
2) Get prompted for a login
3) Login
4) http://www.example.com/test/ redirects to http://application.example.com/
5) Browser displays error message

Task B
1) Go to http://application.example.com/
2) Browser works fine

Assuming this is correct, it looks like a problem with the redirection.
Over to HTTP
Assignee: general → darin
Component: General → Networking: HTTP
Product: Mozilla Application Suite → Core
QA Contact: general → networking.http
Version: unspecified → 1.0 Branch
Version: 1.0 Branch → Trunk
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/
> Mozilla pops up an alert window that says "addon.domain.com could not be found.
> Please check the name and try again"

Mozilla only generates that error dialog (or error page) if it fails to resolve
a hostname into an IP address.  I don't see how this error could have anything
to do with the Apache HTTP authentication configuration.
No response from reporter since April, and this doesn't look like a Mozilla
problem. ->WFM. ravenbugzilla, please reopen if you can still reproduce the
problem and provide us with more info.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.