version 1.38.2.1, 2008/12/12 02:42:49
|
version 1.38.2.3, 2008/12/21 04:43:41
|
Line 117 sub phaseone {
|
Line 117 sub phaseone {
|
if ($fn=~/\.(\w+)$/ && |
if ($fn=~/\.(\w+)$/ && |
(&Apache::loncommon::fileembstyle($1) eq 'hdn')) { |
(&Apache::loncommon::fileembstyle($1) eq 'hdn')) { |
$r->print('<p class="LC_error">' |
$r->print('<p class="LC_error">' |
.&mt('The extension on this file, [_1], is reserved internally by LON-CAPA.','"'.$1.'"' ). |
.&mt('The extension on this file, [_1], is reserved internally by LON-CAPA.','"'.$1.'"' ) |
.' <br />'.&mt('Please change the extension.') |
.' <br />'.&mt('Please change the extension.') |
.'</p>'); |
.'</p>'); |
} elsif($fn=~/\.(\w+)$/ && |
} elsif($fn=~/\.(\w+)$/ && |
Line 335 function verifyForm() {
|
Line 335 function verifyForm() {
|
my $fn; |
my $fn; |
if ($env{'form.filename'}) { |
if ($env{'form.filename'}) { |
$fn=$env{'form.filename'}; |
$fn=$env{'form.filename'}; |
$fn=~s/^http\:\/\/[^\/]+\///; |
$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; |