Skip to content

Commit

Permalink
[ticket/17296] Enforce unique session entry for admin user with delete
Browse files Browse the repository at this point in the history
PHPBB3-17296
  • Loading branch information
marc1706 committed Mar 19, 2024
1 parent 9c51a78 commit b4a343b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/functional/session_page_update_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,17 @@ public function setUp(): void

$db = $this->db;

// Delete previous session info for admin user
$sql = 'DELETE FROM ' . SESSIONS_TABLE . ' WHERE session_user_id = 2';
$db->sql_query($sql);

$this->login();
}

public function test_session_page_update()
{
$db = $this->get_db();

// Sleep for 2 seconds to ensure we don't have session time race condition
sleep(2);

// Request index page
self::request('GET', 'index.php');
$this->assertEquals(200, self::$client->getResponse()->getStatus());
Expand Down

0 comments on commit b4a343b

Please sign in to comment.