Revision 5d275ec4
Von Moritz Bunkus vor fast 17 Jahren hinzugefügt
SL/Auth.pm | ||
---|---|---|
86 | 86 |
|
87 | 87 |
$self->{authenticator}->verify_config(); |
88 | 88 |
|
89 |
$self->{session_timeout} *= 1; |
|
90 |
$self->{session_timeout} = 8 * 60 if (!$self->{session_timeout}); |
|
91 |
|
|
89 | 92 |
$main::lxdebug->leave_sub(); |
90 | 93 |
} |
91 | 94 |
|
... | ... | |
423 | 426 |
$form = $main::form; |
424 | 427 |
|
425 | 428 |
$dbh = $self->dbconnect(); |
426 |
$query = qq|SELECT *, (mtime < (now() - '8h'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
|
|
429 |
$query = qq|SELECT *, (mtime < (now() - '$self->{session_timeout}m'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
|
|
427 | 430 |
|
428 | 431 |
$cookie = selectfirst_hashref_query($form, $dbh, $query, $session_id); |
429 | 432 |
|
... | ... | |
477 | 480 |
WHERE session_id IN |
478 | 481 |
(SELECT id |
479 | 482 |
FROM auth.session |
480 |
WHERE (mtime < (now() - '8h'::interval)))|;
|
|
483 |
WHERE (mtime < (now() - '$self->{session_timeout}m'::interval)))|;
|
|
481 | 484 |
|
482 | 485 |
do_query($main::form, $dbh, $query); |
483 | 486 |
|
484 | 487 |
$query = |
485 | 488 |
qq|DELETE FROM auth.session |
486 |
WHERE (mtime < (now() - '8h'::interval))|;
|
|
489 |
WHERE (mtime < (now() - '$self->{session_timeout}m'::interval))|;
|
|
487 | 490 |
|
488 | 491 |
do_query($main::form, $dbh, $query); |
489 | 492 |
|
config/authentication.pl.default | ||
---|---|---|
57 | 57 |
# Der Name des Cookies kann ge?ndert werden, sofern gew?nscht. |
58 | 58 |
# $self->{cookie_name} = 'lx_office_erp_session_id'; |
59 | 59 |
|
60 |
# Die Zeitspanne, bis eine inaktive Session ung?ltig wird, kann |
|
61 |
# hier ge?ndert werden. Der Standardwert ist acht Stunden. |
|
62 |
# Die Angabe ist in Minuten. |
|
63 |
# $self->{session_timeout} = 8 * 60; |
|
64 |
|
|
60 | 65 |
1; |
Auch abrufbar als: Unified diff
Das Session-Timeout konfigurierbar gemacht; Standardwert weiterhin acht Stunden.