Erik Forsberg's diary for May, 2002

[2001]
[2002-01] [2002-02] [2002-03] [2002-04] [2002-05]

Thursday 2002-05-30

21:00

Running Bugzilla on Roxen Challenger is.. challenging. Roxen doesn't set the environment variable REMOTE_HOST if the FQDN of the remote host isn't known. It does set REMOTE_ADDR, though. Bugzilla checks REMOTE_HOST first and if it doesn't exist, REMOTE_ADDR is checked. Since Roxen checks the FQDN using a asynchronous call, Bugzilla will probably get REMOTE_HOST about half the times, which gives confusing behaviour - you are logged out after submitting a bug, but can be logged in again by using the back-button.

This was really not my problem, since I try to avoid Roxen. Per Cederqvist, however, was hit by the bug. He made a workaround:


Index: CGI.pl
===================================================================
RCS file: /cvsroot/mozilla/webtools/bugzilla/CGI.pl,v
retrieving revision 1.100.2.1
diff -u -r1.100.2.1 CGI.pl
--- CGI.pl      9 Dec 2001 16:02:46 -0000       1.100.2.1
+++ CGI.pl      30 May 2002 10:40:55 -0000
@@ -659,6 +659,7 @@
if (!defined $ENV{'REMOTE_HOST'}) {
$ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'};
}
+        $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'};
SendSQL("SELECT profiles.userid, profiles.groupset, " .
"profiles.login_name, " .
"profiles.login_name = " .
@@ -948,6 +949,7 @@
if (!defined $ENV{'REMOTE_HOST'}) {
$ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'};
}
+       $ENV{'REMOTE_HOST'} = $ENV{'REMOTE_ADDR'};
SendSQL("insert into logincookies (userid,cryptpassword,hostname) values (@{[DBNameToIdAndCheck($enteredlogin)]}, @{[SqlQuote($realcryptpwd)]}, @{[SqlQuote($ENV{'REMOTE_HOST'})]})");
SendSQL("select LAST_INSERT_ID()");
my $logincookie = FetchOneColumn();

Wednesday 2002-05-01

14:45


(setq message-generate-headers-first t)

..in your .gnus makes Gnus generate the headers first when sending a message. That allows you to edit them as well, for example setting a very temporary 'From' header is easy this way.