Skip to content

Commit 590275b

Browse files
committed
fix: corrected session issues
1 parent d566a73 commit 590275b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

phpmyfaq/src/Bootstrap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@
170170
ini_set('session.cookie_httponly', 'true');
171171
ini_set('session.cookie_secure', $request->isSecure());
172172
ini_set('url_rewriter.tags', '');
173+
ini_set('session.gc_maxlifetime', PMF_AUTH_TIMEOUT * 60);
174+
ini_set('session.cookie_lifetime', 0);
173175

174176
//
175177
// Start the PHP session
@@ -182,7 +184,7 @@
182184
}
183185

184186
//
185-
// Connect to LDAP server, when LDAP support is enabled
187+
// Connect to the LDAP server when LDAP support is enabled
186188
//
187189
if ($faqConfig->isLdapActive() && file_exists(PMF_CONFIG_DIR . '/ldap.php') && extension_loaded('ldap')) {
188190
$ldapConfig = new LdapConfiguration(PMF_CONFIG_DIR . '/ldap.php');

phpmyfaq/src/phpMyFAQ/Session/Token.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Token
2525
{
2626
final public const PMF_SESSION_NAME = 'pmf-csrf-token';
2727

28-
private const PMF_SESSION_EXPIRY = 1800;
28+
private const PMF_SESSION_EXPIRY = PMF_AUTH_TIMEOUT * 60;
2929

3030
private string $page;
3131

0 commit comments

Comments
 (0)