You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bdc8d9f
Browse filesBrowse the repository at this point in the historyBrowse files
Since Nextcloud 29 every request loads the non-lazy app config rows of
every app. All of this app's values were read and written through the
deprecated IConfig::getAppValue() and setAppValue(), and setAppValue()
always stores a key as non-lazy, although only dashboard_enabled and
issue_notifications_enabled are read on every request, in
Application::register().
Every read and write of an app config key now goes through the typed
methods of IAppConfig, and every delete through its deleteAppValue():
the app-scoped IAppConfig in the app's code, and OCP\IAppConfig in the
two migrations. The OAuth client id and secret, the default link token,
use_popup, link_preview_enabled, the two allow_default_link_token_*
switches and the default token's user_name and user_displayname pass
lazy: true on every read and write, because a read without it can
return the default once the key is lazy, and a write without it makes
the key non-lazy again. dashboard_enabled and
issue_notifications_enabled stay non-lazy. Stored values keep their
format, and the secrets stay encrypted with ICrypto.
Besides the three secrets, the two admin endpoints wrote any key the
request carried. Written lazily, the server's own enabled key would
make the app look disabled, so setAdminConfig() now accepts only the
six switches of the admin settings and setSensitiveAdminConfig() only
the three secrets, both only as strings, and they answer 400 without
writing anything otherwise.
A new migration marks the lazy keys lazy on existing installs with
IAppConfig::updateLazy(). The unit tests pin the flag and the default
of each call, which of the app's keys, the server's own keys and an
unknown key each endpoint accepts, and the keys the migration marks.
Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
0 commit comments