7186b23
From c60c227ab9a36246730d7454e33d40d2c66c88b3 Mon Sep 17 00:00:00 2001
7186b23
From: Kamil Dudka <kdudka@redhat.com>
7186b23
Date: Wed, 13 Feb 2013 15:26:22 +0100
7186b23
Subject: [PATCH] fix CVE-2008-4690
7186b23
7186b23
prompt user before executing command via a lynxcgi link even in advanced mode,
7186b23
as the actual URL may not be shown but hidden behind an HTTP redirect and set
7186b23
TRUSTED_LYNXCGI:none in lynx.cfg to disable all lynxcgi URLs by default
7186b23
---
20252a3
 CHANGES     |    7 +++++++
20252a3
 lynx.cfg    |    2 +-
20252a3
 src/LYCgi.c |    2 +-
20252a3
 3 files changed, 9 insertions(+), 2 deletions(-)
20252a3
b975527
diff --git a/CHANGES b/CHANGES
7186b23
index 360be68..8eca013 100644
b975527
--- a/CHANGES
b975527
+++ b/CHANGES
d63c327
@@ -1355,6 +1355,13 @@ Changes since Lynx 2.8 release
b975527
 * update win32 makefiles/build scripts to add LYmktime, parsdate modules -TD
b975527
 * update config.guess (2008-04-14), config.sub (2008-06-16)
73668a7
 
b975527
+2008-10-26
b975527
+* modify patch for CVE-2005-2929 to prompt user before executing command via
b975527
+  a lynxcgi link even in advanced mode, as the actual URL may not be shown but
b975527
+  hidden behind an HTTP redirect
b975527
+* set TRUSTED_LYNXCGI:none in lynx.cfg to disable all lynxcgi URLs by default
b975527
+  [CVE-2008-4690]
b975527
+
b975527
 2008-09-21 (2.8.7dev.10)
b975527
 * remove rw.po, since the translation project no longer supplies it -TD
b975527
 * implement "readonly" attribute for TEXTAREA and TEXT fields -TD
b975527
diff --git a/lynx.cfg b/lynx.cfg
7186b23
index ee2aad3..144050d 100644
b975527
--- a/lynx.cfg
b975527
+++ b/lynx.cfg
478460e
@@ -1087,7 +1087,7 @@ LOCALE_CHARSET:TRUE
b975527
 #
b975527
 # The default TRUSTED_LYNXCGI rule is "none".
73668a7
 #
73668a7
-#TRUSTED_LYNXCGI:none
73668a7
+TRUSTED_LYNXCGI:none
73668a7
 
73668a7
 .h2 LYNXCGI_ENVIRONMENT
7186b23
 # Unix:
b975527
diff --git a/src/LYCgi.c b/src/LYCgi.c
7186b23
index 832bb89..0ae8a7e 100644
b975527
--- a/src/LYCgi.c
b975527
+++ b/src/LYCgi.c
95c0ec4
@@ -167,7 +167,7 @@ static BOOL can_exec_cgi(const char *linktext, const char *linkargs)
b975527
     if (!exec_ok(HTLoadedDocumentURL(), linktext, CGI_PATH)) {
b975527
 	/* exec_ok gives out msg. */
b975527
 	result = FALSE;
b975527
-    } else {
b975527
+    } else if (user_mode < ADVANCED_MODE) {
b975527
 	StrAllocCopy(command, linktext);
b975527
 	if (non_empty(linkargs)) {
b975527
 	    HTSprintf(&command, " %s", linkargs);
7186b23
-- 
7186b23
1.7.1
7186b23