Jelajahi Sumber

gui, lib: Handle pw adding remote encrypted folder (fixes #7705) (#7772)

Simon Frei 4 tahun lalu
induk
melakukan
ac2988a485

+ 29 - 11
gui/default/syncthing/core/syncthingController.js

@@ -804,6 +804,14 @@ angular.module('syncthing.core')
             });
         }
 
+        $scope.pendingIsRemoteEncrypted = function(folderID, deviceID) {
+            var pending = $scope.pendingFolders[folderID];
+            if (!pending || !pending.offeredBy || !pending.offeredBy[deviceID]) {
+                return false;
+            }
+            return pending.offeredBy[deviceID].remoteEncrypted;
+        };
+
         $scope.refreshFailed = function (page, perpage) {
             if (!$scope.failed || !$scope.failed.folder) {
                 return;
@@ -1932,17 +1940,20 @@ angular.module('syncthing.core')
             $('#globalChanges').modal();
         };
 
-        function editFolderModal() {
+        function editFolderModal(initialTab) {
             initVersioningEditing();
             $scope.currentFolder._recvEnc = $scope.currentFolder.type === 'receiveencrypted';
             $scope.folderPathErrors = {};
             $scope.folderEditor.$setPristine();
+            if (!initialTab) {
+                initialTab = "#folder-general";
+            }
+            $('.nav-tabs a[href="' + initialTab + '"]').tab('show');
             $('#editFolder').modal().one('shown.bs.tab', function (e) {
                 if (e.target.attributes.href.value === "#folder-ignores") {
                     $('#folder-ignores textarea').focus();
                 }
             }).one('hidden.bs.modal', function () {
-                $('.nav-tabs a[href="#folder-general"]').tab('show');
                 window.location.hash = "";
                 $scope.currentFolder = {};
             });
@@ -1971,7 +1982,7 @@ angular.module('syncthing.core')
             return 'fas fa-folder';
         };
 
-        function editFolder() {
+        function editFolder(initialTab) {
             if ($scope.currentFolder.path.length > 1 && $scope.currentFolder.path.slice(-1) === $scope.system.pathSeparator) {
                 $scope.currentFolder.path = $scope.currentFolder.path.slice(0, -1);
             } else if (!$scope.currentFolder.path) {
@@ -1979,7 +1990,7 @@ angular.module('syncthing.core')
                 $scope.currentFolder.path = '';
             }
             initShareEditing('folder');
-            editFolderModal();
+            editFolderModal(initialTab);
         }
 
         $scope.internalVersioningEnabled = function(guiVersioning) {
@@ -2020,7 +2031,7 @@ angular.module('syncthing.core')
             }
         };
 
-        $scope.editFolderExisting = function(folderCfg) {
+        $scope.editFolderExisting = function(folderCfg, initialTab) {
             $scope.editingExisting = true;
             $scope.editingDefaults = false;
             $scope.currentFolder = angular.copy(folderCfg);
@@ -2040,7 +2051,7 @@ angular.module('syncthing.core')
                     $scope.emitHTTPError(err);
                 });
 
-            editFolder();
+            editFolder(initialTab);
         };
 
         $scope.editFolderDefaults = function() {
@@ -2115,11 +2126,18 @@ angular.module('syncthing.core')
         }
 
         $scope.shareFolderWithDevice = function (folder, device) {
-            $scope.folders[folder].devices.push({
-                deviceID: device
-            });
-            $scope.config.folders = folderList($scope.folders);
-            $scope.saveConfig();
+            var folderCfg = $scope.folders[folder];
+            if (folderCfg.type == "receiveencrypted" || !$scope.pendingIsRemoteEncrypted(folder, device)) {
+                $scope.folders[folder].devices.push({
+                    deviceID: device
+                });
+                $scope.config.folders = folderList($scope.folders);
+                $scope.saveConfig();
+            } else {
+                // Open edit folder dialog to enter encryption password
+                $scope.editFolderExisting(folderCfg, "#folder-sharing");
+                $scope.currentSharing.selected[device] = true;
+            }
         };
 
         $scope.saveFolder = function () {

+ 2 - 2
gui/default/syncthing/folder/editFolderModalView.html

@@ -56,7 +56,7 @@
                 <a href="#" ng-click="selectAllSharedDevices(false)" translate>Deselect All</a></small>
             </p>
             <div class="form-group" ng-repeat="device in currentSharing.shared">
-              <share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{device.deviceID}}" label="{{deviceName(device)}}" folder-type="{{currentFolder.type}}" untrusted="device.untrusted" />
+              <share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{device.deviceID}}" label="{{deviceName(device)}}" folder-type="{{currentFolder.type}}" untrusted="device.untrusted || pendingIsRemoteEncrypted(currentFolder.id, device.deviceID)" />
             </div>
           </div>
           <div class="form-horizontal" ng-if="currentSharing.unrelated.length || otherDevices().length <= 0">
