Skip to content

Wildcard grammar does not allow masks like "*ar" #254

@jwodder

Description

@jwodder

The ABNF for wildcard expressions currently requires that all occurrences of * or ? be preceded by a non-backslash character; as a result, the grammar disallows masks that begin with a wildcard that is not followed by another wildcard, such as "*ar" or "?oo". I suspect this is not the intention, and I doubt that many servers implement wildcards as written. A better grammar would be something like:

mask        =  *( nowildnoesc / wildone / wildmany / esc wildone / esc wildmany / esc esc )
wildone     =  %x3F
wildmany    =  %x2A
nowildnoesc =  %x01-29 / %x2B-3E / %x40-%5B / %5D-FF
                 ; any octet except NUL, "*", "?", "\" 
noesc       =  %x01-5B / %x5D-FF
                 ; any octet except NUL and "\"
esc         =  %5C

This also fixes the problem that an escape character can't be escaped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions