--- loncom/lonnet/perl/lonuploadrep.pm 2006/12/20 22:41:07 1.9 +++ loncom/lonnet/perl/lonuploadrep.pm 2009/02/13 17:20:35 1.11 @@ -1,6 +1,8 @@ # The LearningOnline Network # Uploaded File Replication Manager # +# $Id: lonuploadrep.pm,v 1.11 2009/02/13 17:20:35 bisitz Exp $ +# # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -30,7 +32,6 @@ use strict; use Apache::Constants qw(:common :http); use Apache::lonrep(); use Apache::lonnet; -use CGI::Cookie(); use LONCAPA(); sub handler { @@ -59,10 +60,9 @@ sub handler { return OK; } } - my %cookies=CGI::Cookie->parse($r->header_in('Cookie')); - my $lonid=$cookies{'lonID'}; - if ($lonid) { - $r->log_reason('Copying failed in lonuploadrep for '.$lonid->value); + my $handle = &Apache::lonnet::check_for_valid_session($r); + if ($handle) { + $r->log_reason('Copying failed in lonuploadrep for '.$handle); return HTTP_NOT_FOUND; } else { $r->log_reason('Copying failed in lonuploadrep for unknown user');