Package: poppass-cgi
Version: 3-3
Severity: wishlist
Tags: patch

When the script is used in on an HTTP authenticated website, the
username could be taken from the REMOTE_USER environment variable. A
patch to include this behaviour is attached. Note that this patch
removes the center tag to work around the problems with the alignment of
the fixed username.

As it seems that the Debian packager is also the upstream maintainer, I
think this bugreport should reach the right person. Please consider
applying the patch.

- Joost

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.11-bixenu
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages poppass-cgi depends on:
ii  libwww-perl                5.803-4       WWW client/server library for Perl
ii  perl                       5.8.4-8sarge4 Larry Wall's Practical Extraction 
ii  perl-modules [libcgi-pm-pe 5.8.4-8sarge4 Core Perl modules

-- no debconf information
--- poppass.orig        2006-08-23 20:43:06.000000000 +0200
+++ poppass     2006-08-23 20:43:30.000000000 +0200
@@ -36,7 +36,7 @@
 my $COPYRIGHT  = "Copyright 1996-2000 $AUTHOR";
 my $HOME               = hr. a({href=>"/"}, "Home"); # Very Basic Home link
 my $MESSAGE    = <<EOM;
-Enter your UserName, current password, and new password (twice for
+Enter your username, current password, and new password (twice for
 verification) then click on Change Password. Passwords must be
 at least 6 characters and can be mixed case.
 EOM
@@ -82,14 +82,20 @@
 # Subroutines
 # --------------------------------------------------------------------------
 sub showform {
+  my @p;
+  if (remote_user) {
+    @p = (hidden('username', remote_user), remote_user);
+  } else {
+    @p = (textfield('username', '', 25));
+  }
   print p, blockquote(center(h2('Change Password')), hr, 
-    $MESSAGE, hr, center(pre(startform(),
-    "<b>           UserName: </b>", textfield('username','', 25), "\n",
+    $MESSAGE, hr, pre(startform(),
+    "<b>           Username: </b>", @p, "\n",
     "<b>       Old Password: </b>", password_field('password','', 25), "\n",
     "<b>       New Password: </b>", password_field('newpassword1','',25),"\n",
     "<b>Verify New Password: </b>", 
password_field('newpassword2','',25),"\n\n",
     submit('action','Change Password'),
-    endform))), "\n";
+    endform)), "\n";
 }
 # --------------------------------------------------------------------------
 sub error_exit {

Reply via email to