Skip to content

phpMyAdmin unusable with user having WITH GRANT OPTION privileges and an existing Configuration Storage database #15123

Closed

Description

@williamdes

Describe the bug

All attempts to access tables, databases, anything is blocked.

To Reproduce

  • Create a user, GRANT him GRANT and select the option to create a database and give all privileges to the user.
  • Login to the user, try to browse his database

NOTE: the user can see other databases witch is for me quite strange.

Screenshots

User

Server configuration

  • phpMyAdmin version: 4.8.6, 5.0.0-dev

Activity

  1. added
    Bug
    on Mar 29, 2019
  2. williamdes commented on Mar 29, 2019

    @williamdes
    MemberAuthor

    Loading forever when clicking an owned database
    image

    When clicking onto a non owned database
    image

    The db structure page if you press F5 after selecting a database
    image

    The export page
    image

  3. williamdes commented on Mar 29, 2019

    @williamdes
    MemberAuthor

    And so much more, unusable.

  4. williamdes commented on Mar 29, 2019

    @williamdes
    MemberAuthor

    The storage analysis

    image

    As root there is no warning.

  5. ibennetch commented on Mar 30, 2019

    @ibennetch
    Member

    This is interesting because the ability to see all databases comes from MySQL directly, even when testing from the command-line client I can see all databases. The documentation doesn't seem to cover this scenario, so it's not clear whether it's a bug or the intended behavior.

    As for the rest, I'm having trouble reproducing. Have you configured the phpMyAdmin Configuration Storage database in config.inc.php along with a controluser? I have all of this configured. The export error and non-owned database error both seem to be related to the behavior of MySQL — currently, I believe phpMyAdmin tests if it sees the pmadb database (and probably the individual tables), but doesn't try to read or write data until it actually needs to. If MySQL would behave as one would expect, this wouldn't be a problem, but MySQL shows us the database and table but won't let us use it. That causes the error.

    I'm guessing a bit, but think a good solution would be to test if we're a user account that has WITH GRANT OPTION but not global or database-specific select/insert/update privileges for the pmadb, and bypass the Configuration Storage in that case. We can also add a bit to the documentation about how this won't work.

    The combination of no control user with an existing pmadb that the user has no privileges to use but can see causes errors in many ways. This is an interesting edge case.

  6. changed the title [-]phpMyAdmin unusable[/-] [+]phpMyAdmin unusable with user having WITH GRANT OPTION privileges and an existing Configuration Storage database[/+] on Mar 30, 2019
  7. williamdes commented on Mar 30, 2019

    @williamdes
    MemberAuthor

    Have you configured the phpMyAdmin Configuration Storage database in config.inc.php along with a controluser?

    I my config there is nothing more than simple multiple servers :)

    <?php
    declare(strict_types=1);
    $i = 0;
    $i++;
    $cfg['Servers'][$i]['verbose'] = 'MariaDB 1 (cookie)';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['host'] = 'mariadb1.phpmyadmin.local';
    $cfg['Servers'][$i]['compress'] = false;
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
    
    // And more servers
  8. added 2 commits that reference this issue on Nov 11, 2019
  9. added
    has-pr
    and removed on Nov 11, 2019
  10. added a commit that references this issue on Nov 11, 2019
    4c2d8a7
  11. self-assigned this
    on Nov 11, 2019
  12. added this to the 4.9.2 milestone on Nov 11, 2019
  13. locked as resolved and limited conversation to collaborators on Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bughas-pr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions