[phpmyadmin/phpmyadmin] 366d16: Fix #19841 - Strip port from host when linking to user privileges in processes list
Branch: refs/heads/master Home: https://github.com/phpmyadmin/phpmyadmin Commit: 366d1659820f750272005c22d79d8f941a422988 https://github.com/phpmyadmin/phpmyadmin/commit/366d1659820f750272005c22d79d... Author: Dennis Vorobyov <roadhero@gmail.com> Date: 2026-05-25 (Mon, 05 May 2026) +01:00 Changed paths: M libraries/classes/Server/Status/Processes.php M templates/server/status/processes/list.twig Log Message: ----------- Fix #19841 - Strip port from host when linking to user privileges in processes list The Host column of SHOW PROCESSLIST contains the client connection address in "hostname:port" format (e.g., localhost:64776). Passing this directly as the hostname URL parameter to /server/privileges causes the user lookup to fail, since mysql.user.Host stores bare hostnames without port numbers. Strip the trailing port suffix before building the privileges link URL. The Host column display is unchanged. Signed-off-by: Dennis Vorobyov <roadhero@gmail.com> Commit: 544839869dfa0097b86cbcdfd53a1839aefb867a https://github.com/phpmyadmin/phpmyadmin/commit/544839869dfa0097b86cbcdfd53a... Author: Dennis Vorobyov <roadhero@gmail.com> Date: 2026-05-25 (Mon, 05 May 2026) +01:00 Changed paths: M test/classes/Controllers/Server/Status/Processes/RefreshControllerTest.php M test/classes/Stubs/DbiDummy.php Log Message: ----------- Fix #19841 - Add test coverage for port-stripping in processes privileges link Update the processlist test fixture to use a host with a port suffix (Host1:12345) and assert that the rendered privileges link URL contains the bare hostname while the Host column display retains the full value. Signed-off-by: Dennis Vorobyov <roadhero@gmail.com> Commit: 2a4a8e480a709d133f0616e5b4b18902449444ef https://github.com/phpmyadmin/phpmyadmin/commit/2a4a8e480a709d133f0616e5b4b1... Author: Richard Brinkman <richardbrinkman@hotmail.com> Date: 2026-07-26 (Sun, 07 July 2026) +02:00 Changed paths: M src/Table/Search.php Log Message: ----------- Fix #20395: quote search term for inet4 fields Signed-off-by: Richard Brinkman <richardbrinkman@hotmail.com> Commit: 6c1568b15b0297c138d8fccf3f199fcb7eb9cb49 https://github.com/phpmyadmin/phpmyadmin/commit/6c1568b15b0297c138d8fccf3f19... Author: Kamil Tekiela <tekiela246@gmail.com> Date: 2026-08-17 (Mon, 08 August 2026) +01:00 Changed paths: M libraries/classes/Controllers/View/CreateController.php M libraries/classes/SystemDatabase.php M phpstan-baseline.neon M psalm-baseline.xml M test/classes/SystemDatabaseTest.php Log Message: ----------- Move getColumnMapFromSql into the method Signed-off-by: Kamil Tekiela <tekiela246@gmail.com> Commit: 80638e83715989398034651d66ad96f53885a24e https://github.com/phpmyadmin/phpmyadmin/commit/80638e83715989398034651d66ad... Author: Kamil Tekiela <tekiela246@gmail.com> Date: 2026-08-17 (Mon, 08 August 2026) +01:00 Changed paths: M libraries/classes/DatabaseInterface.php M libraries/classes/Dbal/DbalInterface.php M libraries/classes/Table.php M test/classes/DatabaseInterfaceTest.php M test/classes/Http/Factory/ServerRequestFactoryTest.php M test/classes/Stubs/DbiDummy.php M test/classes/TableTest.php Log Message: ----------- Add LIMIT 0 when fetching metadata Signed-off-by: Kamil Tekiela <tekiela246@gmail.com> Commit: 9c8246a127e17300624d54540f625692805a8bac https://github.com/phpmyadmin/phpmyadmin/commit/9c8246a127e17300624d54540f62... Author: βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π) <coool@mail.lv> Date: 2026-08-30 (Sun, 08 August 2026) +02:00 Changed paths: M po/lv.po Log Message: ----------- Translated using Weblate (Latvian) Currently translated at 41.7% (1433 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/lv/ Signed-off-by: "βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π)" <coool@mail.lv> Commit: 111993769e8fd2a05a3e013804460c18c2af27db https://github.com/phpmyadmin/phpmyadmin/commit/111993769e8fd2a05a3e01380446... Author: hoanghuy309 <hoanghuy309@gmail.com> Date: 2026-08-30 (Sun, 08 August 2026) +02:00 Changed paths: M po/vi.po Log Message: ----------- Translated using Weblate (Vietnamese) Currently translated at 89.3% (3070 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/vi/ Signed-off-by: hoanghuy309 <hoanghuy309@gmail.com> Commit: eee3cd458aa265b6062afd0eed7668818a030857 https://github.com/phpmyadmin/phpmyadmin/commit/eee3cd458aa265b6062afd0eed76... Author: βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π) <coool@mail.lv> Date: 2026-08-30 (Sun, 08 August 2026) +02:00 Changed paths: M po/lv.po Log Message: ----------- Translated using Weblate (Latvian) Currently translated at 41.7% (1434 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/lv/ Signed-off-by: "βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π)" <coool@mail.lv> Commit: 669f8d17bc767e3955aacda3ceb36345c1bd48db https://github.com/phpmyadmin/phpmyadmin/commit/669f8d17bc767e3955aacda3ceb3... Author: βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π) <coool@mail.lv> Date: 2026-08-31 (Mon, 08 August 2026) +02:00 Changed paths: M po/lv.po Log Message: ----------- Translated using Weblate (Latvian) Currently translated at 43.4% (1492 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/lv/ Signed-off-by: "βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π)" <coool@mail.lv> Commit: 64c6890d6cbfe30eab8ef0d324a67dade6105cf1 https://github.com/phpmyadmin/phpmyadmin/commit/64c6890d6cbfe30eab8ef0d324a6... Author: βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π) <coool@mail.lv> Date: 2026-09-01 (Tue, 09 September 2026) +00:00 Changed paths: M po/lv.po Log Message: ----------- Translated using Weblate (Latvian) Currently translated at 44.5% (1530 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/lv/ Signed-off-by: "βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π)" <coool@mail.lv> Commit: 5f1ae11fc4902c936026fe51a130bbae45329465 https://github.com/phpmyadmin/phpmyadmin/commit/5f1ae11fc4902c936026fe51a130... Author: hoanghuy309 <hoanghuy309@gmail.com> Date: 2026-09-01 (Tue, 09 September 2026) +00:00 Changed paths: M po/vi.po Log Message: ----------- Translated using Weblate (Vietnamese) Currently translated at 89.4% (3075 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/vi/ Signed-off-by: hoanghuy309 <hoanghuy309@gmail.com> Commit: cae0175274389d21ce74d6bb6ab1c3d91ddcad8d https://github.com/phpmyadmin/phpmyadmin/commit/cae0175274389d21ce74d6bb6ab1... Author: βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π) <coool@mail.lv> Date: 2026-09-02 (Wed, 09 September 2026) +00:00 Changed paths: M po/lv.po Log Message: ----------- Translated using Weblate (Latvian) Currently translated at 45.8% (1574 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/lv/ Signed-off-by: "βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π)" <coool@mail.lv> Commit: 3b46e5b869044c7aa2adc63f531e1d5a569041f9 https://github.com/phpmyadmin/phpmyadmin/commit/3b46e5b869044c7aa2adc63f531e... Author: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> Date: 2026-09-03 (Thu, 09 September 2026) +02:00 Changed paths: M libraries/classes/Plugins/Transformations/Input/Text_Plain_JsonEditor.php M libraries/classes/Plugins/Transformations/Input/Text_Plain_SqlEditor.php M libraries/classes/Plugins/Transformations/Input/Text_Plain_XmlEditor.php M libraries/classes/Plugins/Transformations/Output/Text_Plain_Json.php M libraries/classes/Plugins/Transformations/Output/Text_Plain_Sql.php M libraries/classes/Plugins/Transformations/Output/Text_Plain_Xml.php Log Message: ----------- Fix Uncaught ReferenceError: CodeMirror is not defined Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> Commit: 1730b7c0bfb36ff75c0ce3b2eb6b9f8e357b9c7b https://github.com/phpmyadmin/phpmyadmin/commit/1730b7c0bfb36ff75c0ce3b2eb6b... Author: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> Date: 2026-09-03 (Thu, 09 September 2026) +02:00 Changed paths: M test/classes/Http/Factory/ServerRequestFactoryTest.php Log Message: ----------- Remove useless parentheses Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> Commit: 55d948539fc508c24a36b7cadb4eb380528d2bf8 https://github.com/phpmyadmin/phpmyadmin/commit/55d948539fc508c24a36b7cadb4e... Author: William Desportes <williamdes@wdes.fr> Date: 2026-09-03 (Thu, 09 September 2026) +02:00 Changed paths: M libraries/classes/Plugins/Transformations/Input/Text_Plain_JsonEditor.php M libraries/classes/Plugins/Transformations/Input/Text_Plain_SqlEditor.php M libraries/classes/Plugins/Transformations/Input/Text_Plain_XmlEditor.php M libraries/classes/Plugins/Transformations/Output/Text_Plain_Json.php M libraries/classes/Plugins/Transformations/Output/Text_Plain_Sql.php M libraries/classes/Plugins/Transformations/Output/Text_Plain_Xml.php Log Message: ----------- Merge #20471 - Fix Uncaught ReferenceError: CodeMirror is not defined Pull-request: #20471 Signed-off-by: William Desportes <williamdes@wdes.fr> Commit: e81c6111e0fbbb7625266b942371ba0a3fb1ae6e https://github.com/phpmyadmin/phpmyadmin/commit/e81c6111e0fbbb7625266b942371... Author: William Desportes <williamdes@wdes.fr> Date: 2026-09-03 (Thu, 09 September 2026) +02:00 Changed paths: M libraries/classes/Server/Status/Processes.php M templates/server/status/processes/list.twig M test/classes/Controllers/Server/Status/Processes/RefreshControllerTest.php M test/classes/Stubs/DbiDummy.php Log Message: ----------- Merge #20315 - Fix #19841 - Strip port from host when linking to user privileges in processes list Pull-request: #20315 Fixes: #19841 Signed-off-by: William Desportes <williamdes@wdes.fr> Commit: 2345f83d7dc17a67aa278a0c33bfb8e9cd2bcfd5 https://github.com/phpmyadmin/phpmyadmin/commit/2345f83d7dc17a67aa278a0c33bf... Author: William Desportes <williamdes@wdes.fr> Date: 2026-09-03 (Thu, 09 September 2026) +02:00 Changed paths: M libraries/classes/Controllers/View/CreateController.php M libraries/classes/DatabaseInterface.php M libraries/classes/Dbal/DbalInterface.php M libraries/classes/SystemDatabase.php M libraries/classes/Table.php M phpstan-baseline.neon M psalm-baseline.xml M test/classes/DatabaseInterfaceTest.php M test/classes/Http/Factory/ServerRequestFactoryTest.php M test/classes/Stubs/DbiDummy.php M test/classes/SystemDatabaseTest.php M test/classes/TableTest.php Log Message: ----------- Merge #20426 - Fix #20425 - OOM error when creating a view Pull-request: #20426 Fixes: #20425 Signed-off-by: William Desportes <williamdes@wdes.fr> Commit: e3e3c63f653366325de4b31e2e30c8158553b22a https://github.com/phpmyadmin/phpmyadmin/commit/e3e3c63f653366325de4b31e2e30... Author: MaurΓcio Meneghini Fauth <mauricio@mfauth.com.br> Date: 2026-09-05 (Sat, 09 September 2026) -03:00 Changed paths: Log Message: ----------- Merge pull request #20473 from liviuconcioiu/phpcs Remove useless parentheses Commit: 8525d24e0981ec46b04599b00a56317e2ac1d558 https://github.com/phpmyadmin/phpmyadmin/commit/8525d24e0981ec46b04599b00a56... Author: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> Date: 2026-09-07 (Mon, 09 September 2026) +02:00 Changed paths: M libraries/classes/Table/Search.php Log Message: ----------- Fix search of INET4 with = operator Signed-off-by: Liviu-Mihail Concioiu <liviu.concioiu@gmail.com> Co-authored-by: Richard Brinkman <richardbrinkman@no-reply.github.com> Commit: afaeacecc9ede4a7de235d472780d73b314960fa https://github.com/phpmyadmin/phpmyadmin/commit/afaeacecc9ede4a7de235d472780... Author: βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π) <coool@mail.lv> Date: 2026-09-07 (Mon, 09 September 2026) +02:00 Changed paths: M po/lv.po Log Message: ----------- Translated using Weblate (Latvian) Currently translated at 46.5% (1598 of 3436 strings) [ci skip] Translation: phpMyAdmin/5.2 Translate-URL: https://hosted.weblate.org/projects/phpmyadmin/5-2/lv/ Signed-off-by: "βπ π π π (πππ₯ππ¦π.ππ π/βπ π π π)" <coool@mail.lv> Commit: 3d2594b2d384f87bf395896c95ccc90a6336a671 https://github.com/phpmyadmin/phpmyadmin/commit/3d2594b2d384f87bf395896c95cc... Author: William Desportes <williamdes@wdes.fr> Date: 2026-09-07 (Mon, 09 September 2026) +02:00 Changed paths: M libraries/classes/Table/Search.php Log Message: ----------- Merge #20474 - Fix search of INET4 with = operator Pull-request: #20474 Signed-off-by: William Desportes <williamdes@wdes.fr> Commit: 725a767cc5994dae3f95b63f242e27cc01917ee5 https://github.com/phpmyadmin/phpmyadmin/commit/725a767cc5994dae3f95b63f242e... Author: William Desportes <williamdes@wdes.fr> Date: 2026-09-07 (Mon, 09 September 2026) +02:00 Changed paths: M src/Table/Search.php Log Message: ----------- Merge #20398 - Fix #20395 - quote search term for inet4 fields Pull-request: #20398 Fixes: #20395 Signed-off-by: William Desportes <williamdes@wdes.fr> Commit: 11781494195b5125c2e7a5a64f19c39036bc3d9a https://github.com/phpmyadmin/phpmyadmin/commit/11781494195b5125c2e7a5a64f19... Author: William Desportes <williamdes@wdes.fr> Date: 2026-09-07 (Mon, 09 September 2026) +02:00 Changed paths: M resources/templates/server/status/processes/list.twig M src/Plugins/Transformations/Input/Text_Plain_JsonEditor.php M src/Plugins/Transformations/Input/Text_Plain_SqlEditor.php M src/Plugins/Transformations/Input/Text_Plain_XmlEditor.php M src/Plugins/Transformations/Output/Text_Plain_Json.php M src/Plugins/Transformations/Output/Text_Plain_Sql.php M src/Plugins/Transformations/Output/Text_Plain_Xml.php M src/Server/Status/Processes.php M src/SystemDatabase.php M src/Table/Table.php M tests/unit/Controllers/Server/Status/Processes/RefreshControllerTest.php M tests/unit/Stubs/DbiDummy.php M tests/unit/SystemDatabaseTest.php M tests/unit/Table/ColumnsDefinitionTest.php M tests/unit/Table/TableTest.php Log Message: ----------- Merge branch 'QA_5_2' QA_5_2 still lives in libraries/classes/ and test/classes/; master moved to src/ and tests/unit/. Seven files therefore arrived as "deleted by us" and had to be ported by hand rather than merged. Upstream commit roll-call (060391b9a7..3d2594b2d3, 15 non-merge commits). The 5 merge commits in that range were checked with `git show --cc` and are all empty, so they contribute no content of their own: 366d165982 ported Strip port from host in processes privileges link 544839869d ported Test coverage for the port-stripping 80638e8371 ported Add LIMIT 0 when fetching metadata (4 of 7 hunks; see below for the 3 that do not apply) 3b46e5b869 ported Fix Uncaught ReferenceError: CodeMirror is not defined 8525d24e09 already in Fix search of INET4 with = operator 1730b7c0bf no-op Remove useless parentheses 6c1568b15b skipped Move getColumnMapFromSql into the method afaeacecc9, cae0175274, 64c6890d6c, 669f8d17bc, eee3cd458a, 9c8246a127, 5f1ae11fc4, 111993769e not taken Translated using Weblate (lv, vi) Conflict resolutions, file by file: * src/Server/Status/Processes.php Ported 366d165982 (#20315 / #19841): expose a 'user_host' row key holding the host with any `:port` suffix stripped. Adapted to master's lower-cased array keys from array_change_key_case(). * resources/templates/server/status/processes/list.twig The privileges link now uses row.user_host instead of row.host, so the hostname matches mysql.user.Host, which never contains a port. * src/Plugins/Transformations/{Input/Text_Plain_{Json,Sql,Xml}Editor, Output/Text_Plain_{Json,Sql,Xml}}.php Ported 3b46e5b869. Kept master's Config::getInstance()->config->CodemirrorEnable accessor and expressed the HTTP_USER_AGENT check with Core::getEnv() rather than $_SERVER, to match the same #20159 guard already present in src/Header.php:225. * src/SystemDatabase.php Ported the memory part of #20426 only: getColumnMapFromSql() now wraps the query as `SELECT * FROM (...) AS tmp LIMIT 0` (80638e8371) so a large VIEW cannot exhaust memory while only its column metadata is wanted. This is where libraries/classes/DatabaseInterface.php's hunk landed: the method moved from the DBAL to SystemDatabase on master. Deliberately did NOT port 6c1568b15b "Move getColumnMapFromSql into the method": that commit exists to stop 5.2's CreateController from running the view query when there is no transformation data, but master already only calls it inside `if ($pmaTransformationData !== false)` (src/Controllers/View/CreateController.php:205), and getExistingTransformationData() returns false precisely when browserTransformationFeature is null. Porting the signature churn would have degraded master's SystemColumn[] API for no behaviour gain, so src/Controllers/View/CreateController.php is left untouched and that commit's phpstan/psalm baseline hunks are moot. * src/Table/Table.php Ported 80638e8371: getColumnsMeta() uses `LIMIT 0` instead of `LIMIT 1`. * src/Table/Search.php Resolved as ours. QA_5_2's 8525d24e09 is the same fix master already carries via 725a767cc5 (#20398 / #20395), only expressed against the refactored $needsQuoting code. No change needed. * tests/unit/Controllers/Server/Status/Processes/RefreshControllerTest.php Ported 544839869d: covers both that the Host column still shows the port and that the privileges link does not. Added the trailing comma PHPCS (SlevomatCodingStandard.Functions.RequireTrailingCommaInCall) requires. * tests/unit/Stubs/DbiDummy.php Two fixtures updated, both kept in master's compact single-line style: the PROCESSLIST row now returns 'Host1:12345' to exercise port stripping (544839869d), and the `testdb`.`mytable` select moved from LIMIT 1 to LIMIT 0 (80638e8371). * tests/unit/Table/TableTest.php and tests/unit/SystemDatabaseTest.php Expected queries updated for the two changes above (`LIMIT 0`, and `SELECT * FROM (PMA_sql_query) AS tmp LIMIT 0`). The latter is where test/classes/DatabaseInterfaceTest.php's hunk landed, following the method from the DBAL to SystemDatabase. * tests/unit/Table/ColumnsDefinitionTest.php Not a conflicted file, but a master-only fixture that had to follow Table::getColumnsMeta(): the query is now `LIMIT 0` and returns no rows. Incoming changes with no master counterpart: * libraries/classes/Dbal/DbalInterface.php Dropped. The interface does not exist on master, so 80638e8371's rename of its getColumnMapFromSql() parameter has nothing to apply to. * test/classes/Http/Factory/ServerRequestFactoryTest.php 1730b7c0bf is a no-op here: master's tests/unit/Http/Factory/ServerRequestFactoryTest.php contains no `(new ReflectionMethod(ServerRequestFactory...))` construct at all, the test having been rewritten. Note that rename detection wrongly paired this file with tests/unit/Http/Factory/UriFactoryTest.php, which was therefore resolved as ours and is unchanged. * phpstan-baseline.neon, psalm-baseline.xml Resolved as ours; the baselines are branch-specific. * resources/po/lv.po, resources/po/vi.po Resolved as ours, dropping the 8 Weblate commits listed above. This matches how all eight previous "Merge branch 'QA_5_2'" commits were resolved (6f427d8785, ccf4064698, fe4be26eeb, 055f071473, 28cd3776d2, 3b4defeb35, ff06deaca2 all have a zero-file po diff against their first parent); master runs its own Weblate component. Also removed the empty libraries/ and test/ directories the merge left behind. Verification: `phpunit --testsuite unit` 5668 tests / 18476 assertions OK, `phpcs` clean, `phpstan analyse` reports no errors. `psalm` reports one UnusedBaselineEntry for src/Utils/HttpRequest.php, which is pre-existing on master (neither that file nor psalm-baseline.xml is touched by this merge). Signed-off-by: William Desportes <williamdes@wdes.fr> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
participants (1)
-
Dennis Vorobyov