RE: [users@httpd] htaccess AuthType Basic: some files get served without a password challenge!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: news [mailto:news@xxxxxxxxxxxxx] On Behalf Of Peter
> Sent: Mittwoch, 1. Februar 2006 11:57
> To: users@xxxxxxxxxxxxxxxx
> Subject: [users@httpd] htaccess AuthType Basic: some files 
> get served without a password challenge!
> 
> # for basic
> 
> deny from all
> AuthType Basic 
> AuthUserFile /home/content/sec/pwfile
> AuthGroupFile /dev/null
> AuthName "Restricted Area"
> 
> This is my htaccess file and when a user accesses this dir, a username
> password challenge comes up and works fine. HOWEVER certain 
> file types are
> served right away without a password challenge! Others are challenged.
> 
> I use a web hosting service, so I don't have access to their 
> conf files. I
> can only manage my htaccess files.
> 
> If a user knows a filename and tries to access it directly sometimes
> he/she can.
> 
> For example:
> 
> http://mysecure.dir/file.xls
> will be served immediately with no password challenge.

Are the files really in your secure dir? If there is some rewrite rule that allows the server access to files bypassing the .htaccess file then this might happen.

Also, are you sure it's not a caching issue? IE+Excel is notorious for ferociously caching every XLS file it sees so that even a shift-reload does not really reload the file. Thus if you access the file once (while testing) and then switch on password-checking, the file will still appear to load because it will use the cached version. The only sure fix is to kill and restart the browser.

BTW, it doesn't help that you obscure the URL. It's not clear if "mysecure.dir" represents a domain or a domain+path, I assume the latter (eg, http://www.wibble.com/secure-dir/file.xls). If you would even post the *real* URL, we could try some requests and see what comes back.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> Same with
> http://mysecure.dir/file.ico
> of even a file with no extension
> http://mysecure.dir/file
> and
> http://mysecure.dir/file.zip
> will also be served without a challenge.
> But
> http://mysecure.dir/file.gif
> always is challenged as well as
> http://mysecure.dir/file.html
> 
> Of course, if the files don't exist mostly I get a 404 error 
> instead of a
> password challenge and sometimes just a blank screen.
> 
> My question is WHY? My hosting company uses Apache 1.3.31 and 
> of course,
> they're of little help.
> 
> I tried playing with the Limit and file directives, but they 
> seem not to
> work. I have two questions:
> 1) I searched the bugs and found some similar issues. Is this behavior
> normal? Or, am I doing something wrong?
> 2) Is there a way I can protect this dir from direct file 
> access, or do I
> need to rename everything to .gif in order to protect it?
> 
> Thanks in advance.
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
> 
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le présent e-mail est un message privé et personnel, sans rapport avec l'activité boursière du Groupe SWX.
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux