mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
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>
This commit is contained in:
parent
5323928159
commit
eed12f3ec5
@ -556,8 +556,8 @@ loop:
|
||||
func ensureNoUntrustedTrustingSharing(f *FolderConfiguration, devices []FolderDeviceConfiguration, existingDevices map[protocol.DeviceID]*DeviceConfiguration) []FolderDeviceConfiguration {
|
||||
for i := 0; i < len(devices); i++ {
|
||||
dev := devices[i]
|
||||
if dev.EncryptionPassword != "" {
|
||||
// There's a password set, no check required
|
||||
if dev.EncryptionPassword != "" || f.Type == FolderTypeReceiveEncrypted {
|
||||
// There's a password set or the folder is received encrypted, no check required
|
||||
continue
|
||||
}
|
||||
if devCfg := existingDevices[dev.DeviceID]; devCfg.Untrusted {
|
||||
|
Loading…
Reference in New Issue
Block a user