Skip to content

Commit 3b4d01e

Browse files
lib/chkname.c, src/: Strictly disallow really bad names
Some names are bad, and some names are really bad. '--badname' should only allow the mildly bad ones, which we can handle. Some names are too bad, and it's not possible to deal with them. Reject them unconditionally. Acked-by: Chris Hofstaedtler <[email protected]> Acked-by: Tobias Stoeckmann <[email protected]> Cc: Marc 'Zugschlus' Haber <[email protected]> Cc: Iker Pedrosa <[email protected]> Cc: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
1 parent 1d2c5ea commit 3b4d01e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/chkname.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ is_valid_name(const char *name)
6767
|| streq(name, ".")
6868
|| streq(name, "..")
6969
|| strspn(name, "-")
70-
|| strpbrk(name, " \"#,/:;")
70+
|| strpbrk(name, " !\"#&*+,/:;@|~")
7171
|| strchriscntrl(name)
7272
|| strisdigit(name))
7373
{

0 commit comments

Comments
 (0)