[LON-CAPA-cvs] cvs: loncom /auth lonwebdavauth.pm
raeburn
raeburn at source.lon-capa.org
Fri May 29 20:11:04 EDT 2015
raeburn Sat May 30 00:11:04 2015 EDT
Modified files:
/loncom/auth lonwebdavauth.pm
Log:
- Trim leading and training white space from username and domain entered
by user in Apache Basic Auth username prompt.
Index: loncom/auth/lonwebdavauth.pm
diff -u loncom/auth/lonwebdavauth.pm:1.4 loncom/auth/lonwebdavauth.pm:1.5
--- loncom/auth/lonwebdavauth.pm:1.4 Fri May 29 20:00:49 2015
+++ loncom/auth/lonwebdavauth.pm Sat May 30 00:11:04 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Authentication Handler for webDAV access to Authoring Space.
#
-# $Id: lonwebdavauth.pm,v 1.4 2015/05/29 20:00:49 raeburn Exp $
+# $Id: lonwebdavauth.pm,v 1.5 2015/05/30 00:11:04 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -178,12 +178,18 @@
if ($r->user =~ /,/) {
($uname,$udom) = split(/,/,$r->user);
+ $uname =~ s/^\s+//;
+ $uname =~ s/\s+$//;
+ $udom =~ s/^\s+//;
+ $udom =~ s/\s+$//;
unless (($uname =~ /^$match_username$/) && ($udom =~ /^$match_domain$/)) {
$r->note_basic_auth_failure;
return AUTH_REQUIRED;
}
} else {
$uname = $r->user;
+ $uname =~ s/^\s+//;
+ $uname =~ s/\s+$//;
($udom) = ($r->uri =~ m{^/webdav/($match_domain)/});
unless (($udom ne '' ) && ($uname =~ /^$match_username$/) && ($upass ne '')) {
$r->note_basic_auth_failure;
More information about the LON-CAPA-cvs
mailing list