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

Fix falsely assumes session was already started #16047

Merged
merged 1 commit into from Jun 10, 2020
Merged

Fix falsely assumes session was already started #16047

merged 1 commit into from Jun 10, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Jun 9, 2020

fix https://wordpress.org/support/topic/an-error-occurred-session-already-started/#topic-12961322-replies

refs matomo-org/matomo-for-wordpress#304

Adding this to 3.X as needed for Matomo for WordPress.

The removed code should actually not be needed as we added a while ago session_status() to correctly check if a session is already active or not. SID constant is not reliable.

In this case problem was this https://3v4l.org/bpUFK

Basically a session was started by some other plugin causing the SID constant to be set. The plugin also directly closed the session again so we still attempted to start the session (which is correct). But then Zend falsely assumes session is started because of the SID constant when there is actually no session.

SID is not reliable for this purpose and be better to rely on session_status() which we added a while back

fix https://wordpress.org/support/topic/an-error-occurred-session-already-started/#topic-12961322-replies

The code should actually not be needed as we added a while ago `session_status()` to correctly check if a session is already active or not. SID constant is not realiable.

In this case problem was this https://3v4l.org/bpUFK

Basically a session was started by some other plugin causing the SID constant to be set. The plugin also directly closed the session again so we still attempted to start the session (which is correct). But then Zend falsely assumes session is started because of the SID constant when there is actually no session.

SID is not reliable for this purpose and be better to rely on `session_status()` which we added a while back
@tsteur tsteur added the Needs Review PRs that need a code review label Jun 9, 2020
@tsteur tsteur added this to the 3.13.7 milestone Jun 9, 2020
@tsteur tsteur merged commit 5dd7d4f into 3.x-dev Jun 10, 2020
@tsteur tsteur deleted the zendsession branch June 10, 2020 20:17
jonasgrilleres pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 22, 2020
fix https://wordpress.org/support/topic/an-error-occurred-session-already-started/#topic-12961322-replies

The code should actually not be needed as we added a while ago `session_status()` to correctly check if a session is already active or not. SID constant is not realiable.

In this case problem was this https://3v4l.org/bpUFK

Basically a session was started by some other plugin causing the SID constant to be set. The plugin also directly closed the session again so we still attempted to start the session (which is correct). But then Zend falsely assumes session is started because of the SID constant when there is actually no session.

SID is not reliable for this purpose and be better to rely on `session_status()` which we added a while backa
jbuget pushed a commit to 1024pix/pix-analytics that referenced this pull request Sep 26, 2020
fix https://wordpress.org/support/topic/an-error-occurred-session-already-started/#topic-12961322-replies

The code should actually not be needed as we added a while ago `session_status()` to correctly check if a session is already active or not. SID constant is not realiable.

In this case problem was this https://3v4l.org/bpUFK

Basically a session was started by some other plugin causing the SID constant to be set. The plugin also directly closed the session again so we still attempted to start the session (which is correct). But then Zend falsely assumes session is started because of the SID constant when there is actually no session.

SID is not reliable for this purpose and be better to rely on `session_status()` which we added a while backa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants