Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SessionInternal::clear() erroneously calls start_session() when session is still open #31248

Closed
rotdrop opened this issue Feb 18, 2022 · 2 comments · Fixed by #31286
Closed
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug

Comments

@rotdrop
Copy link
Contributor

rotdrop commented Feb 18, 2022

SessionInternal::clear() does strange things:

public function clear() {
$this->invoke('session_unset');
$this->regenerateId();
$this->startSession(true);
$_SESSION = [];
}

Error: session_start(): Ignoring session_start() because a session is already active at /var/www/localhost/htdocs/nextcloud-git/lib/private/Session/Internal.php#208 
  1. session_unset() -- ok, destroys all values
  2. regenerateId() -- ok, generate a new session id
  3. start_session() -- oops. But the session is still open.

So either the start_session is superfluous and can be omitted -- at least in current versions of php -- or there is missing something like a session_destroy() (but then regenerate_id() could be omitted?) or a session_write_close() which would write the (now empty) session file to disk.

@rotdrop rotdrop changed the title SessionInternal::clear() erroneously tries calls start_session() when session is still open SessionInternal::clear() erroneously calls start_session() when session is still open Feb 18, 2022
@rotdrop rotdrop added the bug label Feb 20, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Feb 20, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Feb 20, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Feb 21, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Feb 24, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 3, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 5, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 9, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 11, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 18, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 22, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 24, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 11, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 18, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 30, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue May 1, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue May 19, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue May 19, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue May 22, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue May 25, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 1, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 2, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 2, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 2, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 3, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 7, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 9, 2022
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 3, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 7, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 14, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 16, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 16, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 24, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Mar 26, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 5, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 7, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 15, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 15, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 25, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 25, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 27, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 27, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Apr 30, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue May 5, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue May 18, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 1, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 13, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 15, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 15, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 15, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 28, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jun 30, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jul 11, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Jul 11, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Aug 1, 2023
rotdrop added a commit to rotdrop/nextcloud-server that referenced this issue Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants