lib/model: Don't share with introduced device if encrypted (fixes #7724) (#7734)

This commit is contained in:
Simon Frei
2021-06-03 15:02:57 +02:00
committed by GitHub
parent df48276300
commit 004eded398
2 changed files with 18 additions and 1 deletions
+5
View File
@@ -1565,6 +1565,11 @@ func (m *model) handleIntroductions(introducerCfg config.DeviceConfiguration, cm
continue
}
if fcfg.Type != config.FolderTypeReceiveEncrypted && device.EncryptionPasswordToken != nil {
l.Infof("Cannot share folder %s with %v because the introducer %v encrypts data, which requires a password", folder.Description(), device.ID, introducerCfg.DeviceID)
continue
}
// We don't yet share this folder with this device. Add the device
// to sharing list of the folder.
l.Infof("Sharing folder %s with %v (vouched for by introducer %v)", folder.Description(), device.ID, introducerCfg.DeviceID)