public inbox for gnats-prs@sourceware.org
help / color / mirror / Atom feed
From: ayourk@ndak.net
To: gnats-gnats@sourceware.cygnus.com
Subject: gnatsweb/201: GNATS Web forces stored cookies rather than temp cookies.
Date: Fri, 01 Jun 2001 12:44:00 -0000	[thread overview]
Message-ID: <20010601193859.1939.qmail@sourceware.cygnus.com> (raw)

>Number:         201
>Category:       gnatsweb
>Synopsis:       GNATS Web forces stored cookies rather than temp cookies.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 01 12:44:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     ayourk@ndak.net
>Release:        gnatsweb-2.80
>Organization:
>Environment:
Slackware 3.9, Linux kernel 2.0.39.  GNATS 3.113.1
>Description:
GNATSweb forces the user to use permanent/stored cookies.
It could use temp cookies if the cookies didn't use an expiration date/time.  A patch is provided below:
>How-To-Repeat:

>Fix:
--- gnatsweb.pl Fri Jun  1 14:34:28 2001
+++ gnatsweb.pl.NEW     Fri Jun  1 14:33:17 2001
@@ -1825,8 +1825,9 @@
   my $query_string = $q->query_string();
   my $new_cookie = $q->cookie(-name => "gnatsweb-query-$queryname",
                               -value => $query_string,
-                              -path => $global_cookie_path,
-                              -expires => '+10y');
+                              -path => $global_cookie_path);
+#                              -path => $global_cookie_path,
+#                              -expires => '+10y');
   print $q->header(-cookie => $new_cookie);

   # Now print the page.
@@ -1968,8 +1969,9 @@
     my $expire_cookie_with_path =
           $q->cookie(-name => "gnatsweb-query-$queryname",
                      -value => 'does not matter',
-                     -path => $global_cookie_path,
-                     -expires => '-1d');
+                     -path => $global_cookie_path);
+#                     -path => $global_cookie_path,
+#                     -expires => '-1d');
     my $expire_cookies = $expire_cookie_with_path;

     # If we're using a non-empty $global_cookie_path, then we need to
@@ -1980,9 +1982,10 @@
     {
       my $expire_cookie_no_path =
             $q->cookie(-name => "gnatsweb-query-$queryname",
-                       -value => 'does not matter',
+                       -value => 'does not matter');
+#                       -value => 'does not matter',
                        # No -path here!
-                       -expires => '-1d');
+#                       -expires => '-1d');
       $expire_cookies = [ $expire_cookie_with_path, $expire_cookie_no_path ];
     }

@@ -3175,8 +3178,9 @@
   # done so that the old cookie would not be read.
   my $cookie = $q->cookie(-name => 'gnatsweb-global',
                           -value => \%global_prefs,
-                          -path => $global_cookie_path,
-                          -expires => $global_cookie_expires);
+                          -path => $global_cookie_path);
+#                          -path => $global_cookie_path,
+#                          -expires => $global_cookie_expires);
   warn "storing cookie: $cookie\n" if $debug;
   return $cookie;
 }
@@ -3244,13 +3248,15 @@
     my $db = $global_prefs{'database'};
     my $db_cookie = $q->cookie(-name => "gnatsweb-db-$db",
                                -value => \%db_prefs,
-                               -path => $global_cookie_path,
-                               -expires => $global_cookie_expires);
+                               -path => $global_cookie_path);
+#                               -path => $global_cookie_path,
+#                               -expires => $global_cookie_expires);
     my $expire_old_cookie = $q->cookie(-name => 'gnatsweb',
                                -value => 'does not matter',
-                               -path => $global_cookie_path,
+                               -path => $global_cookie_path);
+#                               -path => $global_cookie_path,
                                #-path was not used for gnatsweb 2.5 cookies
-                               -expires => '-1d');
+#                               -expires => '-1d');
     my $url = $q->param('return_url') || $q->url();
     # 11/14/99 kenstir: For some reason setting cookies during a redirect
     # didn't work; got a 'page contained no data' error from NS 4.7.  This
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-06-01 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-01 12:44 ayourk [this message]
2001-06-14  8:24 Yngve Svendsen
2001-06-17 10:04 Aaron Yourk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010601193859.1939.qmail@sourceware.cygnus.com \
    --to=ayourk@ndak.net \
    --cc=gnats-gnats@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).