Skip to content

Conversation

@kewiha
Copy link
Contributor

@kewiha kewiha commented Jul 31, 2023

…hared as encrypted

Purpose

Fixes #8965.

Safety check added in v1.23.6 introduced bug. Bug unshares folders with untrusted devices if folder does not have an encryption password set, regardless of whether the folder is shared with the untrusted device as encrypted or not. Prevents sharing with untrusted devices in some cases where sharing would be encrypted.

Patch preserves safety check but permits sharing folders with untrusted devices if they are shared as encrypted.

Testing

Tested on 2023/07/31 as follows:

  • Compiled syncthing from main with and without this patch
  • Ran both syncthing binaries concurrently
  • Added both syncthing instances as mutually untrusted devices.
  • Shared one folder per instance with the other as encrypted
    As expected, the unmodified syncthing instance automatically deleted its shared folder (consistent with v1.23.6 bugged behaviour). The patched syncthing instance did not (consistent with pre-v1.23.6 behaviour before safety check and bug was introduced).

…hared as encrypted

Safety check added in v1.23.6 introduced bug. Bug unshares folders with untrusted devices if folder does not have an encryption password set, regardless of whether the folder is shared with the untrusted device as encrypted or not. Prevents sharing with untrusted devices in some cases where sharing would be encrypted.

Patch preserves safety check but permits sharing folders with untrusted devices if they are shared as encrypted.

Signed-off-by: kewiha <keithh@protonmail.com>
@calmh calmh enabled auto-merge (squash) August 2, 2023 07:03
@calmh calmh merged commit eed12f3 into syncthing:main Aug 2, 2023
calmh added a commit to calmh/syncthing that referenced this pull request Aug 3, 2023
* main:
  build: Increase Go version to 1.20.7
  lib/config: Allow sharing already encrypted folder with untrusted devices (fixes syncthing#8965) (syncthing#9012)
  gui: Use case-insensive and backslash-agnostic versions filter (fixes syncthing#7973) (syncthing#8995)
  gui, man, authors: Update docs, translations, and contributors
  build: Run govulncheck (fixes syncthing#8983)
  build: Run build & tests on main branch nightly
  build: Send test logs to Grafana Loki for statistics
  all: Refactor the protocol/model interface a bit (ref syncthing#8981) (syncthing#9007)
  lib/connections: Fix building with `-tags noquic` (syncthing#9009)
  gui: Fix tooltips on buttons inside button groups (ref syncthing#7984) (syncthing#9008)
  cmd/strelaysrv: Handle accept error with debug set (fixes syncthing#9001) (syncthing#9004)
  lib/api: Fix data race in TestCSRFRequired (syncthing#9006)
  gui: Show full error for failed items (syncthing#9005)
  lib/api: Allow `Bearer` authentication style with API key (syncthing#9002)
calmh added a commit to calmh/syncthing that referenced this pull request Aug 9, 2023
* main:
  gui, man, authors: Update docs, translations, and contributors
  all: Add Prometheus-style metrics to expose some internal performance counters (fixes syncthing#5175) (syncthing#9003)
  build: Increase Go version to 1.20.7
  lib/config: Allow sharing already encrypted folder with untrusted devices (fixes syncthing#8965) (syncthing#9012)
  gui: Use case-insensive and backslash-agnostic versions filter (fixes syncthing#7973) (syncthing#8995)
  gui, man, authors: Update docs, translations, and contributors
  build: Run govulncheck (fixes syncthing#8983)
  build: Run build & tests on main branch nightly
  build: Send test logs to Grafana Loki for statistics
@calmh calmh added this to the v1.24.0 milestone Aug 23, 2023
@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 Aug 1, 2024
@syncthing syncthing locked and limited conversation to collaborators Aug 1, 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.

v1.23.6 introduces untrusted sharing regression

3 participants