version 1.53, 2010/12/26 03:09:11
|
version 1.53.2.1, 2011/11/07 13:38:45
|
Line 503 function verifyForm() {
|
Line 503 function verifyForm() {
|
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |
|
|
my $fn; |
my ($fn,$trailfile); |
if ($env{'form.filename'}) { |
if ($env{'form.filename'}) { |
$fn=$env{'form.filename'}; |
$fn=$env{'form.filename'}; |
$fn=~s/^https?\:\/\/[^\/]+\///; |
$fn=~s/^https?\:\/\/[^\/]+\///; |
$fn=~s/^\///; |
$fn=~s/^\///; |
$fn=~s{(~|priv/)($LONCAPA::username_re)}{}; |
$fn=~s{(~|priv/)($LONCAPA::username_re)}{}; |
$fn=~s/\/+/\//g; |
$fn=~s/\/+/\//g; |
|
$trailfile = "/home/$uname/public_html/".$trailfile; |
|
$trailfile=~s{//+}{/}g; |
} else { |
} else { |
$r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}. |
$r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}. |
' unspecified filename for upload', $r->filename); |
' unspecified filename for upload', $r->filename); |
Line 534 function verifyForm() {
|
Line 536 function verifyForm() {
|
$javascript, |
$javascript, |
{'bread_crumbs' => $brcrum,}) |
{'bread_crumbs' => $brcrum,}) |
.&Apache::loncommon::head_subbox( |
.&Apache::loncommon::head_subbox( |
&Apache::loncommon::CSTR_pageheader()) |
&Apache::loncommon::CSTR_pageheader($trailfile)) |
); |
); |
|
|
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |
if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) { |