Skip to content

Make Nextcloud partial cache tamper test deterministic on Windows - #160

Merged
Ri0n merged 2 commits into
masterfrom
ai/fix-nextcloud-cache-tamper-test
Oct 26, 2026
Merged

Ri0n merged 2 commits into
masterfrom
ai/fix-nextcloud-cache-tamper-test

Conversation

@Ri0n

@Ri0n Ri0n commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Fixes the intermittent NextcloudStorageTest::encryptedNextcloudPartialCacheSurvivesRestartAndTamper failure on Windows Qt 6.12, observed in nightly job 121468115555.

The test overwrote a ciphertext byte with the constant 0x5e, which can already be present in randomly sealed ciphertext. In that case the record is unchanged and the expected WebDAV re-download correctly does not happen (server.requests().size() stays 5 rather than 7).

  • Find the actual downloaded chunk 0 rather than relying on directory traversal order.
  • XOR the original byte with 0x5e to guarantee a change, and verify the updated byte on disk before triggering the read.
  • Keep the strict 7-request and original pinned ETag assertions; no production cache logic or security checks are weakened.

Targeted regression test: nextcloudstorage_test.

@Ri0n
Ri0n merged commit 43bce52 into master Oct 26, 2026
8 checks passed
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