# ------------------------------------------------------------------------------ # CHANGES | 7 +++++++ # configure | 2 +- # configure.in | 4 ++-- # lynx.cfg | 4 ++-- # src/LYCgi.c | 40 ++++++++++++++++++++++++++++++++++++---- # userdefs.h | 4 ++-- # 6 files changed, 50 insertions(+), 11 deletions(-) # ------------------------------------------------------------------------------ Index: CHANGES --- 2.8.5rel.4/CHANGES Tue Oct 25 17:40:26 2005 +++ 2.8.5rel.5/CHANGES Sat Oct 29 12:36:56 2005 @@ -1,6 +1,13 @@ Changes since Lynx 2.8 release =============================================================================== +2005-10-29 (2.8.5rel.5 fixes from 2.8.6dev.15) +* modify LYLoadCGI() to prompt user, displaying the command that would be + executed, to confirm that it should be. This makes it easier to notice when + a local program would be run by activating a lynxcgi link. This is not done + in advanced mode, since the URL is already visible in the status line (report + by vade79, comments by Greg MacManus) -TD + 2005-10-25 (2.8.5rel.4 fixes from 2.8.6dev.14) * fix error in rel.3 patch (report by Klaus Singvogel) Index: configure --- 2.8.5rel.4/configure Wed Feb 4 04:07:09 2004 +++ 2.8.5rel.5/configure Wed Feb 4 04:07:09 2004 @@ -723,7 +723,7 @@ PACKAGE=lynx # $Format: "VERSION=$ProjectVersion$"$ -VERSION=2.8.5rel.4 +VERSION=2.8.5rel.5 Index: configure.in --- 2.8.5rel.4/configure.in Wed Feb 4 04:07:09 2004 +++ 2.8.5rel.5/configure.in Wed Feb 4 04:07:09 2004 @@ -5,7 +5,7 @@ dnl dnl ask PRCS to plug-in the project-version for the configure-script. dnl $Format: "AC_REVISION($ProjectVersion$)"$ -AC_REVISION(2.8.5rel.4) +AC_REVISION(2.8.5rel.5) # Save the original $CFLAGS so we can distinguish whether the user set those # in the environment, or whether autoconf added -O and -g options: @@ -33,7 +33,7 @@ PACKAGE=lynx dnl ask PRCS to plug-in the project-version for the packages. # $Format: "VERSION=$ProjectVersion$"$ -VERSION=2.8.5rel.4 +VERSION=2.8.5rel.5 AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(DESTDIR) Index: lynx.cfg --- 2.8.5rel.4/lynx.cfg Wed Jan 28 11:30:38 2004 +++ 2.8.5rel.5/lynx.cfg Wed Jan 28 11:30:38 2004 @@ -3,10 +3,10 @@ # or Lynx_Dir:lynx.cfg (VMS) # # $Format: "#PRCS LYNX_VERSION \"$ProjectVersion$\""$ -#PRCS LYNX_VERSION "2.8.5rel.4" +#PRCS LYNX_VERSION "2.8.5rel.5" # # $Format: "#PRCS LYNX_DATE \"$ProjectDate$\""$ -#PRCS LYNX_DATE "Tue, 25 Oct 2005 17:40:26 -0700" +#PRCS LYNX_DATE "Sat, 29 Oct 2005 12:33:45 -0700" # # Definition pairs are of the form VARIABLE:DEFINITION # NO spaces are allowed between the pair items. Index: src/LYCgi.c --- 2.8.5rel.4/src/LYCgi.c Mon Feb 2 12:02:28 2004 +++ 2.8.5rel.5/src/LYCgi.c Sat Oct 29 12:33:45 2005 @@ -150,6 +150,40 @@ return -1; } #else +#ifdef LYNXCGI_LINKS +/* + * Wrapper for exec_ok(), confirming with user if the link text is not visible + * in the status line. + */ +PRIVATE BOOL can_exec_cgi ARGS2(const char *, linktext, const char *, linkargs) +{ + const char *format = gettext("Do you want to execute \"%s\"?"); + char *message = NULL; + char *command = NULL; + char *p; + BOOL result = TRUE; + + if (!exec_ok(HTLoadedDocumentURL(), linktext, CGI_PATH)) { + /* exec_ok gives out msg. */ + result = FALSE; + } else if (user_mode < ADVANCED_MODE) { + StrAllocCopy(command, linktext); + if (non_empty(linkargs)) { + HTSprintf(&command, " %s", linkargs); + } + HTUnEscape(command); + for (p = command; *p; ++p) + if (*p == '+') + *p = ' '; + HTSprintf0(&message, format, command); + result = HTConfirm(message); + FREE(message); + FREE(command); + } + return result; +} +#endif /* LYNXCGI_LINKS */ + PRIVATE int LYLoadCGI ARGS4( CONST char *, arg, HTParentAnchor *, anAnchor, @@ -281,8 +315,7 @@ strcmp(arg, HTLoadedDocumentURL()) && HText_AreDifferent(anAnchor, arg) && HTUnEscape(orig_pgm) && - !exec_ok(HTLoadedDocumentURL(), orig_pgm, - CGI_PATH)) { /* exec_ok gives out msg. */ + !can_exec_cgi(orig_pgm, "")) { /* * If we have extra path info and are not just reloading * the current, check the full file path (after unescaping) @@ -313,8 +346,7 @@ !(reloading && anAnchor->document) && strcmp(arg, HTLoadedDocumentURL()) && HText_AreDifferent(anAnchor, arg) && - !exec_ok(HTLoadedDocumentURL(), pgm, - CGI_PATH)) { /* exec_ok gives out msg. */ + !can_exec_cgi(pgm, pgm_args)) { /* * If we are reloading a lynxcgi document that had already been * loaded, the various checks above should allow it even if Index: userdefs.h --- 2.8.5rel.4/userdefs.h Mon Feb 2 12:02:28 2004 +++ 2.8.5rel.5/userdefs.h Mon Feb 2 12:02:28 2004 @@ -1360,11 +1360,11 @@ * the version definition with the Project Version on checkout. Just * ignore it. - kw */ /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */ -#define LYNX_VERSION "2.8.5rel.4" +#define LYNX_VERSION "2.8.5rel.5" #define LYNX_WWW_HOME "http://lynx.isc.org/" #define LYNX_WWW_DIST "http://lynx.isc.org/current/" /* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */ -#define LYNX_DATE "Tue, 25 Oct 2005 17:40:26 -0700" +#define LYNX_DATE "Sat, 29 Oct 2005 12:33:45 -0700" #define LYNX_DATE_OFF 5 /* truncate the automatically-generated date */ #define LYNX_DATE_LEN 11 /* truncate the automatically-generated date */