diff options
author | 2022-03-10 14:43:17 +0100 | |
---|---|---|
committer | 2022-03-10 14:43:17 +0100 | |
commit | 4d3d3270883140535cc6ea5a190aebdf6f3dc120 (patch) | |
tree | 7bae03cfce71b7f13bba30fe907354d97d40df74 /src/firejail/fs_lib.c | |
parent | RELNOTES: add warning about allow-tray (diff) | |
download | firejail-4d3d3270883140535cc6ea5a190aebdf6f3dc120.tar.gz firejail-4d3d3270883140535cc6ea5a190aebdf6f3dc120.tar.zst firejail-4d3d3270883140535cc6ea5a190aebdf6f3dc120.zip |
refactor meta character filtering
Diffstat (limited to 'src/firejail/fs_lib.c')
-rw-r--r-- | src/firejail/fs_lib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/firejail/fs_lib.c b/src/firejail/fs_lib.c index 194a980f4..848691a56 100644 --- a/src/firejail/fs_lib.c +++ b/src/firejail/fs_lib.c | |||
@@ -276,9 +276,9 @@ static void install_list_entry(const char *lib) { | |||
276 | assert(lib); | 276 | assert(lib); |
277 | 277 | ||
278 | // filename check | 278 | // filename check |
279 | int len = strlen(lib); | 279 | reject_meta_chars(lib, 1); |
280 | if (strcspn(lib, "\\&!?\"'<>%^(){}[];,") != (size_t)len || | 280 | |
281 | strstr(lib, "..")) { | 281 | if (strstr(lib, "..")) { |
282 | fprintf(stderr, "Error: \"%s\" is an invalid library\n", lib); | 282 | fprintf(stderr, "Error: \"%s\" is an invalid library\n", lib); |
283 | exit(1); | 283 | exit(1); |
284 | } | 284 | } |