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

ServerConfigChecks: Link 'trusted proxies list' not terminated properly #16798

Closed
kampalex opened this issue Apr 8, 2021 · 2 comments
Closed
Assignees
Labels
Bug A problem or regression with an existing feature translation ui Issues relating to the user interface
Projects
Milestone

Comments

@kampalex
Copy link
Contributor

kampalex commented Apr 8, 2021

Describe the bug

The entire 'Servers' and 'Configuration' fieldsets are clickable due to not terminated link within one of the (hidden) messages.

https://github.com/phpmyadmin/phpmyadmin/blob/master/libraries/classes/Config/ServerConfigChecks.php#L178

            $sSecurityInfoMsg = Sanitize::sanitizeMessage(sprintf(
                __(
                    'If you feel this is necessary, use additional protection settings - '
                    . '%1$shost authentication%2$s settings and %3$strusted proxies list%4%s. '
                    . 'However, IP-based protection may not be reliable if your IP belongs '
                    . 'to an ISP where thousands of users, including you, are connected to.'
                ),
                '[a@' . Url::getCommon(['page' => 'servers', 'mode' => 'edit', 'id' => $i]) . '#tab_Server_config]',
                '[/a]',
                '[a@' . Url::getCommon(['page' => 'form', 'formset' => 'Features']) . '#tab_Security]',
                '[/a]'
            ));

The last %s is included in the resulting text, but it should contain the 4th replacement. The %s must be $s.

                    . '%1$shost authentication%2$s settings and %3$strusted proxies list%4%s. '

It seems like an easy fix in code. The big thing is... every translation file contains the same issue as above (which means a lot of work).

To Reproduce

Steps to reproduce the behavior:

  1. Go to Setup (path-to-PMA)/setup/
  2. In Overview, add/edit a Server.
  3. Select tab Authentication
  4. Select Authentication type = config
  5. Click Apply
  6. Result as shown in the screenshot below

When retrieving the Overview later, the message is hidden but the behavior is still the same.

Screenshots

overview-trusted-proxies-list

Client/Server configuration

  • Operating system: Windows 10 20H2
  • Web server: Apache 2.4.46
  • Database version: MariaDB 10.4.10
  • PHP version: 8.0.1
  • phpMyAdmin version: 5.1.0
  • Browser: Google Chrome 89
@williamdes williamdes added Bug A problem or regression with an existing feature translation ui Issues relating to the user interface labels Apr 13, 2021
@williamdes williamdes added this to the 5.1.1 milestone Apr 13, 2021
@williamdes williamdes self-assigned this Apr 13, 2021
@williamdes williamdes added this to Needs triage in issues via automation Apr 13, 2021
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Apr 13, 2021
@williamdes
Copy link
Member

Hi @kampalex
Thank you for reporting this issue !

williamdes added a commit that referenced this issue Apr 13, 2021
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from to be fixed soon to Closed Apr 13, 2021
@williamdes
Copy link
Member

It seems like an easy fix in code. The big thing is... every translation file contains the same issue as above (which means a lot of work).

Hopefully a vscode search an replace did the work, all translations should remain alright

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2022
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 translation ui Issues relating to the user interface
Projects
issues
  
Closed
Development

No branches or pull requests

2 participants