[Bug]: Some DB entries and the encrypted files they point to have a size mismatch
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
⚠️ 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
- Vorherrschende Sprache
- PHP
- Sterne
- 37.5k
- Forks
- 5.4k
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 639
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nextcloud/server
-
35-feedback
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
0. Needs triage 35-feedback bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
workflowengine: File entity reuses the node of the first "Tag assigned" event for all later events in the same processEvtl. vergeben @lazerg hat das vor 2 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Contacts import aborts with TypeError when vCards have no UID (TextImporter structure)Evtl. vergeben @SebastianKrupinski hat das vor 6 Tagen übernommen. Offenbug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
nextcloud/server#66486 · 2 Kommentare · 2 Reaktionen · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Unified search: screen reader hears "No matching results" on mobile even when there are resultsEvtl. vergeben @lazerg hat das vor 10 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in nextcloud/server
Ähnliche Issues
-
[Sync EN] stream: document the errors of the stream_context_*() and stream filter functions (#6091)Offensync-en
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 79/100
Automattic/blocks-engine#6318 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Update: Laravel Cheat Sheet - middleware examples for the bootstrap/app.php layout (small update)Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
OWASP/CheatSheetSeries#2990 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag