phpmyadmin icon indicating copy to clipboard operation
phpmyadmin copied to clipboard

ServerConfigChecks: Link 'trusted proxies list' not terminated properly

Open kampalex opened this issue 5 years ago • 2 comments

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

kampalex avatar Apr 08 '21 18:04 kampalex

Hi @kampalex Thank you for reporting this issue !

williamdes avatar Apr 13 '21 15:04 williamdes

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

williamdes avatar Apr 13 '21 15:04 williamdes