Skip to content

Commit

Permalink
Merge branch 'rel-10_1' into rel-11_0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven committed Nov 5, 2024
2 parents 40e15a8 + 6aab3eb commit 3eb47cd
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Kernel/System/Web/InterfaceAgent.pm
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,27 @@ sub Content {
);

if ( $PreAuth && $PreAuth->{RedirectURL} ) {

if ( $ConfigObject->Get('SessionUseCookie') ) {

# always set a cookie, so that
# we know already if the browser supports cookies.
# ( the session cookie isn't available at that time ).

my $Expires = '+' . $ConfigObject->Get('SessionMaxTime') . 's';
if ( !$ConfigObject->Get('SessionUseCookieAfterBrowserClose') ) {
$Expires = '';
}

# set a cookie tentatively for checking cookie support
$LayoutObject->SetCookie(
Key => 'OTOBOBrowserHasCookie',
Name => 'OTOBOBrowserHasCookie',
Value => 1,
Expires => $Expires,
);
}

$LayoutObject->Redirect(
ExtURL => $PreAuth->{RedirectURL},
); # throws a Kernel::System::Web::Exception
Expand Down
21 changes: 21 additions & 0 deletions Kernel/System/Web/InterfaceCustomer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,27 @@ sub Content {
);

if ( $PreAuth && $PreAuth->{RedirectURL} ) {

if ( $ConfigObject->Get('SessionUseCookie') ) {

# always set a cookie, so that
# we know already if the browser supports cookies.
# ( the session cookie isn't available at that time ).

my $Expires = '+' . $ConfigObject->Get('SessionMaxTime') . 's';
if ( !$ConfigObject->Get('SessionUseCookieAfterBrowserClose') ) {
$Expires = '';
}

# set a cookie tentatively for checking cookie support
$LayoutObject->SetCookie(
Key => 'OTOBOBrowserHasCookie',
Name => 'OTOBOBrowserHasCookie',
Value => 1,
Expires => $Expires,
);
}

$LayoutObject->Redirect(
ExtURL => $PreAuth->{RedirectURL},
); # throws a Kernel::System::Web::Exception
Expand Down

0 comments on commit 3eb47cd

Please sign in to comment.