-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
infoschema: improve the security vunerability of schemata infoschema table #14003
Conversation
expression: fixed json type for truncate (#13064)
Codecov Report
@@ Coverage Diff @@
## master #14003 +/- ##
================================================
- Coverage 80.2502% 80.1784% -0.0718%
================================================
Files 482 482
Lines 121166 120813 -353
================================================
- Hits 97236 96866 -370
- Misses 16205 16215 +10
- Partials 7725 7732 +7 |
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
schemataTester.MustQuery("select count(*) from information_schema.SCHEMATA;").Check(testkit.Rows("2")) | ||
schemataTester.MustQuery("select * from information_schema.SCHEMATA;").Check( | ||
testkit.Rows("def INFORMATION_SCHEMA utf8mb4 utf8mb4_bin <nil>", "def mysql utf8mb4 utf8mb4_bin <nil>")) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test case that querying information_schema by a user whose username is empty, which means the query is an internal SQL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the case is in 450 line of this file, a new tk and tk.MustQuery() will create a user whose username is empty.
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve
…table (pingcap#14003) * add check for information_schema.schemata * Update tables_test.go * update
What problem does this PR solve?
improve the security vunerability of schemata infoschema table
related to #209
What is changed and how it works?
before:new user both can get the whole data of information_schema.schemata
after:the new user can only get an one row set in which SCHEMA_NAME is INFORMATION_SCHEMA.
Check List
Tests
Code changes
Side effects
None
Related changes
None