--- loncom/interface/loncommon.pm 2017/10/15 13:26:55 1.1298 +++ loncom/interface/loncommon.pm 2017/11/04 20:40:57 1.1299 @@ -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 @@ sub upfile_store { $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';