[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 31 Jan 2006 21:57:59 -0000
albertel Tue Jan 31 16:57:59 2006 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- BUG#4631 - check if httpref is allwoing access to a specific version of a resource
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.704 loncom/lonnet/perl/lonnet.pm:1.705
--- loncom/lonnet/perl/lonnet.pm:1.704 Fri Jan 27 15:37:21 2006
+++ loncom/lonnet/perl/lonnet.pm Tue Jan 31 16:57:59 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.704 2006/01/27 20:37:21 albertel Exp $
+# $Id: lonnet.pm,v 1.705 2006/01/31 21:57:59 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3081,6 +3081,7 @@
sub allowed {
my ($priv,$uri,$symb)=@_;
+ my $ver_orguri=$uri;
$uri=&deversion($uri);
my $orguri=$uri;
$uri=&declutter($uri);
@@ -3181,7 +3182,7 @@
$thisallowed.=$1;
}
} else {
- my $refuri=$env{'httpref.'.$orguri};
+ my $refuri = $env{'httpref.'.$orguri} || $env{'httpref.'.$ver_orguri};
if ($refuri) {
if ($refuri =~ m|^/adm/|) {
$thisallowed='F';