Skip to content

Mutual encrypted sharing doesn't work (both sides with password) #8277

Closed

Description

@tomasz1986

Please forgive me if I'm wrong here, but I remember this being mentioned on the forum as untested, but as something that "should still work". However, in my testing, it seems to always fail with a "generic error".

  1. On Device 1, add a new folder filled with some files to Syncthing.
  2. Share the folder with Device 2, setting a password on it.
  3. On Device 2, accept the folder, but change the type to "Send & Receive", while also inputting the same password.
  4. The two devices connect and try to sync the files, but the process fails with a "generic error".

The final result looks like this:

image
image
image

Below are logs with db,model enabled:

All testing was done under Windows 10, on two different PCs. The problem isn't limited to the latest code either, as I've tested Syncthing versions up to v1.18.6, and the same errors pop up on all of them.

Activity

  1. added
    bug
    needs-triage
    on Apr 13, 2022
  2. acolomb commented on Apr 13, 2022

    @acolomb
    Member

    I think it's meant to disallow any other folder type as long as the password is empty. Maybe that logic is missing or broken in the GUI code. What would be the purpose for choosing other types without giving the password?

  3. tomasz1986 commented on Apr 13, 2022

    @tomasz1986
    MemberAuthor

    Can you elaborate? I'm not sure I quite understand. Just to be clear, here we're talking about a situation where both sides have been given the password.

    To be more specific,

    SR/RO (password) --> RE (no password) - syncs fine
    RE (no password) --> SR/RO (password) - syncs fine
    SR/RO (password) --> SR/RO (password) - generic error

  4. acolomb commented on Apr 14, 2022

    @acolomb
    Member

    I thought you were talking about a situation where the password is not given on one side. Aren't your first two examples the same, just backwards?

  5. tomasz1986 commented on Apr 14, 2022

    @tomasz1986
    MemberAuthor

    I thought you were talking about a situation where the password is not given on one side.

    Oh no, when there is no password, the devices don't even connect displaying an error message. The problem happens only when there is the same password on both sides, yet neither of the two folder types is set to Receive Encrypted.

    Aren't your first two examples the same, just backwards?

    Yeah, it's the same thing eventually, but I just wanted to point out the direction of sharing the folder in case there's any difference in relation to it.

  6. calmh commented on Apr 15, 2022

    @calmh
    Member

    same password on both sides, yet neither of the two folder types is set to Receive Encrypted.

    This is something that used to work, sort off, but it was never a designed feature as there is no point to it (?), so it may have been broken by subsequently added checks.

  7. tomasz1986 commented on Apr 15, 2022

    @tomasz1986
    MemberAuthor

    but it was never a designed feature as there is no point to it (?)

    I was actually thinking about this as a possible short-term solution, e.g. when we've a local Receive Encrypted folder that was shared with us previously. One day, we decide that we don't want to encrypt the files anymore and would rather prefer to have it set as SR or RO. However, the original device is located in a place that we've got no immediate access to. Then, at least temporarily, we could just input the original password and sync the folder unencrypted.

  8. calmh commented on Apr 15, 2022

    @calmh
    Member

    Yeah I could see that being a use case. It's gotta be a small corner of the already small niche though.

  9. tomasz1986 commented on Apr 15, 2022

    @tomasz1986
    MemberAuthor

    That's obviously true 😉. If too difficult or complex to implement, then at least having a useful error message would be nice regardless.

  10. calmh commented on Apr 15, 2022

    @calmh
    Member

    I don't think there's a good reason for it to not work, so it's probably just a question of figuring out why it doesn't. (And perhaps figuring out a way to add a test.)

  11. kuzaro commented on Feb 6, 2023

    @kuzaro
  12. imsodin commented on Feb 6, 2023

    @imsodin
  13. changed the title [-]Syncing a password-protected folder between two devices fails with "generic error" when set to something else than "Receive Encrypted"[/-] [+]Mutual encrypted sharing doesn't work (both sides with password)[/+] on Mar 10, 2023
  14. added a commit that references this issue on Mar 10, 2023
    312423e
  15. removed
    needs-triage
    on Mar 10, 2023
  16. added a commit that references this issue on Mar 18, 2023
    e18899b
  17. added this to the v1.23.3 milestone on Mar 29, 2023
  18. added a commit that references this issue on Apr 14, 2023
    b69598f
  19. added a commit that references this issue on Jan 28, 2024
    f378e63
  20. added
    frozen-due-to-age
    on Mar 17, 2024
  21. locked and limited conversation to collaborators on Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions