From d61daab56b78c46e2177e0626c3eb83e06903866 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 30 Aug 2021 05:36:02 +0200 Subject: Do not allow . or .. as manga name --- automedia | Bin 120760 -> 120760 bytes src/main.c | 5 +++++ 2 files changed, 5 insertions(+) diff --git a/automedia b/automedia index ae7bf10..36b88e9 100755 Binary files a/automedia and b/automedia differ diff --git a/src/main.c b/src/main.c index bad4f42..fa4ca20 100644 --- a/src/main.c +++ b/src/main.c @@ -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) { -- cgit v1.2.3