Skip to content

Commit 4cfe165

Browse files
cuppettartonge
andcommitted
fix(encryption): Simplify evaluation in AppConfigController
Co-authored-by: Louis <louis@chmn.me> Signed-off-by: Stephen Cuppett <steve@cuppett.com>
1 parent 62e1b2d commit 4cfe165

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

apps/provisioning_api/lib/Controller/AppConfigController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,7 @@ protected function verifyConfigKey(string $app, string $key, string $value) {
203203
throw new \InvalidArgumentException('The given key can not be set');
204204
}
205205

206-
if ($app === 'core' && $key === 'encryption_enabled'
207-
&& !in_array(strtolower(trim($value)), ['yes', '1', 'true', 'on'], true)) {
206+
if ($app === 'core' && $key === 'encryption_enabled' && $value !== 'yes') {
208207
throw new \InvalidArgumentException('The given key can not be set');
209208
}
210209

0 commit comments

Comments
 (0)