@@ -70,7 +70,7 @@
               <span translate>There are no devices to share this folder with.</span>
             </p>
             <div class="form-group" ng-repeat="device in currentSharing.unrelated" ng-init="id = device.deviceID; folder = currentFolder">
-              <share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{device.deviceID}}" label="{{deviceName(device)}}" folder-type="{{currentFolder.type}}" untrusted="device.untrusted" />
+              <share-template selected="currentSharing.selected" encryption-passwords="currentSharing.encryptionPasswords" id="{{device.deviceID}}" label="{{deviceName(device)}}" folder-type="{{currentFolder.type}}" untrusted="device.untrusted || pendingIsRemoteEncrypted(currentFolder.id, device.deviceID)" />
             </div>
           </div>
         </div>

+ 2 - 6
lib/config/config.go

@@ -458,13 +458,9 @@ func (cfg *Configuration) FolderMap() map[string]FolderConfiguration {
 // folders that have an encryption password set.
 func (cfg Configuration) FolderPasswords(device protocol.DeviceID) map[string]string {
 	res := make(map[string]string, len(cfg.Folders))
-nextFolder:
 	for _, folder := range cfg.Folders {
-		for _, dev := range folder.Devices {
-			if dev.DeviceID == device && dev.EncryptionPassword != "" {
-				res[folder.ID] = dev.EncryptionPassword
-				continue nextFolder
-			}
+		if dev, ok := folder.Device(device); ok && dev.EncryptionPassword != "" {
+			res[folder.ID] = dev.EncryptionPassword
 		}
 	}
 	return res

+ 128 - 92
lib/db/structs.pb.go

@@ -403,6 +403,7 @@ type ObservedFolder struct {
 	Time             time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time" xml:"time"`
 	Label            string    `protobuf:"bytes,2,opt,name=label,proto3" json:"label" xml:"label"`
 	ReceiveEncrypted bool      `protobuf:"varint,3,opt,name=receive_encrypted,json=receiveEncrypted,proto3" json:"receiveEncrypted" xml:"receiveEncrypted"`
+	RemoteEncrypted  bool      `protobuf:"varint,4,opt,name=remote_encrypted,json=remoteEncrypted,proto3" json:"remoteEncrypted" xml:"remoteEncrypted"`
 }
 
 func (m *ObservedFolder) Reset()         { *m = ObservedFolder{} }
@@ -494,98 +495,100 @@ func init() {
 func init() { proto.RegisterFile("lib/db/structs.proto", fileDescriptor_5465d80e8cba02e3) }
 
 var fileDescriptor_5465d80e8cba02e3 = []byte{
-	// 1445 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xcf, 0x6f, 0x1b, 0x45,
-	0x14, 0xce, 0xc6, 0xce, 0x0f, 0x8f, 0x9d, 0xb4, 0xd9, 0xd2, 0xc8, 0x04, 0xf0, 0x98, 0x69, 0x2a,
-	0x19, 0x90, 0x1c, 0x29, 0x55, 0x23, 0x54, 0x09, 0xaa, 0x6e, 0x43, 0xda, 0x54, 0xa5, 0x45, 0x93,
-	0xaa, 0x20, 0x38, 0x58, 0xfb, 0x63, 0xe2, 0xac, 0xba, 0xde, 0x35, 0x3b, 0x9b, 0xa4, 0xee, 0x8d,
-	0x0b, 0x12, 0xb7, 0xaa, 0xe2, 0x80, 0x10, 0x42, 0x3d, 0xf1, 0x27, 0xf0, 0x17, 0x70, 0xe8, 0x31,
-	0x47, 0xc4, 0x61, 0x51, 0x93, 0x0b, 0x58, 0xe2, 0xe2, 0x13, 0xe2, 0x84, 0xe6, 0xcd, 0xec, 0xec,
-	0xba, 0x51, 0x51, 0x5b, 0x72, 0xdb, 0xf7, 0xbd, 0xef, 0x3d, 0xef, 0xbc, 0xf9, 0xde, 0xdb, 0x67,
-	0xf4, 0x5a, 0xe0, 0x3b, 0x2b, 0x9e, 0xb3, 0xc2, 0x93, 0x78, 0xd7, 0x4d, 0x78, 0xbb, 0x1f, 0x47,
-	0x49, 0x64, 0x4e, 0x7a, 0xce, 0xd2, 0xb9, 0x98, 0xf5, 0x23, 0xbe, 0x02, 0x80, 0xb3, 0xbb, 0xbd,
-	0xd2, 0x8d, 0xba, 0x11, 0x18, 0xf0, 0x24, 0x89, 0x4b, 0xb8, 0x1b, 0x45, 0xdd, 0x80, 0xe5, 0xac,
-	0xc4, 0xef, 0x31, 0x9e, 0xd8, 0xbd, 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14, 0x2f, 0x40, 0x64, 0x01, 0x23, 0xb4, 0xc8, 0x30, 0x6f, 0x14, 0x34, 0x1a, 0xf2,
-	0x7a, 0xb5, 0x69, 0xb4, 0xa6, 0x60, 0x4e, 0x68, 0x41, 0xdc, 0xe2, 0xc7, 0x74, 0x76, 0x8b, 0x93,
-	0x7f, 0x52, 0x5c, 0xf2, 0xc3, 0x84, 0x16, 0x68, 0xe6, 0x36, 0x92, 0x55, 0xea, 0x40, 0x8f, 0xcd,
-	0x41, 0xaa, 0x6b, 0x87, 0x29, 0xae, 0x51, 0x7b, 0xdf, 0x12, 0x8e, 0x2d, 0xff, 0x01, 0x13, 0x85,
-	0x72, 0x32, 0x43, 0x17, 0x4a, 0x23, 0x59, 0xe2, 0x47, 0x07, 0xcb, 0x63, 0x61, 0x34, 0x0f, 0x32,
-	0xd7, 0x51, 0x35, 0x88, 0x5c, 0x3b, 0xe8, 0x6c, 0x07, 0x76, 0x97, 0xd7, 0xff, 0x98, 0x81, 0xc3,
-	0xc3, 0x2d, 0x02, 0xbe, 0x21, 0x60, 0xfd, 0xd2, 0x39, 0x44, 0x68, 0xc1, 0x6f, 0x5e, 0x47, 0x35,
-	0x25, 0x51, 0xa9, 0x85, 0x3f, 0x67, 0xe0, 0x26, 0xa1, 0x86, 0xca, 0xa1, 0xd4, 0xb0, 0x50, 0x54,
-	0xb6, 0x94, 0x43, 0x91, 0x51, 0x1c, 0xef, 0xd3, 0x2f, 0x33, 0xde, 0x29, 0x9a, 0x51, 0x53, 0xb6,
-	0x3e, 0x03, 0x71, 0xef, 0x1f, 0xa6, 0x18, 0x51, 0x7b, 0x7f, 0x53, 0xa2, 0x22, 0x8b, 0x22, 0xe8,
-	0x2c, 0xca, 0x16, 0xb3, 0xb2, 0xc0, 0xa4, 0x19, 0x4f, 0x74, 0x4c, 0x18, 0x75, 0x8a, 0xd2, 0x98,
-	0x85, 0xd4, 0xd0, 0x31, 0x61, 0xf4, 0xc9, 0x98, 0x38, 0x64, 0xc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e1, 0x98, 0x17, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x3c, 0x81,
-	0x94, 0xda, 0x0e, 0x00, 0x00,
+	// 1476 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6f, 0xdb, 0x46,
+	0x13, 0x36, 0x2d, 0xf9, 0x43, 0x2b, 0xf9, 0x8b, 0x79, 0x6d, 0xe8, 0xf5, 0xfb, 0x56, 0xab, 0x6e,
+	0x1c, 0x40, 0xfd, 0x80, 0x0c, 0x38, 0x88, 0x51, 0x04, 0x68, 0x83, 0x30, 0xae, 0x13, 0x07, 0x69,
+	0x52, 0xac, 0x83, 0xa4, 0x68, 0x0f, 0x82, 0x48, 0xae, 0x65, 0x22, 0x14, 0xa9, 0x72, 0x69, 0x3b,
+	0xca, 0xad, 0x97, 0x02, 0xbd, 0x05, 0x41, 0x0f, 0x45, 0x51, 0x14, 0x39, 0xf5, 0x27, 0xf4, 0x17,
+	0x14, 0x45, 0x8e, 0x3e, 0x16, 0x3d, 0xb0, 0x88, 0x7d, 0x69, 0x75, 0xd4, 0xa9, 0xe8, 0xa9, 0xd8,
+	0xd9, 0xe5, 0x92, 0xb2, 0x91, 0x22, 0x49, 0x7d, 0xd3, 0x3c, 0xf3, 0xcc, 0x88, 0x9c, 0x7d, 0x66,
+	0x76, 0x88, 0xfe, 0xe3, 0x7b, 0xf6, 0xaa, 0x6b, 0xaf, 0xf2, 0x38, 0xda, 0x73, 0x62, 0xde, 0xec,
+	0x45, 0x61, 0x1c, 0x9a, 0xe3, 0xae, 0xbd, 0x7c, 0x3e, 0x62, 0xbd, 0x90, 0xaf, 0x02, 0x60, 0xef,
+	0xed, 0xac, 0x76, 0xc2, 0x4e, 0x08, 0x06, 0xfc, 0x92, 0xc4, 0x65, 0xdc, 0x09, 0xc3, 0x8e, 0xcf,
+	0x32, 0x56, 0xec, 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da, 0xd8, 0xb3, 0xa3, 0x9a, 0x71, 0x78, 0x54, 0x33, 0x1e, 0x1f, 0xd7, 0xc6, 0x9e, 0x1e,
+	0xd7, 0x8c, 0xc3, 0xe3, 0xda, 0xd8, 0x2f, 0xc7, 0xb5, 0xb1, 0x4f, 0x2f, 0xbc, 0xc4, 0xd2, 0xee,
+	0xda, 0xf6, 0x24, 0xbc, 0xe6, 0xc5, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xa4, 0xea, 0xfc,
+	0x33, 0x0f, 0x00, 0x00,
 }
 
 func (m *FileVersion) Marshal() (dAtA []byte, err error) {
@@ -1145,6 +1148,16 @@ func (m *ObservedFolder) MarshalToSizedBuffer(dAtA []byte) (int, error) {
 	_ = i
 	var l int
 	_ = l
+	if m.RemoteEncrypted {
+		i--
+		if m.RemoteEncrypted {
+			dAtA[i] = 1
+		} else {
+			dAtA[i] = 0
+		}
+		i--
+		dAtA[i] = 0x20
+	}
 	if m.ReceiveEncrypted {
 		i--
 		if m.ReceiveEncrypted {
@@ -1472,6 +1485,9 @@ func (m *ObservedFolder) ProtoSize() (n int) {
 	if m.ReceiveEncrypted {
 		n += 2
 	}
+	if m.RemoteEncrypted {
+		n += 2
+	}
 	return n
 }
 
@@ -3108,6 +3124,26 @@ func (m *ObservedFolder) Unmarshal(dAtA []byte) error {
 				}
 			}
 			m.ReceiveEncrypted = bool(v != 0)
+		case 4:
+			if wireType != 0 {
+				return fmt.Errorf("proto: wrong wireType = %d for field RemoteEncrypted", wireType)
+			}
+			var v int
+			for shift := uint(0); ; shift += 7 {
+				if shift >= 64 {
+					return ErrIntOverflowStructs
+				}
+				if iNdEx >= l {
+					return io.ErrUnexpectedEOF
+				}
+				b := dAtA[iNdEx]
+				iNdEx++
+				v |= int(b&0x7F) << shift
+				if b < 0x80 {
+					break
+				}
+			}
+			m.RemoteEncrypted = bool(v != 0)
 		default:
 			iNdEx = preIndex
 			skippy, err := skipStructs(dAtA[iNdEx:])

+ 3 - 0
lib/model/model.go

@@ -1305,6 +1305,7 @@ func (m *model) ccHandleFolders(folders []protocol.Folder, deviceCfg config.Devi
 			delete(expiredPending, folder.ID)
 			of.Label = folder.Label
 			of.ReceiveEncrypted = len(ccDeviceInfos[folder.ID].local.EncryptionPasswordToken) > 0
+			of.RemoteEncrypted = len(ccDeviceInfos[folder.ID].remote.EncryptionPasswordToken) > 0
 			if err := m.db.AddOrUpdatePendingFolder(folder.ID, of, deviceID); err != nil {
 				l.Warnf("Failed to persist pending folder entry to database: %v", err)
 			}
@@ -1316,6 +1317,7 @@ func (m *model) ccHandleFolders(folders []protocol.Folder, deviceCfg config.Devi
 				FolderLabel:      folder.Label,
 				DeviceID:         deviceID,
 				ReceiveEncrypted: of.ReceiveEncrypted,
+				RemoteEncrypted:  of.RemoteEncrypted,
 			})
 			// DEPRECATED: Only for backwards compatibility, should be removed.
 			m.evLogger.Log(events.FolderRejected, map[string]string{
@@ -3265,6 +3267,7 @@ type updatedPendingFolder struct {
 	FolderLabel      string            `json:"folderLabel"`
 	DeviceID         protocol.DeviceID `json:"deviceID"`
 	ReceiveEncrypted bool              `json:"receiveEncrypted"`
+	RemoteEncrypted  bool              `json:"remoteEncrypted"`
 }
 
 // redactPathError checks if the error is actually a os.PathError, and if yes

+ 1 - 0
proto/lib/db/structs.proto

@@ -94,6 +94,7 @@ message ObservedFolder {
     google.protobuf.Timestamp time              = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
     string                    label             = 2;
     bool                      receive_encrypted = 3;
+    bool                      remote_encrypted  = 4;
 }
 
 message ObservedDevice {