What happens when two devices have a common folder ID but don't share the folder with each other?

So the scenario is: device A shares a folder with ID “myfolder” with device B.

device C shares a folder with ID “myfolder” with device D.

Later, device A and device C add each other to share a totally different folder.

At the point where A and C now “trust” each other - would “myfolder” get implicitly synced?

A little further on, device C’s user clicks “share with…” on their version of “myfolder” with device A.

Will device A suddenly be sharing their “myfolder”, or would they need to accept the folder from device C before this happened?

In short: is adding a device implicitly trusting any folder IDs it claims to have data for? Or is the “accept folder” step a secondary authorization (i.e. yes, I agree that for this folder ID name we’ll exchange data).

Basically: could a device “act hostile” and hunt around setting up folder IDs to try and find other matching IDs?

Usually the Folder ID is similar to XXXX-XXXX as follow:

so about what you discuss exactly: Folder Label or Folder ID? Since of a folder you shared between device A and B the Folder ID is unique and the Folder Label could be the same regarding a different folder, which have another Folder ID. So it means

Folder ID XXXX-XXXX and Folder Label “myfolder”
Folder ID 8888-8888 and Folder Label “myfolder”

would be no problem to have separate folders in the same device.

Just having the same ID is not enough - it’s just a pre-requisite. Meaning to sync two folders, they must have the same ID. And then on both devices the other device has to be selected to share, such that actual syncing happens. For an existing device and folder, instead of the “Add”, you’ll get “Share” on the folder banner in the UI.