Make Imaginary work with server-side encryption
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- Nextcloud Server is running on 64bit capable CPU, PHP and OS.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
When using server-side encryption, if you enable the usage of Imaginary micro service, all picture are sent encrypted to imaginary, making the micro service totally useless ( and silently, you can only check that by seeing errors 400 in imaginary log, instead of normal 200 answers)
Steps to reproduce
- Setup nextcloud with server side encryption
- Enable Imaginary micro service
- See that imaginary cannot generate preview
Expected behavior
Previews are correctly generated ( by not using Imaginary with server side encryption, or by having the server unencrypt files before sending them to imaginary)
Installation method
Community Manual installation with Archive
Operating system
RHEL/CentOS
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
{
"system": {
"log_type": "syslog",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"updatechecker": false,
"check_for_working_htaccess": false,
"asset-pipeline.enabled": false,
"assetdirectory": "\/var\/lib\/nextcloud",
"preview_libreoffice_path": "\/usr\/bin\/libreoffice",
"apps_paths": [
{
"path": "\/home\/nextcloud\/www\/nextcloud\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/home\/nextcloud\/data\/apps",
"url": "\/apps-appstore",
"writable": true
}
],
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"cloud.offmysoul.me"
],
"dbtype": "mysql",
"mysql.utf8mb4": true,
"version": "24.0.5.1",
"overwrite.cli.url": "https:\/\/cloud.offmysoul.me",
"installed": true,
"theme": "",
"loglevel": 2,
"maintenance": false,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\Redis",
"filelocking.enabled": true,
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 1.5,
"dbindex": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"updater.release.channel": "stable",
"app_install_overwrite": [
"sharerenamer",
"files_reader",
"flowupload"
],
"encryption.legacy_format_support": false,
"encryption.key_storage_migrated": false,
"enabledPreviewProviders": [
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\Krita",
"OC\\Preview\\Imaginary"
],
"preview_imaginary_url": "http:\/\/xxx.xxx.xxx.xxx:9000",
"preview_max_x": "2048",
"preview_max_y": "2048",
"jpeg_quality": "60"
}
}
List of activated Apps
Enabled:
- accessibility: 1.10.0
- activity: 2.16.0
- admin_audit: 1.14.0
- analytics: 4.4.0
- camerarawpreviews: 0.8.0
- circles: 24.0.1
- cloud_federation_api: 1.7.0
- comments: 1.14.0
- contacts: 4.2.1
- contactsinteraction: 1.5.0
- dav: 1.22.0
- encryption: 2.12.0
- federatedfilesharing: 1.14.0
- federation: 1.14.0
- files: 1.19.0
- files_antivirus: 3.3.1
- files_pdfviewer: 2.5.0
- files_rightclick: 1.3.0
- files_sharing: 1.16.2
- files_trashbin: 1.14.0
- files_versions: 1.17.0
- files_videoplayer: 1.13.0
- firstrunwizard: 2.13.0
- logreader: 2.9.0
- lookup_server_connector: 1.12.0
- metadata: 0.16.0
- notifications: 2.12.1
- oauth2: 1.12.0
- password_policy: 1.14.0
- photos: 1.6.0
- previewgenerator: 5.1.0
- privacy: 1.8.0
- provisioning_api: 1.14.0
- recommendations: 1.3.0
- serverinfo: 1.14.0
- settings: 1.6.0
- sharebymail: 1.14.0
- sharerenamer: 3.0.1
- support: 1.7.0
- survey_client: 1.12.0
- systemtags: 1.14.0
- text: 3.5.1
- theming: 1.15.0
- twofactor_backupcodes: 1.13.0
- updatenotification: 1.14.0
- user_status: 1.4.0
- viewer: 1.8.0
- weather_status: 1.4.0
- workflowengine: 2.6.0
Disabled:
- bruteforcesettings: 2.4.0
- calendar: 3.5.0
- dashboard: 7.3.0
- deck: 1.7.1
- files_accesscontrol: 1.14.1
- files_external
- files_reader: 1.5.3
- files_readmemd: 1.2.2
- files_texteditor: 2.14.0
- flowupload: 1.1.3
- fulltextsearch: 24.0.0
- gallery: 18.4.0
- groupfolders: 12.0.1
- imageconverter: 1.3.2
- integration_github: 1.0.4
- integration_twitter: 1.0.3
- maps: 0.2.1
- nextcloud_announcements: 1.4.0
- ojsxc: 5.0.0
- user_ldap
- user_pwauth: 2.7.2
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
No response
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the OC\Preview\Imaginary provider named in enabledPreviewProviders and the server-side encryption file-read path. Reproduce the setup described in the issue, then verify that previews are generated successfully and Imaginary receives usable image data rather than encrypted content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100