--- loncom/publisher/lonupload.pm 2010/12/26 03:09:11 1.53 +++ loncom/publisher/lonupload.pm 2011/11/07 13:38:45 1.53.2.1 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # Handler to upload files into construction space # -# $Id: lonupload.pm,v 1.53 2010/12/26 03:09:11 raeburn Exp $ +# $Id: lonupload.pm,v 1.53.2.1 2011/11/07 13:38:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -503,13 +503,15 @@ function verifyForm() { return HTTP_NOT_ACCEPTABLE; } - my $fn; + my ($fn,$trailfile); if ($env{'form.filename'}) { $fn=$env{'form.filename'}; $fn=~s/^https?\:\/\/[^\/]+\///; $fn=~s/^\///; $fn=~s{(~|priv/)($LONCAPA::username_re)}{}; $fn=~s/\/+/\//g; + $trailfile = "/home/$uname/public_html/".$trailfile; + $trailfile=~s{//+}{/}g; } else { $r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}. ' unspecified filename for upload', $r->filename); @@ -534,7 +536,7 @@ function verifyForm() { $javascript, {'bread_crumbs' => $brcrum,}) .&Apache::loncommon::head_subbox( - &Apache::loncommon::CSTR_pageheader()) + &Apache::loncommon::CSTR_pageheader($trailfile)) ); if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {