Repository navigation
lib/model: Fix file size inconsistency due to enc. trailer - #8840
Merged
calmh merged 1 commit intoMar 28, 2023
Merged
Conversation
Fixes a regression due to PR syncthing#8563, while arguable the bug was actually introduced in a much older PR syncthing#7155, but didn't have any bad effects so far: We account for the encryption trailer in the db updater routine, calculating the file-info size there. However there's no guarantee that the file-info at this point is still the exact same as when it was written. It was before, but isn't anymore since introducing the new EncryptedTrailerSize field. Fix: Adjust the size in the info at the same place where the trailer is written, i.e. we definitely have the actual size on disk.
Member
Author
|
This is a fix that should go into the current release/next RC, as it concerns a new change. |
calmh
approved these changes
Mar 28, 2023
calmh
added a commit
to calmh/syncthing
that referenced
this pull request
Apr 14, 2023
* main: (28 commits) build: Update dependencies (syncthing#8869) lib/model: Improve path generation for auto accepted folders (fixes syncthing#8859) (syncthing#8860) docs: fix typo (syncthing#8857) gui, man, authors: Update docs, translations, and contributors lib/syncthing: Handle successful global migration (fixes syncthing#8851) (syncthing#8852) gui, man, authors: Update docs, translations, and contributors lib/model: Set enc. trailer size on pull (ref syncthing#8563, syncthing#8556) (syncthing#8839) lib/model: Fix file size inconsistency due to enc. trailer (syncthing#8840) gui, man, authors: Update docs, translations, and contributors cmd/stdiscorv: Fix database test (fixes syncthing#8828) lib/ur: Fix custom releases URL comparison gui: Remove untranslated strings from JSON files (syncthing#8836) all: Fix typos found by codespell (syncthing#8833) gui: Hide download progress legend when download progress is disabled gui, man, authors: Update docs, translations, and contributors lib/protocol: Handle encrypted requests without encrypted hash (fixes syncthing#8277) (syncthing#8827) build(deps): bump github.com/hashicorp/golang-lru/v2 from 2.0.1 to 2.0.2 (syncthing#8826) lib/config: Allow sub-second watcher delay (fixes syncthing#7859) (syncthing#7864) gui, man, authors: Update docs, translations, and contributors lib/protocol: Cache expensive key operations (fixes syncthing#8599) (syncthing#8820) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a regression due to PR #8563, while arguable the bug was actually introduced in a much older PR #7155, but didn't have any bad effects so far:
We account for the encryption trailer in the db updater routine, calculating the file-info size there. However there's no guarantee that the file-info at this point is still the exact same as when it was written. It was before, but isn't anymore since introducing the new EncryptedTrailerSize field.
Fix: Adjust the size in the info at the same place where the trailer is written, i.e. we definitely have the actual size on disk.