Skip to content

Fix #17452 - Binary logs fetching for super users only#20222

Open
gs71 wants to merge 1 commit intophpmyadmin:QA_5_2from
gs71:patch-3
Open

Fix #17452 - Binary logs fetching for super users only#20222
gs71 wants to merge 1 commit intophpmyadmin:QA_5_2from
gs71:patch-3

Conversation

@gs71
Copy link
Copy Markdown
Contributor

@gs71 gs71 commented Mar 7, 2026

Description

Prevent a regular user to try to fetch binalry logs, generating useless errors in the SQL errors log file.

Fixes #17452

Before submitting pull request, please review the following checklist:

  • 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.

Signed-off-by: Guido Selva guido.selva@gmail.com

Copy link
Copy Markdown
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this seems okay from a first glance I think there is cases where the user is not a super user but only has the BINLOG MONITOR privilege

} else {
$binaryLogs = $this->dbi->fetchResult('SHOW BINARY LOGS', 'Log_name');
SessionCache::set('binary_logs', $binaryLogs);
if ($isSuperUser) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ($isSuperUser) {
$binaryLogs = null;
if ($isSuperUser) {

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.

3 participants