[Bug]: Some DB entries and the encrypted files they point to have a size mismatch
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 48/100
Piste de recherche
Start by tracing how encrypted file sizes are written to oc_filecache and how WebDAV downloads use those values; the issue does not name a source file or test. Compare the binary and legacy base64 cases, including whether upgrades to Nextcloud 32 affect size updates. Done means identifying a reproducible cause and ensuring the database reports the correct size for the affected files.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
⚠️ This issue respects the following points: ⚠️
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
- This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
- I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
- I agree to follow Nextcloud's Code of Conduct.
- I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
I found 14 encrypted photos where size and unencrypted_size in oc_filecache are both zero, although the files on disk contain data. Nine use binary encoding and five use legacy base64.
I tested one binary-encrypted JPEG. Downloading it through WebDAV with rclone returned exit code 0, but the downloaded file was empty. Both database sizes stayed at zero after the download.
The size calculated from the encrypted file’s structure was 1,578,720 bytes. After setting both database size fields to that value, the download returned a JPEG of exactly that size without errors. I didn’t change the encrypted file, its keys, or its encryption version.
I don’t know what originally set the sizes to zero. One thing I noticed is that all 14 calculated sizes are exact multiples of the encryption block’s plaintext capacity—8,096 bytes for binary files or 6,072 for base64. That might be relevant?
I also encountered this, but this seems different: the example above uses binary encoding, and the sizes are zero rather than inflated.
I’ve left the other 13 entries unchanged. Is this a known issue, and what information would help investigate it?
Steps to reproduce
- There are no steps to reproduce it, I just scanned the database
Expected behavior
The DB should report the right size, not zero!
Nextcloud Server version
32
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
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
/var/www/nextcloud# sudo -u www-data php occ config:list system
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"0": "localhost",
"11": "***REMOVED SENSITIVE VALUE***",
"1": "10.0.3.10",
"5": "nextcloudpi.local",
"7": "nextcloudpi",
"8": "nextcloudpi.lan",
"3": "***REMOVED SENSITIVE VALUE***",
"14": "nextcloudpi"
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "33.0.10.1",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"tempdirectory": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"preview_max_x": "2048",
"preview_max_y": "2048",
"jpeg_quality": "60",
"overwriteprotocol": "https",
"maintenance": false,
"logfile": "\/var\/log\/nextcloud\/nextcloud.log",
"mail_sendmailmode": "smtp",
"loglevel": "2",
"log_type": "file",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"data-fingerprint": "***REMOVED SENSITIVE VALUE***",
"remember_login_cookie_lifetime": 60,
"session_lifetime": 600,
"session_keepalive": true,
"auto_logout": true,
"mail_smtpsecure": "tls",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"serverid": 246,
"config_preset": 2,
"allowed_admin_ranges": [
"192.168.8.0\/24"
]
}
}
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
- Langage dominant
- PHP
- Étoiles
- 37.5k
- Forks
- 5.4k
- Merge moyen
- 1 j 13 h
- PR mergées (30 j)
- 639
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de nextcloud/server
-
35-feedback
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
0. Needs triage 35-feedback bug
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 1 jour
-
workflowengine: File entity reuses the node of the first "Tag assigned" event for all later events in the same processPeut-être pris @lazerg l’a pris il y a 2 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
Contacts import aborts with TypeError when vCards have no UID (TextImporter structure)Peut-être pris @SebastianKrupinski l’a pris il y a 6 jours. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
nextcloud/server#66486 · 2 commentaires · 2 réactions · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Unified search: screen reader hears "No matching results" on mobile even when there are resultsPeut-être pris @lazerg l’a pris il y a 10 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de nextcloud/server
Issues similaires
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Ouvertesync-en
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
Automattic/blocks-engine#6318 ·
Les mainteneurs répondent en général sous 1 jour
-
Update: Laravel Cheat Sheet - middleware examples for the bootstrap/app.php layout (small update)Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
OWASP/CheatSheetSeries#2990 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour