Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(appconfig): returns correct value on details #44640

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

ArtificialOwl
Copy link
Member

fixing 2 issues:

  • --sensitive/--no-sensitive were not well processed when running occ config:app:set
  • getDetails() now returns correct (decrypted) value on sensitive data

Before

$ ./occ config:app:set myapp key2 --value 12343cc --sensitive 
Config value 'key2' for app 'myapp' is now set to '$AppConfigEncryption$71598bcf15f456ba7d37e4a80b04baa4|e8b8d16786364e91d65333c2456919c5|55769ff0d438c6fb261b70a7c211ab899c88cce9b472b5efe42e98db7abfe1c59900bd60a111769935bccedb7fc1ec9f1d66ba66d9ee38a13de8730a119826ba|3', stored as string in fast cache

After

$ ./occ config:app:set myapp key2 --value 12343cc --sensitive 
Config value 'key2' for app 'myapp' is now set to '12343cc', stored as string in fast cache

Also, when displaying details

Before

$ ./occ config:app:get myapp key2  --details 
  - app: myapp
  - key: key2
  - value: $AppConfigEncryption$f7caf4b86c21e1a4c6d8558ac031e71d|dfb2aafbc1390e938f71fed742527cf1|4c7622db35fc58e4ed620324ad2a0d16c19569cc7adb5099cb971f889217539423b9297bdbff5ce38ca57e688b575264c2bbe96442b7820944fe1bd7918eabdb|3
  - type: string
  - lazy: false
  - sensitive: true

After

$ ./occ config:app:get myapp key2  --details 
  - app: myapp
  - key: key2
  - value: 12343cc
  - type: string
  - lazy: false
  - sensitive: true

@ArtificialOwl
Copy link
Member Author

/backport to stable29

@ArtificialOwl ArtificialOwl added the 3. to review Waiting for reviews label Apr 3, 2024
@ArtificialOwl ArtificialOwl added this to the Nextcloud 29 milestone Apr 3, 2024
This was referenced Apr 4, 2024
@blizzz blizzz modified the milestones: Nextcloud 29, Nextcloud 30 Apr 8, 2024
@ArtificialOwl ArtificialOwl force-pushed the fix/noid/returns-real-value-on-details branch from e758e8b to eb19881 Compare April 17, 2024 17:21
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
@ArtificialOwl ArtificialOwl merged commit b75bb08 into master Apr 18, 2024
157 checks passed
@ArtificialOwl ArtificialOwl deleted the fix/noid/returns-real-value-on-details branch April 18, 2024 08:05
@blizzz blizzz mentioned this pull request Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants