π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Guard collection repository against self-moves
Neeraj Gupta13ddc07a4528
diff --git a/server/pkg/repo/collection.go b/server/pkg/repo/collection.goindex 16fed67d43..394f745944 100644--- a/server/pkg/repo/collection.go+++ b/server/pkg/repo/collection.go@@ -867,6 +867,9 @@ func (repo *CollectionRepository) MoveFiles(ctx context.Context,if collectionOwner != fileOwner {return fmt.Errorf("move is not supported when collection and file onwer are different")}+ if toCollectionID == fromCollectionID {+ return fmt.Errorf("source and destination collections must differ")+ }tx, err := repo.DB.BeginTx(ctx, nil)if err != nil {return stacktrace.Propagate(err, "")