diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-08-24 00:37:02 +0000 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-08-24 00:37:02 +0000 |
commit | 8aea9066248d82b48dd83b99ad62015feb46ccb2 (patch) | |
tree | 7e7ec03951cc36909ea84f42f02305593e9d9ec9 /src/LYReadCFG.c | |
parent | a803e26dcdc6652b12d05f29bbd1b23c4b4239ed (diff) | |
download | lynx-snapshots-8aea9066248d82b48dd83b99ad62015feb46ccb2.tar.gz |
snapshot of project "lynx", label v2-9-0dev_2c
Diffstat (limited to 'src/LYReadCFG.c')
-rw-r--r-- | src/LYReadCFG.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/LYReadCFG.c b/src/LYReadCFG.c index 0c2cd417..5d3d866c 100644 --- a/src/LYReadCFG.c +++ b/src/LYReadCFG.c @@ -1,5 +1,5 @@ /* - * $LynxId: LYReadCFG.c,v 1.194 2019/01/25 13:43:17 tom Exp $ + * $LynxId: LYReadCFG.c,v 1.195 2019/08/24 00:25:43 tom Exp $ */ #ifndef NO_RULES #include <HTRules.h> @@ -1674,6 +1674,7 @@ static Config_Type Config_Table [] = PARSE_ADD(RC_PRINTER, printers), PARSE_SET(RC_QUIT_DEFAULT_YES, LYQuitDefaultYes), PARSE_INT(RC_READ_TIMEOUT, reading_timeout), + PARSE_INT(RC_REDIRECTION_LIMIT, redirection_limit), PARSE_FUN(RC_REFERER_WITH_QUERY, referer_with_query_fun), #ifdef USE_CMD_LOGGING PARSE_TIM(RC_REPLAYSECS, ReplaySecs), @@ -2342,6 +2343,14 @@ static void do_read_cfg(const char *cfg_filename, * And for query/strict/loose invalid cookie checking. - BJP */ LYConfigCookies(); + + /* + * Do not allow infinite redirection loops. + */ + if (redirection_limit < 5) + redirection_limit = 5; + if (redirection_limit > 25) + redirection_limit = 25; } /* this is a public interface to do_read_cfg */ |