Repository navigation
all: Add untrusted folders behind feature flag (ref #62) - #7055
Conversation
* master: lib/db, lib/protocol: Compact FileInfo and BlockInfo alignment (#6215)
|
@imsodin please sanity check my latest merge commit |
|
The noscript change isn't in the untrusted index.html - taking care of that. |
|
Now the "UI copies" should match again.
Thanks, that plus fixes look good, Yes :) |
|
TestIssue5063 is flaky and times out sometimes, reproducible with -count 100 for example, I didn't investigate yet if it's due to this change or just in general |
|
Seems related, tests time out for me on this branch but not on main. Plus I just realized the recent index sender changes duplicate some encryption code, need to sort that out (as in a merge-leftover). Looking into it. |
|
This PR made it worse, but the problem exists in v1.11.1 too: I messed up locking in the recent index changes. I'll file a separate PR on main and then take care of this PR. |
* main: (42 commits) gui: Initialise sharing when accepting new device (fixes syncthing#7113) (syncthing#7114) gui: Initialise sharing when accepting new device (fixes syncthing#7113) (syncthing#7114) lib/model: Prevent test deadlock (syncthing#7110) lib/api, lib/db: Add file debug endpoint (syncthing#7095) gui: Add advance config port mapping to gui (fixes syncthing#4824) (syncthing#7017) lib/tlsutil: Add O and OU to generated certificates (fixes syncthing#7108) (syncthing#7109) all: Add untrusted folders behind feature flag (ref syncthing#62) (syncthing#7055) build: Update notify (fixes syncthing#5360) (syncthing#7106) lib/model: Fix locking when resending cluster-configs (syncthing#7107) gui: Remove superfluous translate in previous (ref syncthing#7102) gui: Add warning when JavaScript is disabled in Web browser (fixes syncthing#7099) (syncthing#7102) lib/model: Add done chan to track folder-lifetime (fixes syncthing#6664) (syncthing#7094) lib/model: Send indexes for newly shared folder (fixes syncthing#7098) (syncthing#7100) lib/folder: Clear pull errors when nothing is needed anymore (syncthing#7093) lib/api: Fix debug endpoints (ref syncthing#7001) (syncthing#7092) gui, man, authors: Update docs, translations, and contributors lib/config: Sanity checks on MaxConcurrentWrites (ref syncthing#7064) (syncthing#7069) lib/ur: Fix panics in failure-reporting (fixes syncthing#7090) (syncthing#7091) lib/ur: Fix panics in failure-reporting (fixes syncthing#7090) (syncthing#7091) build: Update dependencies (syncthing#7088) ...
This is a proposal for adding untrusted folders (encryption) support behind a feature flag, as discussed in https://forum.syncthing.net/t/encryption-merging-scary-changes-feature-flags/15703
The PR branch is an extension of #6727, with the feature flag added and the stdecryptfolder tool removed. That still had outstanding PR reviews and isn't necessary to have in a first iteration for testing this. Other than that I believe I addressed all the PR reviews from there and this should be ready to merge. Of course except for the feature flag code, which no one has reviewed yet.
The feature flag determines which web UI is served: The "traditional" one or the new one with controls for untrusted folders. A missing feature flag does not prevent "manual" config changes that introduce untrusted folders. My reasoning being is that it not being available by default in UI is enough of a barrier to prevent wide adoption. I can add a mechanism in the config layer to prevent untrusted folders without the flag if deemed necessary.
The feature flag itself is just a string, such that it can be reused if we ever want to use a feature flag again, instead of creating ad deprecating a bool every time.
The statics server is adjusted, such that if the feature flag is set, it looks for files in a "untrusted" subdir and serves those instead of the "normal" files if present. Those files are adjusted full copies of the originals, i.e. if other UI changes happen, those need to be kept in sync by hand. That's ugly, but I consider it manageable (thus volunteering xD ).