Skip to content

Database username sanitization causes connection error #212

@thekumi

Description

@thekumi

Branch

On which branch did you notice this bug?

  • stable
  • release-candidate
  • develop

Description

Since 5104f02, the database test step of the installation runs Sanitiser::getText on the provided database username (but not any of the other provided values). This replaces some characters which are perfectly acceptable in MySQL usernames, such as underscores, with HTML entities. For example, providing the username wishthis_dev will actually try using wishthis_dev.

To make matters worse, in the error modal that pops up, the username is rendered as wishthis_dev again, so to see the cause of the problem, you have to actually check the MySQL server's logs.

Meanwhile, back in install.php, it looks like it actually still uses the original value provided, unsanitized, so the database test actually potentially tests different credentials from the ones used down the line.

I have solved this issue locally by just reverting 5104f02, but I suppose there is a reason why sanitization was added for this specific field?

Disclaimer

wishthis is entirely built in my free time, mostly without any pay or code contributors. While I am doing my best to help out everybody, I cannot guarantee that I will find the time or have the competence to help you out.

I greatly appreciate that you are filing a bug report, these help tremendously! Thank you!

  • I understand that wishthis depends on volunteer work and that I am not entitled to any kind of support

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions