chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Nov 2012 18:22:41 +0000 (18:22 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Nov 2012 18:22:41 +0000 (18:22 +0000)
cgi-auth-hybrid.pm

index 6d28387..070603d 100644 (file)
@@ -246,23 +246,25 @@ sub check_divert ($) {
        die unless $parmt;
        $r->_db_perhaps_revoke($cookv);
        $r->_db_perhaps_revoke($parmv);
-       return 'LOGOUT';
+       $r->_queue_set_cookie('');
+       return 'REDIRECT-LOGGEDOUT';
     }
     if ($r->_ch('is_login')) {
        return 'NOCOOKIE' if !$cookt && $parmt eq 't';
        return 'LOGIN-STALE' if $parmt eq 'n';
-       $r->_db_perhpa
+       $r->_db_perhaps_revoke($cookv) 
+           if defined $cookv && !(defined $parmv && $cookv eq $parmv);
+       $r->_queue_set_cookie($parmv);
        my $username = $r->_ch('login_ok');
        return 'LOGIN-BAD' unless defined $username && length $username;
-       $r->_db_
-
-       }
-       
-
-       $r->_will_set_cookie('');
-       
+       $r->_db_record_login_ok($parmv,$username);
+       return 'REDIRECT-LOGGEDIN';
     }
-
+    if (!$r->{S}{promise_check_mutate}) {
+       something with method get, check parameter, etc.
+       return 'FRONTPAGE';
+    }
+    
 
 UP TO HERE