about summary refs log tree commit diff stats
path: root/src/LYReadCFG.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>2019-08-24 00:37:02 +0000
committerThomas E. Dickey <dickey@invisible-island.net>2019-08-24 00:37:02 +0000
commit8aea9066248d82b48dd83b99ad62015feb46ccb2 (patch)
tree7e7ec03951cc36909ea84f42f02305593e9d9ec9 /src/LYReadCFG.c
parenta803e26dcdc6652b12d05f29bbd1b23c4b4239ed (diff)
downloadlynx-snapshots-8aea9066248d82b48dd83b99ad62015feb46ccb2.tar.gz
snapshot of project "lynx", label v2-9-0dev_2c
Diffstat (limited to 'src/LYReadCFG.c')
-rw-r--r--src/LYReadCFG.c11
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 */
/a>
f027adc0 ^
08f08fb9 ^
654af129 ^
08f08fb9 ^
d8084b41 ^

99400080 ^
08f08fb9 ^

654af129 ^

d1a1173d ^
d8084b41 ^
cba63cf3 ^
b4250dbc ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39