[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnatsweb and cookies
From: |
Gerald Pfeifer |
Subject: |
Re: gnatsweb and cookies |
Date: |
Fri, 15 Mar 2002 16:42:21 +0100 (CET) |
On Tue, 12 Mar 2002, Dirk Bergstrom wrote:
> On 3/12/2002 11:32 AM, Michael Richardson opined:
> > Any change that there might a way to have view-only access to gnatsweb.pl
> > and not need any cookies? Ideally a URL that I could give out that would
> > pull
> > up the view mode, but not go through any authentication at all, and not
> > require that cookies be enabled?
>
> well, it would certainly be possible to convince gnatsweb to work that way.
>
> i don't know that it would be easy, and i'm not sure that it would be
> worth the trouble. if all you want is the ability to pull up a PR given
> a PR number, i'd suggest a simple cgi wrapper around query-pr (with
> *lots* of input checking...). this will take a lot less time and
> trouble, and give you what you need.
Actually, it seems surprisingly simple. ;-) Below you'll find a patch due
to Jason Molenda (CC:ed) which we have been using on gcc.gnu.org; some-
thing similiar for use with current GNATS/gnatsweb should be relatively
simple, I guess.
Gerald
Index: gnatsweb.pl
===================================================================
RCS file: /cvs/gcc/wwwdocs/cgi-bin/gnatsweb.pl,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -p -r1.49 -r1.50
--- gnatsweb.pl 2001/12/18 21:11:00 1.49
+++ gnatsweb.pl 2001/12/19 07:22:34 1.50
@@ -3501,6 +3501,13 @@ sub main
$global_prefs{'database'}="gcc";
#GCC-LOCAL end.
+ #GCC-LOCAL begin: No username/pass provided? Default to guest/guest
+ if (!$db_prefs{'user'} || !$db_prefs{'password'}) {
+ $db_prefs{'user'} = "guest";
+ $db_prefs{'password'} = "guest";
+ }
+ #GCC-LOCAL end.
+
# Big old switch to handle commands.
if($cmd eq 'store query')
{