Skip to content

Conversation

@julien-nc
Copy link
Member

for sensitive admin settings and fix mistake: saving dummy values in admin settings.

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc requested a review from kyteinsky as a code owner October 16, 2024 10:36
if (in_array($key, ['client_id', 'client_secret', 'default_link_token'], true)) {
$this->secretService->setEncryptedAppValue($key, $value);
} else {
$this->config->setAppValue(Application::APP_ID, $key, $value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's throw a bad request response here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Where?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the else block since this function should only serve to sensitive values. It would be cleaner but is fine either way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine to set any value with this setSensitiveAdminConfig endpoint.
We just want to prevent using wrong keys in the setAdminConfig endpoint.

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
@julien-nc julien-nc merged commit ad03a21 into main Oct 17, 2024
45 checks passed
@julien-nc julien-nc deleted the enh/noid/password-confirmation branch October 17, 2024 08:26
@julien-nc julien-nc mentioned this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants