Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Session] bad merge in PdoSessionHandler? #34995

Copy link
Copy link
Closed
@apfelbox

Description

@apfelbox
Issue body actions

Symfony version(s) affected: master

Description
I was just reading the code of the PdoSessionHandler, when I encountered something that looks like a bad merge:

$mergeStmt->bindValue(4, time() + $maxlifetime, \PDO::PARAM_INT);
$mergeStmt->bindValue(4, time(), \PDO::PARAM_INT);
$mergeStmt->bindParam(5, $data, \PDO::PARAM_LOB);
$mergeStmt->bindValue(6, time() + $maxlifetime, \PDO::PARAM_INT);
$mergeStmt->bindValue(6, time(), \PDO::PARAM_INT);

Just wanted somebody to confirm that. As bindValue just overwrites the previously set value, it seems that all sessions in SQLServer are immediately invalidated, as the last value bound to the expiry fields is just time().

How to reproduce
I don't run SQLServer, so I have no easy way to confirm this. Just wanted to confirm that I am not misreading the code.
I can try to then add a failing test case.

Possible Solution
Remove duplicate lines and only leave the ones with + $maxlifetime.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.