Config Storage Prefix: Add basic validation
Summary: Closes T16142
Test Plan:
Try to set a very long value, like this, 100 characters:
./bin/config set storage.default-namespace looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooool
Enjoy the new validation message:
Usage Exception: Option "storage.default-namespace" is dangerously long for a database prefix in MySQL/MariaDB. The current value is 100 characters long but it should be less than 45 to be safe.
Try to set a value with a dot:
./bin/config set storage.default-namespace asd.asd
Enjoy the new validation message:
Usage Exception: Option "storage.default-namespace" only supports numbers,
letters, underscores and (for some reason) the dollar sign.
This is necessary to avoid potential MySQL/MariaDB escape issues.
Remove the invalid characters.
Set something good:
./bin/config set storage.default-namespace phabricator
No regressions.
Additionally, visit this page:
http://phorge.localhost/config/edit/storage.default-namespace/
No regressions.
Reviewers: O1 Blessed Committers, mainframe98
Reviewed By: O1 Blessed Committers, mainframe98
Subscribers: mainframe98, tobiaswiese, Matthew, Cigaryno
Maniphest Tasks: T16142
Differential Revision: https://we.phorge.it/D26284