Diff for /loncom/auth/lonauth.pm between versions 1.51 and 1.57

version 1.51, 2003/05/24 12:43:54 version 1.57, 2003/09/20 17:44:22
Line 46  use Apache::loncommon(); Line 46  use Apache::loncommon();
 use Apache::lonnet();  use Apache::lonnet();
 use Apache::lonmenu();  use Apache::lonmenu();
 use Fcntl qw(:flock);  use Fcntl qw(:flock);
   use Apache::lonlocal;
   
 my %FORM;  my %FORM;
   
Line 107  sub success { Line 108  sub success {
  $FORM{'interface'}=$userenv{'interface'};   $FORM{'interface'}=$userenv{'interface'};
     }      }
     $ENV{'environment.remote'}=$userenv{'remote'};      $ENV{'environment.remote'}=$userenv{'remote'};
   # --------------- Do not trust query string to be put directly into environment
       foreach ('imagesuppress','appletsuppress',
        'embedsuppress','fontenhance','blackwhite',
        'interface','localpath','localres') {
    $FORM{$_}=~s/[\n\r\=]//gs;
       }
 # --------------------------------------------------------- Write first profile  # --------------------------------------------------------- Write first profile
   
     {      {
Line 126  sub success { Line 133  sub success {
  print $idf "browser.mathml=$clientmathml\n";   print $idf "browser.mathml=$clientmathml\n";
  print $idf "browser.unicode=$clientunicode\n";   print $idf "browser.unicode=$clientunicode\n";
  print $idf "browser.os=$clientos\n";   print $idf "browser.os=$clientos\n";
           if ($FORM{'localpath'}) {
              print $idf "browser.localpath=$FORM{'localpath'}\n";
              print $idf "browser.localres=$FORM{'localres'}\n";
           }
  print $idf "request.course.fn=\n";   print $idf "request.course.fn=\n";
  print $idf "request.course.uri=\n";   print $idf "request.course.uri=\n";
  print $idf "request.course.sec=\n";   print $idf "request.course.sec=\n";
Line 172  sub success { Line 183  sub success {
     my $startupremote=&Apache::lonmenu::startupremote($lowerurl);      my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
     my $setflags=&Apache::lonmenu::setflags();      my $setflags=&Apache::lonmenu::setflags();
     my $maincall=&Apache::lonmenu::maincall();      my $maincall=&Apache::lonmenu::maincall();
     my $bodytag=&Apache::loncommon::bodytag('Successful Login',undef,' ');      my $bodytag=&Apache::loncommon::bodytag('Successful Login');
 # ------------------------------------------------- Output for successful login  # ------------------------------------------------- Output for successful login
   
     $r->send_cgi_header(<<ENDHEADER);      $r->send_cgi_header(<<ENDHEADER);
Line 204  ENDSUCCESS Line 215  ENDSUCCESS
   
 sub failed {  sub failed {
     my ($r,$message) = @_;      my ($r,$message) = @_;
     my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login',undef,' ');      my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login');
     $r->send_cgi_header(<<ENDFHEADER);      $r->send_cgi_header(<<ENDFHEADER);
 Content-type: text/html  Content-type: text/html
   
Line 226  $bodytag Line 237  $bodytag
 ENDFAILED  ENDFAILED
 }  }
   
   # ------------------------------------------------------------------ Rerouting!
   
   sub reroute {
       my $r=shift;
       my $bodytag=&Apache::loncommon::bodytag('Rerouting');
       $r->send_cgi_header(<<ENDRFHEADER);
   Content-type: text/html
   
   ENDRFHEADER
       $r->print(<<ENDRFAILED);
   <html>
   <head>
   <title>Rerouting Login to the LearningOnline Network with CAPA</title>
   </head>
   <html>
   $bodytag
   <h1>Sorry ...</h1>
   Please <a href="/">log in again</a>.
   </body>
   </html>
   ENDRFAILED
   }
   
 # ---------------------------------------------------------------- Main handler  # ---------------------------------------------------------------- Main handler
   
 sub handler {  sub handler {
     my $r = shift;      my $r = shift;
   
   # Are we re-routing?
       if (-e '/home/httpd/html/lon-status/reroute.txt') {
    &reroute($r);
    return OK;
       }
   
       &Apache::lonlocal::get_language_handle($r);
   
     my $buffer;      my $buffer;
     $r->read($buffer,$r->header_in('Content-length'),0);      $r->read($buffer,$r->header_in('Content-length'),0);
     my @pairs=split(/&/,$buffer);      my @pairs=split(/&/,$buffer);

Removed from v.1.51  
changed lines
  Added in v.1.57


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