[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

raeburn raeburn at source.lon-capa.org
Fri Dec 7 12:04:01 EST 2012


raeburn		Fri Dec  7 17:04:01 2012 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Sanity checking for folderpath retrieved via loncommon::restore_course_settings()
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.522 loncom/interface/londocs.pm:1.523
--- loncom/interface/londocs.pm:1.522	Fri Dec  7 16:48:19 2012
+++ loncom/interface/londocs.pm	Fri Dec  7 17:04:01 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.522 2012/12/07 16:48:19 raeburn Exp $
+# $Id: londocs.pm,v 1.523 2012/12/07 17:04:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3238,6 +3238,9 @@
     if ((!$env{'form.folderpath'}) && $allowed) {
         &Apache::loncommon::restore_course_settings($stored_folderpath,
                                           {'folderpath' => 'scalar'});
+        unless (&unescape($env{'form.folderpath'}) =~ m{^(default|supplemental)&}) {
+            undef($env{'form.folderpath'});
+        }
     }
    
 # If we are not allowed to make changes, all we can see are supplemental docs




More information about the LON-CAPA-cvs mailing list