Bug 42665 - spurious attempt to open ".../file.html/.htaccess"
spurious attempt to open ".../file.html/.htaccess"
Status: NEW
Product: Apache httpd-2
Classification: Unclassified
Component: Core
2.2.4
All All
: P3 normal (vote)
: ---
Assigned To: Apache HTTPD Bugs Mailing List
: PatchAvailable
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-06-14 12:46 UTC by Allen
Modified: 2013-07-18 05:28 UTC (History)
0 users



Attachments
"final" patch (1021 bytes, patch)
2007-06-14 12:48 UTC, Allen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Allen 2007-06-14 12:48:07 UTC
Created attachment 20351 [details]
"final" patch
Comment 2 William A. Rowe Jr. 2007-07-21 01:34:06 UTC
Your idea is good; however your patch has two flaws...

if r->finfo.filetype is neither APR_DIR nor APR_REG, then what?  Whoops.

also I believe your change to validating the symlink status is not a valid
change.  Please explain since that has little to do with the proposed problem
and solution.
Comment 3 Allen 2007-07-21 02:31:38 UTC
> if r->finfo.filetype is neither APR_DIR nor APR_REG, then what?  Whoops.

The patch corrects an optimization.  In other words, the code is supposed to
work correctly even without the optimization--the entire optimization could be
removed and the code should still function correctly.  The patch corrects the
optimization so that it handles and cases r->finfo.filetype == APR_DIR and
r->finfo.filetype == APR_REG.  If r->finfo.filetype is neither APR_DIR nor
APR_REG, then the optimization simply falls through and executes the code below,
which again is intended to correctly handle all cases.  So the answer to your
question is: it does whatever it would do if the optimization did not exists.

> also I believe your change to validating the symlink status is not a valid
> change.  Please explain since that has little to do with the proposed problem
> and solution.

I don't understand what those two sentences say.  Please elaborate.