[LON-CAPA-cvs] cvs: loncom / lonenc.pm /interface lonfeedback.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sun, 14 Nov 2004 07:54:41 -0000
albertel Sun Nov 14 02:54:41 2004 EDT
Modified files:
/loncom lonenc.pm
/loncom/interface lonfeedback.pm
Log:
- ugly, but ixes BUG#3603
Index: loncom/lonenc.pm
diff -u loncom/lonenc.pm:1.5 loncom/lonenc.pm:1.6
--- loncom/lonenc.pm:1.5 Thu Nov 11 15:05:56 2004
+++ loncom/lonenc.pm Sun Nov 14 02:54:41 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# URL translation for encrypted filenames
#
-# $Id: lonenc.pm,v 1.5 2004/11/11 20:05:56 albertel Exp $
+# $Id: lonenc.pm,v 1.6 2004/11/14 07:54:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -110,6 +110,11 @@
return $str;
}
+sub check_decrypt {
+ my ($str)=@_;
+ if ($$str=~m|^/enc/|) { $$str=&Apache::lonenc::unencrypted($$str); }
+}
+
1;
__END__
Index: loncom/interface/lonfeedback.pm
diff -u loncom/interface/lonfeedback.pm:1.131 loncom/interface/lonfeedback.pm:1.132
--- loncom/interface/lonfeedback.pm:1.131 Fri Nov 12 11:22:48 2004
+++ loncom/interface/lonfeedback.pm Sun Nov 14 02:54:41 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.131 2004/11/12 16:22:48 www Exp $
+# $Id: lonfeedback.pm,v 1.132 2004/11/14 07:54:41 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2340,6 +2340,7 @@
$contrib{'history'} = '';
my $numoldver = 0;
my ($oldsymb,$oldidx)=split(/\:\:\:/,$ENV{'form.editdisc'});
+ &Apache::lonenc::check_decrypt(\$oldsymb);
$oldsymb=~s|(bulletin___\d+___)adm/wrapper/|$1|;
# get timestamp for last post and history
my %oldcontrib=&Apache::lonnet::restore($oldsymb,$ENV{'request.course.id'},
@@ -2800,6 +2801,7 @@
my $seeid=&Apache::lonnet::allowed('rin',$crs);
my ($symb,$idx)=split(/\:\:\:/,$ENV{'form.allversions'});
my $ressymb=$symb;
+ &Apache::lonenc::check_decrypt(\$ressymb);
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
}
@@ -2841,6 +2843,7 @@
my $previous=$ENV{'form.previous'};
# backward compatibility (bulletin boards used to be 'wrapped')
my $ressymb=$symb;
+ &Apache::lonenc::check_decrypt(\$ressymb);
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
}
@@ -2920,6 +2923,7 @@
foreach (@resources) {
# backward compatibility (bulletin boards used to be 'wrapped')
my $ressymb=$_;
+ &Apache::lonenc::check_decrypt(\$ressymb);
if ($ressymb =~ m/bulletin___\d+___/) {
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper/|;
@@ -2977,6 +2981,7 @@
my $symb=$ENV{'form.toggoff'}?$ENV{'form.toggoff'}:$ENV{'form.toggon'};
my $ressymb = $symb;
($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
+ &Apache::lonenc::check_decrypt(\$ressymb);
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
}
@@ -2994,6 +2999,7 @@
my $symb=$ENV{'form.markondisp'}?$ENV{'form.markondisp'}:$ENV{'form.markonread'};
my $ressymb = $symb;
($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
+ &Apache::lonenc::check_decrypt(\$ressymb);
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
}
@@ -3023,6 +3029,7 @@
}
my $ressymb = $symb;
($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
+ &Apache::lonenc::check_decrypt(\$ressymb);
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
}
@@ -3050,6 +3057,7 @@
my $symb=$ENV{'form.markread'};
my $ressymb = $symb;
my ($map,$ind,$url)=&Apache::lonnet::decode_symb($symb);
+ &Apache::lonenc::check_decrypt(\$ressymb);
unless ($ressymb =~ m|bulletin___\d+___adm/wrapper|) {
$ressymb=~s|(bulletin___\d+___)|$1adm/wrapper|;
}
@@ -3232,6 +3240,7 @@
$feedurl=&Apache::lonnet::clutter($url);
}
}
+ &Apache::lonenc::check_decrypt(\$symb);
my $goahead=1;
if ($feedurl=~/\.(problem|exam|quiz|assess|survey|form)$/) {
unless ($symb) { $goahead=0; }
@@ -3289,6 +3298,7 @@
} elsif ($ENV{'form.origpage'}) {
$symb = $ENV{'form.symb'};
}
+ &Apache::lonenc::check_decrypt(\$symb);
my @currnewattach = ();
my @deloldattach = ();
my @keepold = ();