Skip to content

Conversation

imsodin
Copy link
Member

@imsodin imsodin commented Mar 28, 2023

In the original fix in #8563 I simply forgot this. Which meant #8556 wasn't actually fixed, as the trialer size would have been 0 (default), and thus we would have still sent the inflated size to encrypted peers.

@imsodin
Copy link
Member Author

imsodin commented Mar 28, 2023

This is a fix that should go into the current release/next RC, as it concerns a new change.

@calmh
Copy link
Member

calmh commented Mar 28, 2023

(Conflict to resolve)

It strikes me that we write a FileInfo in the trailer which might itself include an irrelevant but maybe confusing EncryptionTrailerSize field. Perhaps we should explicitly set this to zero before writing?

…ng#8556)

In the original fix in syncthing#8563 I simply forgot this. Which meant syncthing#8556
wasn't actually fixed, as the trialer size would have been 0 (default),
and thus we would have still sent the inflated size to encrypted peers.
@imsodin imsodin force-pushed the model/finish-8556 branch from 805c1eb to cdc34de Compare March 28, 2023 20:26
@imsodin
Copy link
Member Author

imsodin commented Mar 28, 2023

(Conflict to resolve)

done

It strikes me that we write a FileInfo in the trailer which might itself include an irrelevant but maybe confusing EncryptionTrailerSize field. Perhaps we should explicitly set this to zero before writing?

There's no need - it is already 0 when we write it: The file-info when pulling is coming from the remote, and over the wire that field is always 0. Only after we wrote the trailer do we set it to the actual value.

@calmh calmh merged commit 3a41d4a into syncthing:main Mar 28, 2023
@imsodin imsodin deleted the model/finish-8556 branch March 28, 2023 21:35
@calmh calmh added this to the v1.23.3 milestone Mar 29, 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)
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Mar 28, 2024
@syncthing syncthing locked and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants