We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On current main branch (and also on 8.2 branch) when I try to use a DB password containing a ?, then during the installation process I get this error:
main
?
make[1]: Entering directory '/home/jaap/domjudge/git/domjudge/webapp' composer auto-scripts Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 1 !! !! // Clearing the cache for the dev environment with debug true !! !! !! In ConnectionFactory.php line 262: !! !! Malformed parameter "url". !! !! !! In MalformedDsnException.php line 12: !! !! Malformed database connection URL !! !! !! cache:clear [--no-warmup] [--no-optional-warmers] !! !! make[1]: *** [Makefile:72: composer-autoclean] Error 1 make[1]: Leaving directory '/home/jaap/domjudge/git/domjudge/webapp' make: *** [/home/jaap/domjudge/git/domjudge/Makefile.global:81: inplace-install] Error 1
and I see these errors in the symfony logs:
[2024-08-17T09:05:38.278222+00:00] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\MalformedDsnException: "Malformed parameter "url"." at ConnectionFactory.php line 262 {"exception":"[object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed parameter \"url\". at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php:262)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed database connection URL at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/dbal/src/Exception/MalformedDsnException.php:12)\n[previous exception] [object] (PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) at /home/jaap/domjudge/git/domjudge/webapp/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php:426)"} [] [2024-08-17T09:05:38.393693+00:00] request.CRITICAL: Exception thrown when handling an exception (Doctrine\DBAL\Exception\MalformedDsnException: Malformed parameter "url". at ConnectionFactory.php line 262) {"exception":"[object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed parameter \"url\". at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php:262)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed database connection URL at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/dbal/src/Exception/MalformedDsnException.php:12)"} [] [2024-08-17T09:05:38.393797+00:00] php.CRITICAL: Uncaught Exception: Malformed parameter "url". {"exception":"[object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed parameter \"url\". at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php:262)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed database connection URL at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/dbal/src/Exception/MalformedDsnException.php:12)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed parameter \"url\". at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/doctrine-bundle/src/ConnectionFactory.php:262)\n[previous exception] [object] (Doctrine\\DBAL\\Exception\\MalformedDsnException(code: 0): Malformed database connection URL at /home/jaap/domjudge/git/domjudge/webapp/vendor/doctrine/dbal/src/Exception/MalformedDsnException.php:12)\n[previous exception] [object] (PDOException(code: 1045): SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO) at /home/jaap/domjudge/git/domjudge/webapp/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php:426)"} []
It seems that the password is stored and parsed from a URL and probably does not get URL encoded properly.
The text was updated successfully, but these errors were encountered:
I wonder if this is the same as #2502.
Sorry, something went wrong.
Quite likely, yes.
I suspect the problem is in: webapp/config/load_db_secrets.php
webapp/config/load_db_secrets.php
URL encode variables that go into a MySQL credentials URI
05e7160
See for reference: - https://dev.mysql.com/doc/refman/8.0/en/connecting-using-uri-or-key-value-pairs.html#connecting-using-uri - https://symfony.com/doc/current/doctrine.html but note that we must use `rawurlencode` instead of `urlencode` which differ in how they encode a space (as tested). Fixes: #2651 Closes: #2502 as this is likely fixed but I couldn't reproduce it
5bbe2ea
eldering
No branches or pull requests
On current
main
branch (and also on 8.2 branch) when I try to use a DB password containing a?
, then during the installation process I get this error:and I see these errors in the symfony logs:
It seems that the password is stored and parsed from a URL and probably does not get URL encoded properly.
The text was updated successfully, but these errors were encountered: