mirror of
https://github.com/netblue30/firejail.git
synced 2026-06-30 09:05:57 -06:00
common.c: add more metachars in reject_meta_chars()
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
Some checks failed
Build-extra / build-gcc (push) Has been cancelled
Build-extra / build-clang (push) Has been cancelled
Build / build (push) Has been cancelled
Check-C / scan-build (push) Has been cancelled
Check-C / cppcheck (push) Has been cancelled
Check-C / codeql-cpp (push) Has been cancelled
Codespell / codespell (push) Has been cancelled
Test / test-main (push) Has been cancelled
Test / test-fs (push) Has been cancelled
Test / test-environment (push) Has been cancelled
Test / test-utils (push) Has been cancelled
Test / test-network (push) Has been cancelled
Add: * `#$|` Ignore: * `'()~` Note: `,` does not appear to be a metacharacter, but it (and `%`) are checked in test/fcopy/cmdline.exp. I'm not sure if they matter for fcopy, so they are left as is. Misc: `$` was suggested by @rusty-snake[1]. This is a follow-up to #7183. Relates to #3001 #3156 #4614. [1] https://github.com/netblue30/firejail/pull/7183#issuecomment-4709569497
This commit is contained in:
parent
76d9dd7037
commit
ad968e7ebf
1 changed files with 8 additions and 1 deletions
|
|
@ -484,8 +484,15 @@ void reject_cntrl_chars(const char *fname) {
|
|||
}
|
||||
}
|
||||
|
||||
// Note: Characters intentionally ignored:
|
||||
//
|
||||
// * `'`: Used in some dirnames (see #4614).
|
||||
// * `()`: Used in some dirnames (see #3001 #3156).
|
||||
// * `~`: Might be useful for expansion and seems unlikely to cause problems by
|
||||
// itself.
|
||||
#ifndef METACHARS
|
||||
#define METACHARS "!\"%&,;<>\\^`{}"
|
||||
// All metachars except for ignored chars and chars in other groups.
|
||||
#define METACHARS "!\"#$%&',;<>\\^`{|}"
|
||||
#endif
|
||||
#ifndef GLOBCHARS
|
||||
#define GLOBCHARS "*?[]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue