From 13a128cf8d02ed52ea250736f16c3a9f7290dccc Mon Sep 17 00:00:00 2001 From: lars Date: Fri, 19 Nov 2010 01:54:47 +0000 Subject: [PATCH] trim whitespace from LOGIN_NAME - otherwise access is denied for the user's lists --- ezmlm-web.cgi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ezmlm-web.cgi b/ezmlm-web.cgi index 62dda83..5d5e6bc 100755 --- a/ezmlm-web.cgi +++ b/ezmlm-web.cgi @@ -292,6 +292,11 @@ unless (defined($MAIL_ADDRESS_PREFIX)) { # get the current login name advertised to the webserver (if it is defined) $LOGIN_NAME = lc($ENV{'REMOTE_USER'}); +# Remove leading and trailing whitespace (they are ignored by http-auth). +# Otherwise the webauth check does not work properly. +$LOGIN_NAME =~ s/^\s+//; +$LOGIN_NAME =~ s/\s+$//; + # check if the POSIX module is available $posix_enabled = &safely_import_module("POSIX");