You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by bu...@apache.org on 2022/12/30 21:42:51 UTC

[Bug 66405] New: IndexIgnore should not describe its argument as a shell-style wildcard expression

https://bz.apache.org/bugzilla/show_bug.cgi?id=66405

            Bug ID: 66405
           Summary: IndexIgnore should not describe its argument as a
                    shell-style wildcard expression
           Product: Apache httpd-2
           Version: 2.4.54
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
          Assignee: docs@httpd.apache.org
          Reporter: metaed@gmail.com
  Target Milestone: ---

The documentation for the IndexIgnore directive of module mod_autoindex
describes each argument as "a shell-style wildcard expression or full
filename". Describing the argument that way wrongly tells the user that its
filename patterns work like shell filename patterns. They don't.

The documentation should describe the actual syntax and semantics of the
argument. And because its behavior is different from, but confusingly similar
to, shell-style filename patterns, it should also highlight the differences.

    *~

This expression matches the filename '.example~' in httpd, but not in a shell.
A shell requires the '.' at the start of a filename to be matched explicitly,
and has for more than 40 years.

    .[abcde]*

This expression matches the filename '.example~' in a shell, but not in httpd.
The directive does not support bracket expressions. Shell filename patterns
have supported them for more than 40 years.

The directive documentation is silent on what happens when the argument
contains a '/' (a full or partial pathname). There are people in the field
using expressions such as

    */.??*

I have no idea what httpd might do with such an argument. This should be
covered in the documentation.

Here is a draft rewrite that addresses part of this. Because I don't know the
semantics of '/' in the argument, I did not address that.

"The 'IndexIgnore' directive adds to the list of files to hide when listing a
directory. 'File' is a full filename, which can contain the '?' and '*'
wildcard characters. The '?' matches any single character. The '*' matches any
string of characters, even an empty string. When 'File' contains wildcard
characters, all matching filenames are hidden.

"Users familiar with standard Unix filename patterns should carefully note the
difference. The 'IndexIgnore' directive does not recognize bracketed character
classes. And the standard Unix filename pattern requires a '.' at the start of
a filename to be matched by an explicit '.' in the pattern, while the
'IndexIgnore' directive does not."

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


[Bug 66405] IndexIgnore should not describe its argument as a shell-style wildcard expression

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66405

--- Comment #1 from metaed@gmail.com ---
Also, it could be documented that the filename pattern semantics make it
impossible to ignore hidden filenames without also ignoring '..' (Parent
Directory). At best you can ignore hidden filenames three characters or longer
using the filename pattern

    .??*

To get the desired effect in a shell, you would ignore:

    .[!.]*

and

    ..?*

But as discussed in the original bug report there is no support for bracket
expressions.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org