[Pkg-dspam-misc] Bug#430589: dspam-webfrontend: Webui for admin preferences page broken (errors in apache log)

Siraj 'Sid' Rakhada sid at test.mindless.co.uk
Mon Jun 25 21:08:33 UTC 2007


Package: dspam-webfrontend
Version: 3.6.8-5
Severity: important
Tags: patch


While trying to set the default user preferences for dspam via the web interface 
I kept coming up against error logs in my apache log such as the following:

[Mon Jun 25 20:55:12 2007] [error] [client 10.1.1.1] invalid command 
syntax., referer: https://test/dspam/admin.cgi
[Mon Jun 25 20:55:12 2007] [error] [client 10.1.1.1] syntax: dspam_admin 
[function] [arguments] [--profile=PROFILE], referer: 
https://test/dspam/admin.cgi
[Mon Jun 25 20:55:12 2007] [error] [client 10.1.1.1] \tadd preference 
[user] [attrib] [value], referer: https://test/dspam/admin.cgi
[Mon Jun 25 20:55:12 2007] [error] [client 10.1.1.1] \tchange preference 
[user] [attrib] [value], referer: https://test/dspam/admin.cgi
[Mon Jun 25 20:55:12 2007] [error] [client 10.1.1.1] \tdelete preference 
[user] [attrib] [value], referer: https://test/dspam/admin.cgi
[Mon Jun 25 20:55:12 2007] [error] [client 10.1.1.1] \tlist preference 
[user] [attrib] [value], referer: https://test/dspam/admin.cgi
[Mon Jun 25 20:55:12 2007] [error] [client 10.1.1.1] \taggregate 
preference [user], referer: https://test/dspam/admin.cgi

I'm quite new to this - I'm not sure if this is even the best fix. I found that 
I had to modify the admin.cgi ever so slightly:

# diff -c ~sr/srcs/dspam-3.6.8/webui/cgi-bin/admin.cgi admin.cgi
*** /home/sr/srcs/dspam-3.6.8/webui/cgi-bin/admin.cgi   2007-06-25 
20:26:51.804426709 +0100
--- admin.cgi   2007-06-25 21:03:45.435696459 +0100
***************
*** 126,131 ****
--- 126,132 ----
  
    if ($FORM{'username'} eq "") {
      $FILE = "/etc/dspam/default.prefs";
+     $DATA{'USERNAME'} = $USER = 'default';
    } else {
      $FILE = GetPath($FORM{'username'}) . ".prefs";
    }

Is this a desirable patch? Or have I missed something fairly important in the 
documentation?

Also - It seems dspam --version is required by the cgi if you want to use the 
"$CONFIG{'AUTODETECT'} = 1;" option.

However, if you do that, then the webui won't work very well, because it won't 
be able to tell if you are running with --enable-preferences-extension or large 
scale, or domain-scale, as the output of 'dspam --version' does not display 
anything like that - on my system it shows the following:

# dspam --version

DSPAM Anti-Spam Suite 3.6.8 (agent/library)

Copyright (c) 2002-2006 Jonathan A. Zdziarski
http://dspam.nuclearelephant.com

DSPAM may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the DSPAM distribution kit.

Configuration parameters: /usr/share/config.site /usr/etc/config.site

The interesting lines in dspam.cgi start at line 51.

I hope this helps someone,

Sid

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-3-686
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages dspam-webfrontend depends on:
ii  dspam                         3.6.8-5    is a scalable, fast and statistica
ii  libgd-gd2-noxpm-perl          1:2.34-1   Perl module wrapper for libgd - gd
ii  libgd-graph3d-perl            0.63-3     Create 3D Graphs with GD and GD::G

dspam-webfrontend recommends no packages.

-- no debconf information




More information about the Pkg-dspam-misc mailing list