Skip to content

Create a oneliner Session::getToken()#20135

Merged
MauricioFauth merged 1 commit intophpmyadmin:masterfrom
kamil-tekiela:Session-getToken
Feb 20, 2026
Merged

Create a oneliner Session::getToken()#20135
MauricioFauth merged 1 commit intophpmyadmin:masterfrom
kamil-tekiela:Session-getToken

Conversation

@kamil-tekiela
Copy link
Copy Markdown
Contributor

@kamil-tekiela kamil-tekiela commented Feb 19, 2026

Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
@liviuconcioiu
Copy link
Copy Markdown
Contributor

This fixes the problem.

@kamil-tekiela
Copy link
Copy Markdown
Contributor Author

It shouldn't. I didn't change any logic.

@liviuconcioiu
Copy link
Copy Markdown
Contributor

I see that in the code, but the issue got away.

@liviuconcioiu
Copy link
Copy Markdown
Contributor

liviuconcioiu commented Feb 19, 2026

If you add this code in getJsParams, the session is there. Before this, the session was empty. Somehow is related to that PR.

        var_dump(Session::getToken());
        exit;

string(32) "615267496f747e22553346552b3b5051"

@liviuconcioiu
Copy link
Copy Markdown
Contributor

liviuconcioiu commented Feb 19, 2026

@kamil-tekiela you were right.

$_SESSION is empty even with this PR, but getToken returns the token.

        var_dump($_SESSION);
        exit;

@liviuconcioiu
Copy link
Copy Markdown
Contributor

Refreshing the logout page, returns the session:

19.02.2026_22.49.06_REC.mp4

@kamil-tekiela
Copy link
Copy Markdown
Contributor Author

@MauricioFauth Git bisect shows that the test failure is due to 2e1c947 but I am not sure why. Any ideas?

@MauricioFauth
Copy link
Copy Markdown
Member

MauricioFauth commented Feb 20, 2026

This fixes the issue #20112, because Session::getToken() checks if the array key ' PMA_token ' exists. There's no issue in using an empty string as token for that part of the logout logic, as it is irrelevant. It doesn't need the HTML header to do a redirection.

@MauricioFauth MauricioFauth merged commit 86eeab5 into phpmyadmin:master Feb 20, 2026
74 of 77 checks passed
@MauricioFauth MauricioFauth self-assigned this Feb 20, 2026
@MauricioFauth MauricioFauth added this to the 6.0.0 milestone Feb 20, 2026
@kamil-tekiela kamil-tekiela deleted the Session-getToken branch February 20, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[6.0]: ErrorException: Undefined array key " PMA_token "

3 participants