Diff for /loncom/lonenc.pm between versions 1.22 and 1.24

version 1.22, 2007/10/05 18:33:29 version 1.24, 2008/12/19 14:29:13
Line 34  use Crypt::IDEA; Line 34  use Crypt::IDEA;
 use Time::HiRes qw(gettimeofday);  use Time::HiRes qw(gettimeofday);
 use LONCAPA;  use LONCAPA;
     
   
   #
   #  If a module makes multiple SSI calls and some of the ssi calls result in a
   #  resource for an encoded URL, and this can be done in an unprivileged role,
   #  there must be a mechanism t oreset the 'request.enc' environment variable.
   #  This sub centralizes that mechanism:
   #
   sub reset_enc {
       $env{'request.enc'} = 0;
   }
   
 sub encryptseed {  sub encryptseed {
     my ($cid) = @_;      my ($cid) = @_;
     if (!defined($cid)) {      if (!defined($cid)) {
Line 154  sub encrypt_ref { Line 165  sub encrypt_ref {
     next if (!$value);       next if (!$value); 
     next if ($value =~ /^\w+:/); # explict javascript: or http: link      next if ($value =~ /^\w+:/); # explict javascript: or http: link
     my $href=&Apache::lonnet::hreflocation($Apache::lonxml::pwd[-1],$value);      my $href=&Apache::lonnet::hreflocation($Apache::lonxml::pwd[-1],$value);
     if ($href !~ /^http:/) {      if ($href !~ /^https?\:/) {
  # IE really wants an extension   # IE really wants an extension
  my ($extension) = ($href =~ m/(\.[^.]*)$/);   my ($extension) = ($href =~ m/(\.[^.]*)$/);
  $href = &Apache::lonenc::encrypted($href,$force_enc);   $href = &Apache::lonenc::encrypted($href,$force_enc);

Removed from v.1.22  
changed lines
  Added in v.1.24


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>