Do not inadvertently autoviviy $divert as an arrayref.
If we do then the web app (or check_ok) sees it as trueish and will try
diverting with an empty divert spec, rather than seeing it as falseish
and correctly proceeding to do the real work.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
$dbh->commit();
my $divert = $r->{Divert};
- my $cookraw = $divert->{_CookieRaw};
- $divert->{CookieSecret} = $r->_blind($cookraw);
+ my $cookraw = $divert && $divert->{_CookieRaw};
if ($cookraw) {
+ $divert->{CookieSecret} = $r->_blind($cookraw);
$divert->{Params}{$r->{S}{assoc_param_name}} = [
$r->_blind($r->hash($cookraw))
];