PathAllowFilter

Name

PathAllowFilter -- Only allow new files which match a specified pattern

Synopsis

PathAllowFilter [ PathAllowFilter regular-expression]

Default

None

Context

server config, <VirtualHost>, <Anonymous>, <Global>

Module

mod_core

Compatibility

1.1.7 and later

Description

PathAllowFilter allows the configuration of a regular expression that must be matched for all newly uploaded (stored) files. The regular expression is applied against the entire pathname specified by the client, so care must be taken when creating a proper regex. Paths that fail the regex match result in a "Forbidden filename" error being returned to the client. If the regular-expression argument contains whitespace, it must be enclosed in quotes.

See also

PathDenyFilter

Examples

# Only allow a-z 0-9 . - _ in file names,
PathAllowFilter ^[a-z0-9._-]+$

# as above but with upper case characters as well
PathAllowFilter ^[A-Za-z0-9._-]+$

Рейтинг@Mail.ru