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

Can't use search page when table have a special characters #16222

Closed
CarlosSLoureiro opened this issue Jun 24, 2020 · 10 comments · Fixed by #16240
Closed

Can't use search page when table have a special characters #16222

CarlosSLoureiro opened this issue Jun 24, 2020 · 10 comments · Fixed by #16240
Assignees
Labels
Bug A problem or regression with an existing feature
Projects
Milestone

Comments

@CarlosSLoureiro
Copy link

CarlosSLoureiro commented Jun 24, 2020

Describe the bug

I got error when I try to search in some table that contains special characters in the table name.

To Reproduce

Steps to reproduce the behavior:

  1. Create some table with a special character as "ç", "ã", "õ" and others.
  2. Select the created table.
  3. Click in the search button.

Expected behavior

The search page with the selected table columns as options to search/select.

Screenshots

error

Server configuration

  • Operating system: Windows Server 2016
  • Web server: Microsoft-IIS/10.0
  • Database version: MySQL 8.0.19
  • PHP version: 7.4.1
  • phpMyAdmin version: 5.0.2

Client configuration

  • Browser: Google Chrome Version 83.0.4103.116
  • Operating system: Windows 10

Additional context

In the screenshot I've reproduced the same problem in my own desktop using xampp 7.2.31

@williamdes williamdes added the Bug A problem or regression with an existing feature label Jun 24, 2020
@williamdes williamdes added this to Needs triage in issues via automation Jun 24, 2020
@williamdes williamdes added this to the 5.0.3 milestone Jun 24, 2020
@williamdes
Copy link
Member

Thank you for report, confirmed on my side

@williamdes
Copy link
Member

Master version seems not affected, but demo server has an error 500
@ibennetch Could you please send us the stacktrace ?

@williamdes
Copy link
Member

@Tithugues You where the author of this DI change, would you agree to try to fix this issue ?
Symphony thinks the value of the parameter is to be replaced by something

@Tithugues
Copy link
Contributor

I'll try to have a look in the next days.

@Tithugues
Copy link
Contributor

Just something not to forget. Looking at ASCII table, the "C3" could come from the "alt 199" which is usually a character displayed when not found.

Not sure at all that's it, but that maybe linked.

@williamdes
Copy link
Member

Thank you, #16225 seems to be similar

@williamdes williamdes moved this from Needs triage to High priority in issues Jun 25, 2020
@Tithugues
Copy link
Contributor

I don't have a fix for now, but maybe if I explain, someone would have an idea.

For many pages, we have this kind of dependencies which are defined:

$dependency_definitions = [
    'searchType' => 'normal',
    'url_query' => &$url_query,
];

The issue is that this $url_query looks like ?db=gh16222&table=gar%C3%A7on (table = garçon).

But... as this is a parameter, Symfony DI reads it and see %...%, so it considers this is a parameter that should be replaced...

How to fix this?

I would say that, before setting the parameter url_query, we should replace these encoded characters by something else, maybe the original character.

Just to let you know: currently, the URL is encoded here \PhpMyAdmin\Url::getCommonRaw with http_build_query.

@Tithugues
Copy link
Contributor

Can someone also try this fix please? I went through a few pages and didn't get the issue anymore. 🙏

@williamdes williamdes self-assigned this Jul 1, 2020
williamdes added a commit that referenced this issue Jul 1, 2020
… special characters

Merge: #16240
Fixes: #16222
Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Jul 1, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from High priority to Closed Jul 1, 2020
@williamdes
Copy link
Member

Fix confirmed, thank you so much !

@CarlosSLoureiro
Copy link
Author

Thank you

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 2, 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
Projects
issues
  
Closed
Development

Successfully merging a pull request may close this issue.

3 participants