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

No quotes when field type is int #13326

Closed
OlafvdSpek opened this issue May 30, 2017 · 7 comments
Closed

No quotes when field type is int #13326

OlafvdSpek opened this issue May 30, 2017 · 7 comments
Assignees
Labels
Bug A problem or regression with an existing feature good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete ui Issues relating to the user interface
Projects
Milestone

Comments

@OlafvdSpek
Copy link

OlafvdSpek commented May 30, 2017

https://demo.phpmyadmin.net/QA_4_9/tbl_select.php?db=sakila&table=actor

SELECT * FROM `actor` WHERE `actor_id` = test LIMIT 0, 25 :(

I think it should put quotes around test..

@williamdes
Copy link
Member

@OlafvdSpek Why ?

@williamdes williamdes added the question Used when we need feedback from the submitter or when the issue is a question about PMA label Oct 28, 2018
@OlafvdSpek
Copy link
Author

Because otherwise it's interpreted as a column name.

@williamdes williamdes self-assigned this Mar 31, 2019
@OlafvdSpek
Copy link
Author

Why was this closed?

@williamdes
Copy link
Member

Okay, now a screenshot is a minimum, I found a way to reproduce this.
And the real issue is that you should no allow the user to enter a string, like it is done on the Insert page

Search

Search

Insert

Insert

@williamdes williamdes reopened this Mar 31, 2019
@williamdes williamdes added Bug A problem or regression with an existing feature ui Issues relating to the user interface good first issue and removed question Used when we need feedback from the submitter or when the issue is a question about PMA labels Mar 31, 2019
@OlafvdSpek
Copy link
Author

I think this isn't just an UI issue. Backend should also validate / quote.

@williamdes williamdes added this to To be sorted in issues May 2, 2019
@williamdes williamdes moved this from To be sorted to Reproduced in issues May 3, 2019
@williamdes williamdes removed their assignment May 13, 2019
@rahgurung
Copy link
Contributor

Can someone help me reproduce this error?

@williamdes
Copy link
Member

@gurrrung

First create a table with a int type

CREATE TABLE `test-13326` (
  `abc` int(11) NOT NULL
) ENGINE=InnoDB;

Go to "Search"

Fill the field with a string and submit

it's interpreted as a column name.

Expected behavior

Add quotes or forbid using non integer values

beekalam added a commit to beekalam/phpmyadmin that referenced this issue Oct 27, 2019
Signed-off-by: beekalam <beekalam@gmail.com>
@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 Dec 3, 2019
@williamdes williamdes moved this from Reproduced to ready to merge in issues Dec 3, 2019
@williamdes williamdes self-assigned this Jan 24, 2020
@williamdes williamdes added this to the 5.0.2 milestone Jan 24, 2020
williamdes added a commit that referenced this issue Jan 24, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from ready to merge to Closed Jan 24, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 24, 2021
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 good first issue has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete ui Issues relating to the user interface
Projects
issues
  
Closed
3 participants