chiark / gitweb /
blinding: Move setting of Params into check_divert
[cgi-auth-flexible.git] / cgi-auth-flexible.pm
index 8f0538fbf1931ddd87447e583995034dec08a845..7542b21afeba6eea6e80f6f90b222fb44c3e4b74 100644 (file)
@@ -1033,6 +1033,11 @@ sub check_divert ($) {
 
     my $cookraw = $r->{_CookieRaw};
     $r->{CookieSecret} = $$cookraw;
+    if ($cookraw) {
+       $r->{Params}{$r->{S}{assoc_param_name}} = [
+           $r->hash($cookraw)
+           ];
+    }
 
     $r->_debug(Data::Dumper->Dump([$r->{Divert}],[qw(divert)]));
     return $r->{Divert};
@@ -1113,10 +1118,6 @@ sub check_ok ($) {
        return 0;
     }
 
-    if (defined $cookiesecret) {
-        $params->{$r->{S}{assoc_param_name}} = [ $r->hash($cookiesecret) ];
-    }
-
     my ($title, @body);
     if ($kind =~ m/^LOGIN-/) {
        $title = $r->_gt('Login');