--- bash-4.4/pathexp.c.orig 2025-05-28 21:02:24.891105641 -0400 +++ bash-4.4/pathexp.c 2025-05-29 08:19:14.158183747 -0400 @@ -58,7 +58,10 @@ /* Control enabling special handling of `**' */ int glob_star = 0; -/* Return nonzero if STRING has any unquoted special globbing chars in it. */ +/* Return nonzero if STRING has any unquoted special globbing chars in it. + This is supposed to be called when pathname expansion is performed, so + it implements the rules in Posix 2.13.3, specifically that an unquoted + slash cannot appear in a bracket expression. */ int unquoted_glob_pattern_p (string) register char *string; @@ -89,6 +92,10 @@ return (1); continue; + case '/': + if (open) + open = 0; + case '+': case '@': case '!':