int has_digit = 0;
const char *p;
+ /* Given the bug that inspired this test, this may seem like a hasty
+ * kludge. It isn't: Wildcard characters should be matched from the
+ * start, as when the username is the "interesting" part of the ban.
+ * Likewise, we cannot simply reject masks interpreted as */0.
+ */
+ if (mask[0] == '.' || mask[0] == '/')
+ return 0;
for (p = mask; *p; ++p)
if (*p != '*' && *p != '?' && *p != '.' && *p != '/')
{