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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Query Generator backticks #19158

Merged

Conversation

faissaloux
Copy link
Contributor

@faissaloux faissaloux commented May 12, 2024

Hellooo 馃憢馃徎

In this PR I have fixed the issue with Query Generator that doesn't escape all the backticks when we have more than one.
It only escapes one backtick (The first one), so the issue appears if we have multiple backticks.

Like you can see in the example I'm showing you 3 different columns which contain different number of backticks:

  • `col_one: contains one backtick which is escaped as expected.
  • `col_two`: contains two backticks which only the first was escaped.
  • `col_`three`: contains three backticks which only the first was escaped.

This generates a non-valid query.

Before

Screenshot 2024-05-12 145321

After

All backticks escaped as expected.

Screenshot 2024-05-12 145140

Server configuration

  • phpMyAdmin version: 5.2.2-dev, 6.0.0-dev

Signed-off-by: faissaloux <fwahabali@gmail.com>
@MauricioFauth MauricioFauth merged commit 3dad383 into phpmyadmin:QA_5_2 May 23, 2024
30 checks passed
@MauricioFauth MauricioFauth self-assigned this May 23, 2024
@MauricioFauth MauricioFauth added this to the 5.2.2 milestone May 23, 2024
@faissaloux faissaloux deleted the fix-query-generator-backticks branch May 23, 2024 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants