chiark / gitweb /
blinding: Move another setting of Params into check_divert
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 25 Oct 2015 13:34:31 +0000 (13:34 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 25 Oct 2015 13:34:31 +0000 (13:34 +0000)
Previously, divert_ok had the knowledge of the need to set
the first of loggedout_param_names.  Put this into check_divert.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
cgi-auth-flexible.pm

index 7542b21afeba6eea6e80f6f90b222fb44c3e4b74..8eeea922f0ebd7e5b03347b2b1f44cb8f6d091c5 100644 (file)
@@ -819,7 +819,9 @@ sub _check_divert_core ($) {
        return ({ Kind => 'REDIRECT-LOGGEDOUT',
                  Message => $r->_gt("Logging out..."),
                  _CookieRaw => '',
-                 Params => { } });
+                 Params => {
+                     $r->{S}{loggedout_param_names}[0] => [ 1 ],
+                 } });
     }
     if ($r->_ch('is_loggedout')) {
        die unless $meth eq 'GET';
@@ -1100,7 +1102,6 @@ sub check_ok ($) {
        # for redirects, we honour stored Params and Cookie,
        # as we would for non-divert
        if ($kind eq 'REDIRECT-LOGGEDOUT') {
-           $params->{$r->{S}{loggedout_param_names}[0]} = [ 1 ];
        } elsif ($kind eq 'REDIRECT-LOGOUT') {
            $params->{$r->{S}{logout_param_names}[0]} = [ 1 ];
        } elsif ($kind =~ m/REDIRECT-(?:LOGGEDIN|HTTPS)/) {