From 75f96dbe2a96bfbf323b7d48e447b9f57e8f78c5 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 27 Oct 2015 16:46:50 +0000 Subject: [PATCH] blinding: Fix move of Params setting into check_divert We were setting various things in $r rather than $r->{Divert}. Signed-off-by: Ian Jackson --- cgi-auth-flexible.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cgi-auth-flexible.pm b/cgi-auth-flexible.pm index d3d9517..b4985ca 100644 --- a/cgi-auth-flexible.pm +++ b/cgi-auth-flexible.pm @@ -1036,16 +1036,17 @@ sub check_divert ($) { $r->{Divert} = $r->_db_transaction(sub { $r->_check_divert_core(); }); $dbh->commit(); - my $cookraw = $r->{_CookieRaw}; - $r->{CookieSecret} = $r->_blind($cookraw); + my $divert = $r->{Divert}; + my $cookraw = $divert->{_CookieRaw}; + $divert->{CookieSecret} = $r->_blind($cookraw); if ($cookraw) { - $r->{Params}{$r->{S}{assoc_param_name}} = [ + $divert->{Params}{$r->{S}{assoc_param_name}} = [ $r->_blind($r->hash($cookraw)) ]; } - $r->_debug(Data::Dumper->Dump([$r->{Divert}],[qw(divert)])); - return $r->{Divert}; + $r->_debug(Data::Dumper->Dump([$divert],[qw(divert)])); + return $divert; } sub get_divert ($) { -- 2.30.2