stable

Clone or download

Read-only

feat: Server url/secret validation via config-set

When we use `tuleap config-set` to configure the server url/secret, we should have same validation than when we use the web interface. For example I shouldn't be able to set a secret with less than 32 chars as per git #tuleap/stable/c4ce980d96fb37ff008288cea40f89ccf2944e6f Part of story #27555: display Office documents stored in the Document plugin Change-Id: I1fd263eebf3df5449047c4a7ac4a3529533c3776

Modified Files

Name
M plugins/onlyoffice/include/Administration/OnlyOfficeDocumentServerSettings.php +4 −0 Go to diff View file
M plugins/onlyoffice/include/Administration/OnlyOfficeSaveAdminSettingsController.php +7 −2 Go to diff View file
A plugins/onlyoffice/include/Administration/OnlyOfficeSecretKeyValidator.php +56 −0 Go to diff View file
A plugins/onlyoffice/include/Administration/OnlyOfficeServerUrlValidator.php +52 −0 Go to diff View file
M plugins/onlyoffice/include/onlyofficePlugin.php +2 −1 Go to diff View file
A plugins/onlyoffice/test/unit/Administration/OnlyOfficeSecretKeyValidatorTest.php +48 −0 Go to diff View file
A plugins/onlyoffice/test/unit/Administration/OnlyOfficeServerUrlValidatorTest.php +47 −0 Go to diff View file
M plugins/onlyoffice/tests/unit/Administration/OnlyOfficeSaveAdminSettingsControllerTest.php +2 −2 Go to diff View file
M src/common/CLI/Command/ConfigSetCommand.php +3 −0 Go to diff View file
M src/common/Config/ConfigKeyMetadata.php +8 −2 Go to diff View file
A src/common/Config/ConfigKeySecretValidator.php +38 −0 Go to diff View file
A src/common/Config/ConfigKeyValueValidator.php +37 −0 Go to diff View file
M src/common/Config/ConfigSet.php +8 −1 Go to diff View file
M src/common/Config/GetConfigKeys.php +14 −4 Go to diff View file
A src/common/Config/InvalidConfigKeyValueException.php +27 −0 Go to diff View file
A src/common/Config/SecretValidator.php +34 −0 Go to diff View file
A src/common/Config/ValueValidator.php +33 −0 Go to diff View file
A tests/unit/common/Config/ConfigSetTest.php +120 −0 Go to diff View file
A tests/unit/common/Config/ConfigSetTestSecretValidator.php +38 −0 Go to diff View file
A tests/unit/common/Config/ConfigSetTestValueValidator.php +37 −0 Go to diff View file
A tests/unit/common/Config/GetConfigKeysSecretValidator.php +40 −0 Go to diff View file
M tests/unit/common/Config/GetConfigKeysTest.php +41 −1 Go to diff View file
A tests/unit/common/Config/GetConfigKeysValueValidator.php +39 −0 Go to diff View file