dev/core#2663 - Setup - Consistently handle special characters per URL conventions
authorTim Otten <totten@civicrm.org>
Fri, 25 Jun 2021 22:12:14 +0000 (15:12 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 25 Jun 2021 23:24:41 +0000 (16:24 -0700)
commitdd589f53330d7015b2394e95eeabad1a2803ee72
tree1d2012a882057aa6e0905fbb08ba2577345d167c
parent3767fea89c6ff488fa2e4b457f74772c3027b77c
dev/core#2663 - Setup - Consistently handle special characters per URL conventions

Overview
--------

This addresses a problem with the setup UI when installing CiviCRM with certain database credentials.
Specifically, it handles special characters more correctly.

https://lab.civicrm.org/dev/core/-/issues/2663

Before
------

If the database password requires any special characters (e.g. "#" or "&"), then they cannot correctly
entered.

There are two ways you might try to enter a password (e.g.  plain
`mysql://myuser:top#secret...`or URL-encoded `mysql://myuser:top%23secret...`). Neither
of these work. (The plain notation might pass the validator, but it won't be written correctly to disk.
The URL-encoded notation won't pass the validator.)

After
-----

You may use special characters, as long as the URL is properly encoded, e.g. `mysql://myuser:top%23secret...`
setup/plugins/blocks/advanced.tpl.php
setup/plugins/installFiles/InstallSettingsFile.civi-setup.php
setup/src/Setup/DbUtil.php