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

raeburn raeburn at source.lon-capa.org
Sat Nov 4 16:40:58 EDT 2017


raeburn		Sat Nov  4 20:40:58 2017 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Sanity checking.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1298 loncom/interface/loncommon.pm:1.1299
--- loncom/interface/loncommon.pm:1.1298	Sun Oct 15 13:26:55 2017
+++ loncom/interface/loncommon.pm	Sat Nov  4 20:40:57 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1298 2017/10/15 13:26:55 raeburn Exp $
+# $Id: loncommon.pm,v 1.1299 2017/11/04 20:40:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -13700,8 +13700,11 @@
     $env{'form.upfile'}=~s/\n+/\n/gs;
     $env{'form.upfile'}=~s/\n+$//gs;
 
-    my $datatoken=$env{'user.name'}.'_'.$env{'user.domain'}.
-	'_enroll_'.$env{'request.course.id'}.'_'.time.'_'.$$;
+    my $datatoken = &valid_datatoken($env{'user.name'}.'_'.$env{'user.domain'}.
+                                     '_enroll_'.$env{'request.course.id'}.'_'.
+                                     time.'_'.$$);
+    return if ($datatoken eq '');
+
     {
         my $datafile = $r->dir_config('lonDaemons').
                            '/tmp/'.$datatoken.'.tmp';




More information about the LON-CAPA-cvs mailing list