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