Bug #95131 Underscore as wildcard isn't escaped while select from schema list
Submitted: 25 Apr 2019 11:25 Modified: 20 Jun 2019 19:57
Reporter: Christopher Lorenz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0, 8.0.16 OS:Any
Assigned to: CPU Architecture:Any

[25 Apr 2019 11:25] Christopher Lorenz
Description:
While adding privileges for a user in MySQL Workbench and there are any schema with underscore (_) it isn't escaped after choose from list. This leads to that the wildcard charater will be active. So if you add privileges using this wizard you may automaticly grant other schema by this wildcard character.

How to repeat:
- Connect to Server
- Goto User and Privileges
- Select a user 
- Select Tab Schema Privileges
- Click on Add Entry ...
- Choose Selected scheam: information_schema
- Select any or none privileges
- Apply
- The Schema will be saved with wildcard character

So you have same privileges for informationTschema

or Schema foo_bar also covered foodbar

Suggested fix:
After selecting a schema from this chooser it should be escaped:
information_schema => information\_schema
[25 Apr 2019 11:52] MySQL Verification Team
Hello Christopher Lorenz,

Thank you for the report.
Verified as described.

regards,
Umesh
[11 Jun 2019 17:17] Miguel Tadeu Mota
Posted by developer:
 
commit id: c4f3bca18f9af21d0048c5ba640dce2dbe56c185
[20 Jun 2019 19:57] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Workbench 8.0.18 release, and here's the changelog entry:

Underscore (_) characters in a schema name were converted to the
equivalent wildcard characters when schema privileges were applied to a
user account in MySQL Workbench.

Thank you for the bug report.