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
Add check for empty input to change_collation #15031
Conversation
Codecov Report
@@ Coverage Diff @@
## QA_4_8 #15031 +/- ##
============================================
- Coverage 55.68% 52.99% -2.69%
Complexity 14452 14452
============================================
Files 494 494
Lines 70878 64112 -6766
============================================
- Hits 39467 33976 -5491
+ Misses 31411 30136 -1275 |
Codecov Report
@@ Coverage Diff @@
## QA_4_8 #15031 +/- ##
=========================================
Coverage ? 55.56%
Complexity ? 14498
=========================================
Files ? 494
Lines ? 71071
Branches ? 0
=========================================
Hits ? 39494
Misses ? 31577
Partials ? 0 |
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.
@sijie123 Your PR works fine, can you implement the same check for tables ?
Currently, if an empty input is provided to change_collation, the behaviour is as if no user input were made. This causes a bug in db_operations.php, where a blank form will be returned to the user instead of an error message. By checking for empty($_REQUEST['db_collation']) separately, we can catch bad user input and return the appropriate error message. Signed-off-by: Si Jie <sijie123@gmail.com>
Fixes: phpmyadmin#14987 Signed-off-by: William Desportes <williamdes@wdes.fr>
Thanks for your initial contribution @sijie123 ! |
Description
Currently, if an empty input is provided to change_collation, the behaviour is as if no user input were made.
This causes a bug in db_operations.php, where a blank form will be returned to the user instead of an error message.
By checking for empty($_REQUEST['db_collation']) separately, we can catch bad user input and return the appropriate error message.
Fixes #14987
Before submitting pull request, please review the following checklist:
Signed-off-by
line as described in our DCO. This ensures that the work you're submitting is your own creation.For reviewer:
The github diff is misaligned. I essentially only added lines 86-88 and 136-144