diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-08-30 05:36:02 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-08-30 05:36:02 +0200 |
commit | d61daab56b78c46e2177e0626c3eb83e06903866 (patch) | |
tree | 4f32f5a57dc2dca04e31040dc73af4dd47cebcfc | |
parent | b0063175acc61ea09bb1e6db62263bc18908de78 (diff) |
Do not allow . or .. as manga name
-rwxr-xr-x | automedia | bin | 120760 -> 120760 bytes | |||
-rw-r--r-- | src/main.c | 5 |
2 files changed, 5 insertions, 0 deletions
Binary files differ @@ -289,6 +289,11 @@ static void command_add(int argc, char **argv, char *rss_config_dir, char *html_ fprintf(stderr, "--name value can't be longer than %d characters\n", NAME_MAX_LEN); exit(1); } + + if(strcmp(media_name, ".") == 0 || strcmp(media_name, "..") == 0) { + fprintf(stderr, "--name can't be . or ..\n"); + exit(1); + } } if(start_after) { |