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

Issue assigning database to user with '_' in database name #16994

Closed
stuchalk opened this issue Jul 6, 2021 · 1 comment · Fixed by #17010
Closed

Issue assigning database to user with '_' in database name #16994

stuchalk opened this issue Jul 6, 2021 · 1 comment · Fixed by #17010
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@stuchalk
Copy link

stuchalk commented Jul 6, 2021

Describe the bug

When a database name has a '' preceded by a digit in its name and a user is assigned to the database via the multiselect list on the 'database' tab of the 'Edit privileges' page, the name of the database is corrupted because of the '\' needed to escape the database name in the multiselect list. If additional databases with '', but no digit preceding, are selected they are also affected, whereas if only a database with a '_' and no digit preceding is selected it is not affected.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'phpmyadmin/index.php?route=/server/privileges&username=temp&hostname=localhost'
  2. Click on 'database' tab
  3. Choose database with '_' in name
  4. Click 'go'
  5. View list of databases assigned to user

Expected behavior

The database name assigned to user is the same as that chosen form the multiselect list

Screenshots

Screen Shot 2021-07-06 at 6 33 07 AM
Screen Shot 2021-07-06 at 6 33 38 AM

Server configuration

  • Operating system: macos
  • Web server: Apache/2.4.48
  • Database version: 10.3.28-MariaDB
  • PHP version: 7.4.20
  • phpMyAdmin version: 5.1.1

Client configuration

  • Browser: Chrome
  • Operating system: macos Big Sur

Additional context

I have seen this bug for a while. You can get around it by typing the database name in the box to the right of the multiselect list.

@williamdes
Copy link
Member

Hi @stuchalk

Thank you for reporting this issue !
It will be fixed soon

@williamdes williamdes added the Bug A problem or regression with an existing feature label Jul 10, 2021
@williamdes williamdes added this to Needs triage in issues via automation Jul 10, 2021
@williamdes williamdes added this to the 5.1.2 milestone Jul 10, 2021
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Jul 10, 2021
@williamdes williamdes self-assigned this Jul 13, 2021
@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Jul 13, 2021
williamdes added a commit that referenced this issue Jul 13, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jul 13, 2021
Pull-request: #17010
Ref: #16994

Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed Jul 13, 2021
williamdes added a commit that referenced this issue Jul 21, 2021
…g privileges to databases with '_'

Pull-request: #17015
Ref: #17010
Fixes: #16994

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jul 21, 2021
Pull-request: #17015
Ref: #16994

Signed-off-by: William Desportes <williamdes@wdes.fr>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

2 participants