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

Bug#296493: apache2ctl -t should warn about non-initial #



On 4 Aug 2013, at 6:50 AM, Jean-Michel Vourgère wrote:

> Kevin Bullock wrote:
>> (...) I therefore
>> suggest that 'apache2ctl -t' warn the user about the mid-line comment which
>> could be an error. (...)
> 
> Stefan Fritsch wrote:
>> The documentation states: "Comments may not be included on a line 
>> after a configuration directive. "
>> 
>> '#' signs are considered normal characters inside a directive, so a 
>> warning would not be appropriate either. But I agree that 
>> DirectoryIndex is not behaving correctly here.
> 
> It's actually used in default configuration:
> $ grep -e '^[[:space:]]*[^#[:space:]].*#' /etc/apache2/*/*
> /etc/apache2/mods-available/autoindex.conf:	IndexIgnore .??* *~ *# RCS CVS *,v *,t
> /etc/apache2/mods-enabled/autoindex.conf:	IndexIgnore .??* *~ *# RCS CVS *,v *,t
> 
> 
> Would checking only in DirectoryIndex for a local-url starting by # make sense?
> Should that bug be tagged wontfix? Or retitled as suggested?
> The original request doesn't make much sense, as it would always generate false
> positives.

(Wow, I hadn't thought about this bug in... about eight years.)

It would seem that Apache is treating the #index.php as a partial URL, that is a bare page fragment, and thus re-expanding the URL internally to itself... and thus hitting the redirect limit.

Does a bare fragment ever make sense as a DirectoryIndex target? If not, then mod_dir should be squawking about this at the start, and 'apache2ctl -t' should warn about it (just in DirectoryIndex directives).

I haven't checked to see if the bug is still present in the 2.4 series.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock


Reply to: