version 1.121.2.22, 2021/12/12 01:48:40
|
version 1.121.2.24, 2021/12/30 05:11:28
|
Line 41 use Apache::lonlocal;
|
Line 41 use Apache::lonlocal;
|
use Apache::File(); |
use Apache::File(); |
use HTML::Entities; |
use HTML::Entities; |
use Digest::MD5; |
use Digest::MD5; |
|
use CGI::Cookie(); |
|
|
# ------------------------------------------------------------ Successful login |
# ------------------------------------------------------------ Successful login |
sub success { |
sub success { |
Line 250 sub failed {
|
Line 251 sub failed {
|
my $firsturl = &Apache::loncommon::cleanup_html($form->{firsturl}); |
my $firsturl = &Apache::loncommon::cleanup_html($form->{firsturl}); |
if ($firsturl ne '') { |
if ($firsturl ne '') { |
$retry .= (($retry=~/\?/)?'&':'?').'firsturl='.$firsturl; |
$retry .= (($retry=~/\?/)?'&':'?').'firsturl='.$firsturl; |
if ($form->{firsturl} =~ m{^/tiny/$match_domain/\w+$}) { |
|
unless (exists($form->{linkprot})) { |
|
if (exists($form->{linkkey})) { |
|
$retry .= 'linkkey='.$form->{linkkey}; |
|
} |
|
} |
|
} |
|
} |
} |
} |
} |
} elsif ($querystr ne '') { |
} elsif ($querystr ne '') { |
Line 329 sub handler {
|
Line 323 sub handler {
|
$form{'serverid'}); |
$form{'serverid'}); |
unless (($tmpinfo=~/^error/) || ($tmpinfo eq 'con_lost') || |
unless (($tmpinfo=~/^error/) || ($tmpinfo eq 'con_lost') || |
($tmpinfo eq 'no_such_host')) { |
($tmpinfo eq 'no_such_host')) { |
my ($des_key,$firsturl,@rest)=split(/&/,$tmpinfo)l |
my ($des_key,$firsturl,@rest)=split(/&/,$tmpinfo); |
$firsturl = &unescape($firsturl); |
$firsturl = &unescape($firsturl); |
my %info; |
my %info; |
foreach my $item (@rest) { |
foreach my $item (@rest) { |
Line 406 sub handler {
|
Line 400 sub handler {
|
my ($key,$value) = split(/=/,$item); |
my ($key,$value) = split(/=/,$item); |
$form{$key} = &unescape($value); |
$form{$key} = &unescape($value); |
} |
} |
my $upass = &Apache::loncommon::des_decrypt($key,$form{'upass0'}); |
my $upass = &Apache::loncommon::des_decrypt($des_key,$form{'upass0'}); |
|
|
# ---------------------------------------------------------------- Authenticate |
# ---------------------------------------------------------------- Authenticate |
|
|
Line 468 sub handler {
|
Line 462 sub handler {
|
$firsturl='/adm/roles'; |
$firsturl='/adm/roles'; |
} |
} |
|
|
my $hosthere; |
my ($hosthere,%sessiondata); |
if ($form{'iptoken'}) { |
if ($form{'iptoken'}) { |
my %sessiondata = &Apache::lonnet::tmpget($form{'iptoken'}); |
%sessiondata = &Apache::lonnet::tmpget($form{'iptoken'}); |
my $delete = &Apache::lonnet::tmpdel($form{'iptoken'}); |
my $delete = &Apache::lonnet::tmpdel($form{'iptoken'}); |
if (($sessiondata{'domain'} eq $form{'udom'}) && |
if (($sessiondata{'domain'} eq $form{'udom'}) && |
($sessiondata{'username'} eq $form{'uname'})) { |
($sessiondata{'username'} eq $form{'uname'})) { |