gnatsweb/770: problem with duplicated "cmd" CGI variable. [PATCH]

View: New views
2 Messages — Rating Filter:   Alert me  

gnatsweb/770: problem with duplicated "cmd" CGI variable. [PATCH]

by Stephane Chazelas-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hiya,

I've submitted a new PR at http://gnats.wookimus.net/ for that
issue. Please see
http://gnats.wookimus.net/cgi-bin/gnatsweb.pl?user=guest&cmd=view&database=default&pr=770
for details.

However, it seems that submissions to
bug-gnats@... don't work anymore, so that I can't
add information to that PR.

Hence this email to this list.

Regarding that PR, here is a patch that fixes it for me. Not
very neat as it relies a bit on the CGI perl module internals
but short and effective:

--- gnatsweb.pl.orig 2003-07-29 13:24:22.000000000 +0100
+++ gnatsweb.pl 2007-11-16 14:30:32.000000000 +0000
@@ -2579,8 +2579,6 @@ sub store_query
     exit();
   }
 
-  # Don't save certain params.
-  $q->delete('cmd');
   my $query_string = $q->query_string();
 
   # strip empty params out of $query_string.  in a gnats db with many
@@ -4148,6 +4146,9 @@ sub main
 
   $script_name = $q->script_name;
   my $cmd = $q->param('cmd') || ''; # avoid perl -w warning
+  $q->delete('cmd');
+  $ENV{'REQUEST_URI'} = $q->url(-absolute=>1,-query=>1);
+
 
   ### Cookie-related code must happen before we print the HTML header.
   init_prefs();

Best regards,
Stephane


_______________________________________________
Help-gnats mailing list
Help-gnats@...
http://lists.gnu.org/mailman/listinfo/help-gnats

Re: gnatsweb/770: problem with duplicated "cmd" CGI variable. [PATCH]

by Chad Walstrom :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, Stephane.  I debugged my .procmail script and found I hadn't
updated the PATH environment variables to the new settings.  The PR and
patch are duly noted.  Unfortunately, I do not have commit access to the
gnatsweb tree to apply your patch.  I know some people have been
submitting patches via savannah.  I'll leave the PR open, regardless,
until it the fix finds its way into the upstream CVS.

Chad


_______________________________________________
Help-gnats mailing list
Help-gnats@...
http://lists.gnu.org/mailman/listinfo/help-gnats