[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 27 Oct 2005 19:47:40 -0000


raeburn		Thu Oct 27 15:47:40 2005 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Allow files in /uploaded to be accessible when referrer is other than /adm (e.g., /res/lib/templates/simpleproblem.problem).
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.668 loncom/lonnet/perl/lonnet.pm:1.669
--- loncom/lonnet/perl/lonnet.pm:1.668	Thu Oct 27 13:01:35 2005
+++ loncom/lonnet/perl/lonnet.pm	Thu Oct 27 15:47:39 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.668 2005/10/27 17:01:35 raeburn Exp $
+# $Id: lonnet.pm,v 1.669 2005/10/27 19:47:39 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3106,6 +3106,12 @@
 	if ($refuri) {
 	    if ($refuri =~ m|^/adm/|) {
 		$thisallowed='F';
+	    } else {
+                $refuri=&declutter($refuri);
+                my ($match) = &is_on_map($refuri);
+                if ($match) {
+                    $thisallowed='F';
+                }
 	    }
 	}
     }