lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev PATCH for ENABLE_RC


From: Doug Kaufman
Subject: lynx-dev PATCH for ENABLE_RC
Date: Sat, 14 Jun 2003 22:24:20 -0700 (PDT)

The following patch is submitted for discussion, rather than to fix
a bug. The question I would like to bring up is what should be the
appropriate default values for ENABLE_RC. When the "ENABLE_RC" section
was added to lynx.cfg, there wasn't any discussion that I remember as
to which settings should be ON by default. The current defaults don't
match the information in the OPTIONS page (i.e. which ones have the
"(!)", indicating that they are not saved). In addition, several items
are saved to the lynxrc file which are not able to be set in the OPTIONS
page. I believe that the proposed changes lead to a more functional
lynx, with fewer unexpected behaviors.

Perhaps the worst situation with the current settings has to do with
"cookie file". When options are saved, the "cookie file" is saved to
lynxrc. However if PERSISTENT_COOKIES is not enabled at the time that
options are first saved, cookie file is saved as a null file (see the
code in LYMain.c - LYCookieFile is NULL unless PERSISTENT_COOKIES are
TRUE). When PERSISTENT_COOKIES are later set to TRUE in lynx.cfg, the
file to which they are saved remains the NULL file, since the setting in
lynxrc overrides the settings in lynx.cfg. Similarly, the null settings
for other cookie variable override the settings in lynx.cfg, even though
these can not be set from the OPTIONS page.

I can't see a reason to routinely override the default lynx bookmark
file setting in lynx.cfg with the setting from lynxrc. In general I
would think it a bad idea to routinely save the execution_links
settings, overriding the lynx.cfg settings. This may lead to
execution_links saved as ON when options were saved while the settings
were temporarily changed, which in turn could lead to security problems.

As a general rule, I believe that the defaults should match the
information on the screen on the OPTIONS page. If we decide that some
of these should truly be on by default, we should change the display
on the OPTIONS page to match before the release of 2.8.5. I would also
recommend that settings which can not be changed from the OPTIONS page
should not routinely be saved in the lynxrc file.

Perhaps we need discussion on the relative roles of the lynx.cfg file
and the lynxrc files. I think that lynx configuration is complicated
enough already without having settings of the main configuration file
overridden by another file without specific action by the user.
                            Doug


--- lynx2-8-5/lynx.cfg.ori      2003-06-01 17:16:28.000000000 -0800
+++ lynx2-8-5/lynx.cfg  2003-06-14 21:04:22.000000000 -0800
@@ -3207,15 +3207,15 @@
 .nf
 #ENABLE_LYNXRC:accept_all_cookies:ON
 #ENABLE_LYNXRC:assume_charset:OFF
-#ENABLE_LYNXRC:bookmark_file:ON
+#ENABLE_LYNXRC:bookmark_file:OFF
 #ENABLE_LYNXRC:case_sensitive_searching:ON
 #ENABLE_LYNXRC:character_set:ON
-#ENABLE_LYNXRC:cookie_accept_domains:ON
-#ENABLE_LYNXRC:cookie_file:ON
-#ENABLE_LYNXRC:cookie_loose_invalid_domains:ON
-#ENABLE_LYNXRC:cookie_query_invalid_domains:ON
-#ENABLE_LYNXRC:cookie_reject_domains:ON
-#ENABLE_LYNXRC:cookie_strict_invalid_domains:ON
+#ENABLE_LYNXRC:cookie_accept_domains:OFF
+#ENABLE_LYNXRC:cookie_file:OFF
+#ENABLE_LYNXRC:cookie_loose_invalid_domains:OFF
+#ENABLE_LYNXRC:cookie_query_invalid_domains:OFF
+#ENABLE_LYNXRC:cookie_reject_domains:OFF
+#ENABLE_LYNXRC:cookie_strict_invalid_domains:OFF
 #ENABLE_LYNXRC:dir_list_style:ON
 #ENABLE_LYNXRC:display:OFF
 #ENABLE_LYNXRC:emacs_keys:ON
@@ -3233,8 +3233,8 @@
 #ENABLE_LYNXRC:preferred_charset:ON
 #ENABLE_LYNXRC:preferred_language:ON
 #ENABLE_LYNXRC:raw_mode:OFF
-#ENABLE_LYNXRC:run_all_execution_links:ON
-#ENABLE_LYNXRC:run_execution_links_on_local_files:ON
+#ENABLE_LYNXRC:run_all_execution_links:OFF
+#ENABLE_LYNXRC:run_execution_links_on_local_files:OFF
 #ENABLE_LYNXRC:scrollbar:OFF
 #ENABLE_LYNXRC:select_popups:ON
 #ENABLE_LYNXRC:set_cookies:OFF
