Skip to content

Problem when the password of the database ends with '.' #2502

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
ljarevalo opened this issue Apr 22, 2024 · 2 comments
Open

Problem when the password of the database ends with '.' #2502

ljarevalo opened this issue Apr 22, 2024 · 2 comments

Comments

@ljarevalo
Copy link

Description of the problem

I want to inform you that there is a bug, I think, with the domserver installation. I have been searching for a week and I have not found any reference to it anywhere. In my case, I set the MySQL password that ends with the character '.' and the problem lies in the fact that when executing dj_setup_database, this character is treated as string concatenation, and consequently, the password doesn't work. I've solved the problem by changing the password.

Your environment

DOMjudge version (e.g. 8.3.2)
Operating system / Linux distribution and version (e.g. Ubuntu 22.04 and Debian 12)
Webserver (e.g. Apache)

Steps to reproduce

When the database passworkd ends with '.' and the command dj_setupdatabase is run: sudo bin/dj_setup_database -u root -r install, it doesn´t work since it is concatenated with more informatiion

sudo bin/dj_setup_database -u root -r install

Doctrine\DBAL\DBALException: "Malformed parameter "url".

@vmcj
Copy link
Member

vmcj commented Jul 27, 2024

Hi @ljarevalo,

I thought I could reproduce this locally but that was another issue. Can you provide more steps on how to reproduce? Did you use the tarball or docker?

I checked by starting a development container with our docker-compose and changing the passwords there to something ending with a .. That does work for me, also when I re-enter the container and use your specific invocation as you listed as steps to reproduce.

eldering added a commit that referenced this issue Aug 25, 2024
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
eldering added a commit that referenced this issue Aug 25, 2024
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
@ljarevalo
Copy link
Author

HI @vmcj

In docker, the installation works without any problems, however it only happened when the installations is made using a tarball installation.
Best regards, Luis

@eldering eldering self-assigned this Nov 22, 2024
eldering added a commit that referenced this issue Nov 22, 2024
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
eldering added a commit that referenced this issue Nov 23, 2024
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
eldering added a commit that referenced this issue Nov 24, 2024
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
meisterT pushed a commit to meisterT/domjudge that referenced this issue Nov 25, 2024
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: DOMjudge#2651
Closes: DOMjudge#2502 as this is likely fixed but I couldn't reproduce it
(cherry picked from commit abeefb3)
eldering added a commit that referenced this issue Nov 25, 2024
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
eldering added a commit that referenced this issue Nov 26, 2024
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
eldering added a commit that referenced this issue Nov 27, 2024
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
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants