Skip to content

fix: keep the settings page working when the API key cannot be decrypted - #90

Merged
oleksandr-nc merged 1 commit into
mainfrom
fix/admin-settings-decrypt
Jul 31, 2026
Merged

oleksandr-nc merged 1 commit into
mainfrom
fix/admin-settings-decrypt

Conversation

@oleksandr-nc

@oleksandr-nc oleksandr-nc commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Admin::getForm() decrypted the stored api_key with no guard. If the stored value is not valid ciphertext - set as plaintext via occ, or encrypted under a secret that has since changed - decrypt() throws out of getForm().

Now caught and logged as a warning, with the key treated as unset - the admin simply sees an empty API key field and can re-enter it

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Oleksander Piskun <oleksandr2088@icloud.com>
@oleksandr-nc
oleksandr-nc merged commit 184f751 into main Jul 31, 2026
16 checks passed
@oleksandr-nc
oleksandr-nc deleted the fix/admin-settings-decrypt branch July 31, 2026 07:37
michelleDeko added a commit to michelleDeko/integration_klipy that referenced this pull request Aug 16, 2026
Syncs the fork with nextcloud/integration_giphy up to 2.2.2 (14 commits).

Upstream changes taken:
- Nextcloud 35 support, IConfig resolved via container->get() instead of query()
- Keep the admin settings page working when the stored API key cannot be
  decrypted (nextcloud#90), plus the accompanying AdminTest unit test
- nextcloud/coding-standard 1.5 + cs:fix (import blank lines, migration header)
- CI: node-build.yml replaced by node.yml, new psalm.yml, action bumps
  (checkout v7.0.1, setup-node v7.0.0, pr-feedback-action)
- Build tooling: node/npm engines, quoted stylelint patterns, dropped stylelint
  rules removed upstream, corrected SPDX license id (APL -> AGPL)
- Translation updates for el, et_EE, fr, lt_LT, sv, tr

Fork adaptations applied on top:
- Kept the Klipy branding: namespace OCA\Klipy, app id integration_klipy,
  Klipy wording in the new decrypt-failure log message and AdminTest
- Translation updates remapped from the Giphy source strings to the Klipy ones;
  upstream keys with no Klipy equivalent (rating filter levels, the Giphy
  developer-settings sentence) were dropped
- node.yml runs on ubuntu-latest instead of the Nextcloud-internal
  ubuntu-latest-low runner label, which does not resolve in this fork
- Kept the fork's conditional signing/publishing in appstore-build-publish.yml
- Version 3.0.1

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant