Skip to content

Commit

Permalink
Bugfix: After providing registration data, an user is now logged in.
Browse files Browse the repository at this point in the history
Before that, the session cookie granted by the registration page was
1) only valid for the registration page and 2) already expired.
As a drive-by this also should close book:#41.
  • Loading branch information
HaraldJoerg committed May 2, 2019
1 parent 5dd3141 commit 7fee94e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Act/Middleware/Auth.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sub _login {
my $sid = Act::Util::create_session($user);
$resp->cookies->{'Act_session_id'} = {
value => $sid,
expires => 1,
path => '/',
};
}
sub _logout {
Expand All @@ -61,6 +61,7 @@ sub _set_session {
my $remember_me = shift;
$resp->cookies->{Act_session_id} = {
value => $sid,
path => '/',
$remember_me ? ( expires => time + 6*30*24*60*60 ) : (),
};
}
Expand Down

0 comments on commit 7fee94e

Please sign in to comment.