Skip to content

Fix signon credentials not being removed on logout - #20567

Open
boonstraworks wants to merge 1 commit into
phpmyadmin:QA_5_2from
boonstraworks:fix/17457-signon-logout
Open

boonstraworks wants to merge 1 commit into
phpmyadmin:QA_5_2from
boonstraworks:fix/17457-signon-logout

Conversation

@boonstraworks

Copy link
Copy Markdown

Description

When using the signon authentication, logging out only destroyed the phpMyAdmin session. The credentials in the single signon session (PMA_single_signon_user, PMA_single_signon_password, ...) were left in place, so readCredentials() read them again on the next request and the user was logged back in without entering any credentials, for example by using the browser's back button.

AuthenticationSignon now overrides logOut(): it opens the single signon session, removes the credentials phpMyAdmin reads from it, switches back to the phpMyAdmin session and then runs the regular logout. Only the PMA_single_signon_* keys phpMyAdmin reads are removed; the rest of the single signon session belongs to the external application and is left untouched.

The new test testAuthLogoutClearsSignonCredentials fails without this change. The two existing logout tests now set SignonSession, which always exists at runtime (it defaults to '' in config.default.php).

Fixes #17457

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch. For example, for bug fixes in a released version use the corresponding QA branch and for new features use the master branch. If you have a doubt, you can ask as a comment in the bug report or on the mailing list.
  • Every commit has proper Signed-off-by line as described in our DCO. This ensures that the work you're submitting is your own creation.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.
  • Any new functionality is covered by tests.

Logging out with the signon authentication only destroyed the phpMyAdmin
session. The credentials in the single signon session were kept, so the
next request read them again and logged the user back in.

Remove the credentials phpMyAdmin reads from the single signon session
when logging out.

Fixes phpmyadmin#17457

Signed-off-by: Steven <info@boonstraworks.nl>
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.

1 participant