--- lynx2-8-5/src/LYrcFile.c.ori        2003-06-01 17:16:28.000000000 -0800
+++ lynx2-8-5/src/LYrcFile.c    2003-06-14 20:35:46.000000000 -0800
@@ -299,7 +299,7 @@
 all cookies.\n\
 ")),
     MAYBE_FUN(RC_ASSUME_CHARSET,        get_assume_charset, 
put_assume_charset, MSG_ENABLE_LYNXRC),
-    PARSE_STR(RC_BOOKMARK_FILE,         bookmark_page,     N_("\
+    MAYBE_STR(RC_BOOKMARK_FILE,         bookmark_page,     N_("\
 bookmark_file specifies the name and location of the default bookmark\n\
 file into which the user can paste links for easy access at a later\n\
 date.\n\
@@ -316,7 +316,7 @@
 set or using the 7 bit character approximations.\n\
 Current valid characters sets are:\n\
 ")),
-    PARSE_LIS(RC_COOKIE_ACCEPT_DOMAINS, LYCookieAcceptDomains, N_("\
+    MAYBE_LIS(RC_COOKIE_ACCEPT_DOMAINS, LYCookieAcceptDomains, N_("\
 cookie_accept_domains and cookie_reject_domains are comma-delimited\n\
 lists of domains from which Lynx should automatically accept or reject\n\
 all cookies.  If a domain is specified in both options, rejection will\n\
@@ -324,12 +324,12 @@
 settings made here.\n\
 ")),
 #ifdef EXP_PERSISTENT_COOKIES
-    PARSE_STR(RC_COOKIE_FILE,          LYCookieFile, N_("\
+    MAYBE_STR(RC_COOKIE_FILE,          LYCookieFile, N_("\
 cookie_file specifies the file from which to read persistent cookies.\n\
 The default is ~/.lynx_cookies.\n\
 ")),
 #endif
-    PARSE_STR(RC_COOKIE_LOOSE_INVALID_DOMAINS, LYCookieLooseCheckDomains, N_("\
+    MAYBE_STR(RC_COOKIE_LOOSE_INVALID_DOMAINS, LYCookieLooseCheckDomains, N_("\
 cookie_loose_invalid_domains, cookie_strict_invalid_domains, and\n\
 cookie_query_invalid_domains are comma-delimited lists of which domains\n\
 should be subjected to varying degrees of validity checking.  If a\n\
@@ -338,9 +338,9 @@
 with an invalid path or domain attribute.  All domains will default to\n\
 querying the user for an invalid path or domain.\n\
 ")),
-    PARSE_STR(RC_COOKIE_QUERY_INVALID_DOMAINS, LYCookieQueryCheckDomains, 
NULL),
-    PARSE_LIS(RC_COOKIE_REJECT_DOMAINS, LYCookieRejectDomains, NULL),
-    PARSE_STR(RC_COOKIE_STRICT_INVALID_DOMAIN, LYCookieStrictCheckDomains, 
NULL),
+    MAYBE_STR(RC_COOKIE_QUERY_INVALID_DOMAINS, LYCookieQueryCheckDomains, 
NULL),
+    MAYBE_LIS(RC_COOKIE_REJECT_DOMAINS, LYCookieRejectDomains, NULL),
+    MAYBE_STR(RC_COOKIE_STRICT_INVALID_DOMAIN, LYCookieStrictCheckDomains, 
NULL),
 #ifdef DIRED_SUPPORT
 #ifdef LONG_LIST
     PARSE_ENU(RC_DIR_LIST_ORDER,        dir_list_order,     
tbl_dir_list_order, N_("\
@@ -439,7 +439,7 @@
 ")),
     MAYBE_SET(RC_RAW_MODE,              LYRawMode,          MSG_ENABLE_LYNXRC),
 #if defined(ENABLE_OPTS_CHANGE_EXEC) && (defined(EXEC_LINKS) || 
defined(EXEC_SCRIPTS))
-    PARSE_SET(RC_RUN_ALL_EXECUTION_LINKS, local_exec, N_("\
+    MAYBE_SET(RC_RUN_ALL_EXECUTION_LINKS, local_exec, N_("\
 If run_all_execution_links is set \"on\" then all local execution links\n\
 will be executed when they are selected.\n\
 \n\
@@ -450,7 +450,7 @@
           or compromise security.  This should only be set to \"on\" if\n\
           you are viewing trusted source information.\n\
 ")),
-    PARSE_SET(RC_RUN_EXECUTION_LINKS_LOCAL, local_exec_on_local_files, N_("\
+    MAYBE_SET(RC_RUN_EXECUTION_LINKS_LOCAL, local_exec_on_local_files, N_("\
 If run_execution_links_on_local_files is set \"on\" then all local\n\
 execution links that are found in LOCAL files will be executed when they\n\
 are selected.  This is different from run_all_execution_links in that\n\

-- 
Doug Kaufman
Internet: address@hidden


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]